Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Copying A Project in Eclipse and CVS(How to copy (branch?) a project)
Copying A Project in Eclipse and CVS [message #523317] Thu, 25 March 2010 21:12 Go to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member

I have a project that is working and I want to make a new "flavor" of it as a new project. The original project is checked into CVS.

It is a web application project built with JBoss Tools for Eclipse.

I did a simple copy project and I have two problems.

1) The first is that JBoss AS 4.3.2 doesn't recognize the new project name as the way to run the *.jsp pages in the URL. It still uses the old project name.

2) In CVS it seems like it's checking in files that I create in the new project into the old project's CVS tree.


How can I fully separate my new (copied) project from the old project and get it to run under it's own name?
Re: Copying A Project in Eclipse and CVS [message #523329 is a reply to message #523317] Thu, 25 March 2010 17:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26287
Registered: July 2009
Senior Member
John,

Did you use Eclipse to copy it? You'll not want to just copy files like
<project-name>/.project nor will you want to copy all the .cvs folders.


John Bailo wrote:
>
> I have a project that is working and I want to make a new "flavor" of
> it as a new project. The original project is checked into CVS.
>
> It is a web application project built with JBoss Tools for Eclipse.
>
> I did a simple copy project and I have two problems.
>
> 1) The first is that JBoss AS 4.3.2 doesn't recognize the new project
> name as the way to run the *.jsp pages in the URL. It still uses the
> old project name.
>
> 2) In CVS it seems like it's checking in files that I create in the
> new project into the old project's CVS tree.
>
>
> How can I fully separate my new (copied) project from the old project
> and get it to run under it's own name?
Re: Copying A Project in Eclipse and CVS [message #523436 is a reply to message #523317] Fri, 26 March 2010 13:40 Go to previous messageGo to next message
Dilton McGowan II is currently offline Dilton McGowan IIFriend
Messages: 108
Registered: July 2009
Senior Member
On Thu, 25 Mar 2010 17:12:12 -0400, John Bailo wrote:

> I have a project that is working and I want to make a new "flavor" of it
> as a new project. The original project is checked into CVS.
>
> How can I fully separate my new (copied) project from the old project
> and get it to run under it's own name?

If the new project needs to have no connection to the old then:

1) Update the source project.
2) Disconnect it in Eclipse on the Team menu.
3) Copy and rename it in Eclipse with right-click Copy assuming
you want it in the same workspace. You could alternatively
create a new workspace then File | Import the project, renaming
it at that time.
4) Re-connect the old project (do it now so you don't forget).
5) Commit the new project (which has the new name).
Re: Copying A Project in Eclipse and CVS [message #523459 is a reply to message #523317] Fri, 26 March 2010 14:17 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 2411
Registered: July 2009
Senior Member
On 3/25/10 5:12 PM, John Bailo wrote:
>
> I have a project that is working and I want to make a new "flavor" of it
> as a new project. The original project is checked into CVS.

Depending on the purpose, one option might be to simply create a branch
in CVS for the new "flavor" of the project.

Eric
Re: Copying A Project in Eclipse and CVS [message #523514 is a reply to message #523459] Fri, 26 March 2010 16:31 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member

If I branch it in cvs (while in Eclipse, using the cvs plugin), does it automatically create a new project in Eclipse?
Re: Copying A Project in Eclipse and CVS [message #523516 is a reply to message #523436] Fri, 26 March 2010 16:42 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member
Dilton McGowan II wrote on Fri, 26 March 2010 09:40

2) Disconnect it in Eclipse on the Team menu.



When I disconnect the original project, do I select Remove CVS information or leave CVS information alone.
Re: Copying A Project in Eclipse and CVS [message #523517 is a reply to message #523329] Fri, 26 March 2010 16:45 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member
Ed Merks wrote on Thu, 25 March 2010 13:36


John,
Did you use Eclipse to copy it?



Yes, I did a Copy, then Paste and changed the project name.

Ed Merks wrote on Thu, 25 March 2010 13:36

You'll not want to just copy files like
<project-name>/.project nor will you want to copy all the .cvs folders.



After copying, I went into the filesystem and tried deleting the cvs folder, but at that point Eclipse would not load the project, saying that cvs information was missing!


Re: Copying A Project in Eclipse and CVS [message #523543 is a reply to message #523516] Fri, 26 March 2010 18:15 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member

Ok, I went ahead and did as you suggested, and chose the option to remove CVS information.

It threw a bit of fit when i tried to reconnect the original project to CVS.

I ended up copying the .project file from the copy back to the original, and that allowed the original to function again.

I am still having some problems with the copy though. It's a web application whose target is JBoss AS 4.32. When I look at the list of projects, the name of my original project appears twice, and I don't see the new project. I changed the Web Context to the new project name.

Is there any place else where the old project name would appear that would cause JBoss not to read the new project name?
Re: Copying A Project in Eclipse and CVS [message #523842 is a reply to message #523514] Mon, 29 March 2010 14:54 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 2411
Registered: July 2009
Senior Member
On 3/26/10 12:31 PM, John Bailo wrote:
>
> If I branch it in cvs (while in Eclipse, using the cvs plugin), does it
> automatically create a new project in Eclipse?

No, it's the same Project. But Eclipse will automatically switch your
local copy to be working on the branch.
Again, I'm not sure this is really what you want; if this variant is
really supposed to be totally separate from the original, branching is
probably not what you want. If, however, this variant is logically a
"branch" of the original, then...

Eric
Re: Copying A Project in Eclipse and CVS [message #523856 is a reply to message #523543] Mon, 29 March 2010 15:57 Go to previous messageGo to next message
Dilton McGowan II is currently offline Dilton McGowan IIFriend
Messages: 108
Registered: July 2009
Senior Member
On Fri, 26 Mar 2010 14:15:28 -0400, John Bailo wrote:

> Is there any place else where the old project name would appear that
> would cause JBoss not to read the new project name?

I suggest using a grep tool or the Search tool in Eclipse. Maybe create
a new project that works in JBoss and compare. You might find help from
in a JBoss newsgroup where someone has attempted what you are doing.

If you feel that the project copy has errors, I'd suggest filing a
bug report with Eclipse Bugzilla: https://bugs.eclipse.org/bugs/
Re: Copying A Project in Eclipse and CVS [message #523901 is a reply to message #523856] Mon, 29 March 2010 18:57 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member

Ok, I got it working.

You have to understand that I'm very noob so I didn't know that Search...was a top level menu and had not been able to find it under Edit (VSS.Net here).

Once I found it I did not see any mention of the old file name until I checked Consider Derived Resources.

At that point I found the source of my deploy to Jboss problem...the old project name was in file called

org.eclipse.wst.common.component

Once I changed it there to the new project name, I right clicked on the JBoss server and selected Add and Remove Projects... and was able to add the new project to the list that JBoss would deploy.
Re: Copying A Project in Eclipse and CVS [message #523915 is a reply to message #523901] Mon, 29 March 2010 19:32 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member

One more question.

On the new project, when I right click on a jsp file, and select Debug..Run on Server, it launches the web application and starts the server, but it does not load the jsp into a browser. I have to manually launch the jsp into Firefox.

Can you suggest what configuration setting might tell Eclipse to launch a jsp into a browser on Run or Debug?

Re: Copying A Project in Eclipse and CVS [message #524430 is a reply to message #523915] Wed, 31 March 2010 21:15 Go to previous messageGo to next message
Dilton McGowan II is currently offline Dilton McGowan IIFriend
Messages: 108
Registered: July 2009
Senior Member
On Mon, 29 Mar 2010 15:32:27 -0400, John Bailo wrote:

> Can you suggest what configuration setting might tell Eclipse to launch
> a jsp into a browser on Run or Debug?

Not sure, it works for me on Tomcat, try asking this in the WTP (Web
Tools Project) newsgroup.
Re: Copying A Project in Eclipse [message #898264 is a reply to message #523317] Thu, 26 July 2012 05:40 Go to previous message
Jagdeep Gupta is currently offline Jagdeep GuptaFriend
Messages: 8
Registered: July 2012
Junior Member
My project is in Jsp and servlet it is named as SimpleServletProject,
I copied it from " D:/ "to " D:/jagdeep/ " direcly.
The project is running fine but in the editor mode when I opened the file or created new file it is not recognizing some methods; I do not no why, but it is showing as
'method refers to missing type', but while running the Output is same.

Previous Topic:Don't know why; Showing error in Ecli[se editior but working fine?
Next Topic:particular question
Goto Forum:
  


Current Time: Sun Dec 21 12:06:23 GMT 2014

Powered by FUDForum. Page generated in 0.02011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software