Home » Eclipse Projects » Eclipse Platform » sharing existing cvs modules?
sharing existing cvs modules? [message #243147] |
Fri, 21 May 2004 10:13  |
Eclipse User |
|
|
|
We have a legacy directory structure we are trying to work with. Our cvs
modules look like:
module/
module/project/idea
module/project/eclipse/src (.classpath, .project)
module/project/eclipse/test (.classpath, .project)
module/src/...
module/test/...
I have created projects for a bunch of our modules ok, but I cannot seem
to get them to be "hooked" into cvs. When I select a project and invoke
'Team->Share Project..' I'm presented with the view for adding a module
to cvs. The modules, and even the eclipse project files, are already
committed to cvs.
How can I get eclipse to recognize that these projects are in cvs?
tx
|
|
| | | | | | |
Re: sharing existing cvs modules? [message #245265 is a reply to message #245090] |
Tue, 25 May 2004 18:26   |
Eclipse User |
|
|
|
Thanks for the advice Micheal...
Michael Valenta wrote:
> Barry,
>
> If you have an existing CVS structure, why are you using Team>Share
> Project. Sharing is typically done when uploading a project to CVs for
> the first time or for reconnecting projects that already have CVS meta
> information in them.
Yes, but I see no other way to get an already checked cvs workspace
hooked into eclipse. It seems that you are implying that the only to
hook a project into cvs is via a checkout from the pserver. I was hoping
for something a little more flexible.
BTW, there is a big thread on the jetbrains idea newgroup about eclipse
vs idea, and a subthread about the difficulties of setting up projects
in eclipse. Although I'm sure I'll figure out how to jam our directory
structure into eclipse eventually, I must concur with this opinion.
I've created projects given our current directory structure with: idea,
jbuilder, and toghether. Each of these differed with eclipse in one
fundamental aspect: They allowed for explicit naming of their project
files. Thus we could store multiple project files in the same directory.
If eclipse supported this I would simply create the 'src' and 'test'
project files in the module root.
You have a few options to explore here:
>
> 1) Create a module in the CVSROOT/modules file for configuring your
> local project. I think something like the following lines should work.
>
> project-source module/src
> eclipse-project module/project/eclipse/src &project-source
This won't work because it will change the checkout directory structure,
breaking the other IDE projects (mainly Idea).
>
> 2) Checkout module/project/eclipse/src and module/src as two projects
> and then add the src to the eclipse project as a linked folder.
If I were to do this I would just put the two projects files in
'module/src' and 'module/test'. The problem is that 'module/src' also
needs to depend on other directories immediatly below 'module' (eg,
'module/resources'). Which puts back the in same situation of not having
all project files under the project directory.
Again, thanks. I'll try to work you suggestions and keep experimenting.
-bk
>
> I can't see any reason why either of these shouldn't work.
> Michael
>
>
> Barry Kaplan wrote:
>
>> We have a legacy directory structure we are trying to work with. Our
>> cvs modules look like:
>>
>> module/
>> module/project/idea
>> module/project/eclipse/src (.classpath, .project)
>> module/project/eclipse/test (.classpath, .project)
>> module/src/...
>> module/test/...
>>
>> I have created projects for a bunch of our modules ok, but I cannot
>> seem to get them to be "hooked" into cvs. When I select a project and
>> invoke 'Team->Share Project..' I'm presented with the view for adding
>> a module to cvs. The modules, and even the eclipse project files, are
>> already committed to cvs.
>>
>> How can I get eclipse to recognize that these projects are in cvs?
>>
>> tx
>
>
|
|
|
Re: sharing existing cvs modules? [message #245595 is a reply to message #245265] |
Wed, 26 May 2004 10:03   |
Eclipse User |
|
|
|
Barry Kaplan wrote:
> Thanks for the advice Micheal...
>
> Michael Valenta wrote:
>
>> Barry,
>>
>> If you have an existing CVS structure, why are you using Team>Share
>> Project. Sharing is typically done when uploading a project to CVs for
>> the first time or for reconnecting projects that already have CVS meta
>> information in them.
>
>
> Yes, but I see no other way to get an already checked cvs workspace
> hooked into eclipse. It seems that you are implying that the only to
> hook a project into cvs is via a checkout from the pserver. I was hoping
> for something a little more flexible.
If you have an already checkout out CVS structure then Team>Share
Project will detect this and just associate the project with CVS. The
only requirement is that the project directory itself is mapped to CVS
and that all mapped subfolders come from the same repository. Is this
not the case for you? Are you using an ANt script (or some other script)
to checkout the required pieces from CVS?
> BTW, there is a big thread on the jetbrains idea newgroup about eclipse
> vs idea, and a subthread about the difficulties of setting up projects
> in eclipse. Although I'm sure I'll figure out how to jam our directory
> structure into eclipse eventually, I must concur with this opinion.
Could you provide a link?
> I've created projects given our current directory structure with: idea,
> jbuilder, and toghether. Each of these differed with eclipse in one
> fundamental aspect: They allowed for explicit naming of their project
> files. Thus we could store multiple project files in the same directory.
> If eclipse supported this I would simply create the 'src' and 'test'
> project files in the module root.
What do you mean by explicit naming of their project files and how would
this help you? I know you gave a brief sentence on this but could you
give a bit more of a description of how this would help?
> You have a few options to explore here:
>> 1) Create a module in the CVSROOT/modules file for configuring your
>> local project. I think something like the following lines should work.
>>
>> project-source module/src
>> eclipse-project module/project/eclipse/src &project-source
>
> This won't work because it will change the checkout directory structure,
> breaking the other IDE projects (mainly Idea).
This doesn't make sense to me unless you are using Eclipse and IDEA
simultaneously on the same checkout structure. Is this the case?
>> 2) Checkout module/project/eclipse/src and module/src as two projects
>> and then add the src to the eclipse project as a linked folder.
>
> If I were to do this I would just put the two projects files in
> 'module/src' and 'module/test'. The problem is that 'module/src' also
> needs to depend on other directories immediatly below 'module' (eg,
> 'module/resources'). Which puts back the in same situation of not having
> all project files under the project directory.
I'm not sure what you mean by "project files" but couldn't you link in
all the source folders you need? In other words, cck out all the
different source folders you need as seprate projects and then link them
all into a single project.
> Again, thanks. I'll try to work you suggestions and keep experimenting.
>
> -bk
>
>>
>> I can't see any reason why either of these shouldn't work.
>> Michael
>>
>>
>> Barry Kaplan wrote:
>>
>>> We have a legacy directory structure we are trying to work with. Our
>>> cvs modules look like:
>>>
>>> module/
>>> module/project/idea
>>> module/project/eclipse/src (.classpath, .project)
>>> module/project/eclipse/test (.classpath, .project)
>>> module/src/...
>>> module/test/...
>>>
>>> I have created projects for a bunch of our modules ok, but I cannot
>>> seem to get them to be "hooked" into cvs. When I select a project and
>>> invoke 'Team->Share Project..' I'm presented with the view for adding
>>> a module to cvs. The modules, and even the eclipse project files, are
>>> already committed to cvs.
>>>
>>> How can I get eclipse to recognize that these projects are in cvs?
>>>
>>> tx
>>
>>
>>
|
|
| |
Re: sharing existing cvs modules? [message #245744 is a reply to message #245595] |
Wed, 26 May 2004 13:10   |
Eclipse User |
|
|
|
Michael Valenta wrote:
>
> If you have an already checkout out CVS structure then Team>Share
> Project will detect this and just associate the project with CVS.
I have a workspace the contains about a dozen top-level cvs modules. I
can easily create a single eclipse project for the entire tree. But I
want to create individual eclipse projects for each of modules. Really
two eclipse projects per module: one for production code and one for test.
> The only requirement is that the project directory itself is mapped to CVS
> and that all mapped subfolders come from the same repository. Is this
> not the case for you? Are you using an ANt script (or some other script)
> to checkout the required pieces from CVS?
I use smartcvs to initially checkout the set of cvs modules (via a
module alias).
>> BTW, there is a big thread on the jetbrains idea newgroup about ...
>
> Could you provide a link?
Its buried somewhere in
news://news.intellij.net:119/16902670.1085108659074.JavaMail .itn@is.intellij.net
To be fair, the 4.x version of Idea has made setting up projects a
somewhat complex. But at least idea does not care where the physical
project files exist. Further more, idea will use all relative paths if
you ask it to. Eclipse seems to always use fully qualified paths unless
you define variables (which themselves must be fully qualified). But
this will be my next problem when I try to figure out how to maintain
multiple cvs branch workspaces concurrently.
> What do you mean by explicit naming of their project files and how would
> this help you? I know you gave a brief sentence on this but could you
> give a bit more of a description of how this would help?
Sure, I'll use Idea as an example but this applies to jbuilder as well.
Say I have the original directory structure in my orignal post:
module-a/resources/...
module-a/src/...
module-a/test/...
I want to create two projects for this module, one for production code
and one for tests. I would define a production project that included
'module-a/src' and 'module-a/resources' as its java build path. I would
save the project definition file as 'module-a/module-a-prod.ipr'. Then I
would define a second project which included 'module-a/test' as its java
build path and save that project as 'module-a/module-a-test.ipr'.
The result is that I have two projects for the same cvs module. When I
open Idea I can select the project by name, rather than by directory.
>> You have a few options to explore here:
>>
>>> 1) Create a module in the CVSROOT/modules file for configuring your
>>> local project. I think something like the following lines should work.
>>>
>>> project-source module/src
>>> eclipse-project module/project/eclipse/src &project-source
>>
>>
>> This won't work because it will change the checkout directory
>> structure, breaking the other IDE projects (mainly Idea).
>
>
>
> This doesn't make sense to me unless you are using Eclipse and IDEA
> simultaneously on the same checkout structure. Is this the case?
Yes. Sorry, I should have made that clear. The reason is simply for
convience. It allows me to learn eclipse while still having idea (in
which I am very proficient) as a backup. Also when I pair with others on
the team I need to use Idea.
Also, our ant scripts expect the existing directory structure, so if I
created custom cvs modules to checkout with a different structure they
will break.
>>> 2) Checkout module/project/eclipse/src and module/src as two projects
>>> and then add the src to the eclipse project as a linked folder.
>>
>>
>> If I were to do this I would just put the two projects files in
>> 'module/src' and 'module/test'. The problem is that 'module/src' also
>> needs to depend on other directories immediatly below 'module' (eg,
>> 'module/resources'). Which puts back the in same situation of not
>> having all project files under the project directory.
>
> I'm not sure what you mean by "project files" but couldn't you link in
> all the source folders you need? In other words, cck out all the
> different source folders you need as seprate projects and then link them
> all into a single project.
This is what I thought and what I was trying to do. I /can/ create the
projects with the current directory structure using links. But then I
can't seem to get the projects to be hooked into cvs.
-bk
|
|
| | |
Re: sharing existing cvs modules? [message #246270 is a reply to message #245744] |
Thu, 27 May 2004 09:55   |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
Barry Kaplan wrote:
> I have a workspace the contains about a dozen top-level cvs modules. I
> can easily create a single eclipse project for the entire tree. But I
> want to create individual eclipse projects for each of modules. Really
> two eclipse projects per module: one for production code and one for test.
>
[snip]
> Say I have the original directory structure in my orignal post:
>
> module-a/resources/...
> module-a/src/...
> module-a/test/...
>
> I want to create two projects for this module, one for production code
> and one for tests. I would define a production project that included
> 'module-a/src' and 'module-a/resources' as its java build path. I would
> save the project definition file as 'module-a/module-a-prod.ipr'. Then I
> would define a second project which included 'module-a/test' as its java
> build path and save that project as 'module-a/module-a-test.ipr'.
>
> The result is that I have two projects for the same cvs module. When I
> open Idea I can select the project by name, rather than by directory.
[snip]
>> This doesn't make sense to me unless you are using Eclipse and IDEA
>> simultaneously on the same checkout structure. Is this the case?
>
>
> Yes. Sorry, I should have made that clear. The reason is simply for
> convience. It allows me to learn eclipse while still having idea (in
> which I am very proficient) as a backup. Also when I pair with others on
> the team I need to use Idea.
>
> Also, our ant scripts expect the existing directory structure, so if I
> created custom cvs modules to checkout with a different structure they
> will break.
I'm still not sure I understand what exactly you want, but I'll proceed
assuming that creating more than one Eclipse Project for the same module
in CVS is your primary goal.
If I wanted to do that (I have done it in the past for different
branches of the same module), the first thing I would try is to check
out the module more than once - IOW, for each Project I need, check out
a new copy of the module. Each Project can be configured separately (for
example, to include different directories in its source path) and each
lives in its own root directory. The multiple Projects are kept in sync
via CVS (Eclipse awesome CVS client is a real winner here - it makes
synchronizing, even conflicts, so quick and painless).
If I understand you correctly (a big 'if' at this point) then I'd say
that your "mistake" (for lack of a better word) is trying to use the
same CVS check-out for different purposes and different tools. There is
no compelling reason, IMHO, to do so - check out your modules as many
times as you need, I always say. It's easy to keep them in sync,
especially when the work you're doing in each does not overlap much.
BTW, this is how one works with different versions of Eclipse at the
same time. I have an Eclipse 2.1 workspace, with all my Projects/modules
in it; I also have a 3.0M9 workspace, again with all the
Projects/modules there. I only work in one at a time, but I have been
switching back and forth for the past few days. It works well, and
allows me to explore the new tool version (3.0M9) but still keep my
familiar friend (2.1.3) for crunch time.
If I have again misunderstood your wants/needs, then I'm sorry I can't
be of more help.
HTH,
Eric
|
|
|
Re: sharing existing cvs modules? [message #246290 is a reply to message #246270] |
Thu, 27 May 2004 10:24   |
Eclipse User |
|
|
|
Eric Rizzo wrote:
It looks like mostly you do.
> but I'll proceed
> There is
> no compelling reason, IMHO, to do so - check out your modules as many
> times as you need, I always say. It's easy to keep them in sync,
> especially when the work you're doing in each does not overlap much.
Well, that /is/ one of the main compelling reasons. Yes, I could check
out the directory structure such that eclipse is happy and use cvs to
merge/sync. But if I'm working getting a deployment pushed to eap, I'm
not going to want to "go the eclipse cvs workspace, make some changes
and checkin to cvs; then go the ant cvs workspace, update/merge and test
the deployment; back to eclipse to make some fixes -- etc".
It would be worse to have to create two pseudo cvs modules, one each for
production code and test code. Then I would have to checkin to cvs the
production module and update test module just to run tests. In our
process I could not do this anyway, as all tests must pass prior to
checking in production code.
> BTW, this is how one works with different versions of Eclipse at the
> same time.
For working with multiple branches I would of course use multiple
workspaces. When using Idea I simply checkout the cvs modules from the
appropriate branch and open the Idea project from each checkout. But in
this case I can perform all tasks from a single workspace (ie, I don't
have to multiple workspaces for each tool I use, just for each branch;
all tools work together nicely in the single workspace).
> If I have again misunderstood your wants/needs, then I'm sorry I can't
> be of more help.
If you have it is certainly my fault. No matter, I sincerly appreciate
the help. Just discussing the issues is helping me along.
-bk
|
|
|
Re: sharing existing cvs modules? [message #246347 is a reply to message #245744] |
Thu, 27 May 2004 12:00   |
Eclipse User |
|
|
|
Barry Kaplan wrote:
> Michael Valenta wrote:
stuff deleted...
>> What do you mean by explicit naming of their project files and how
>> would this help you? I know you gave a brief sentence on this but
>> could you give a bit more of a description of how this would help?
>
> Sure, I'll use Idea as an example but this applies to jbuilder as well.
>
> Say I have the original directory structure in my orignal post:
>
> module-a/resources/...
> module-a/src/...
> module-a/test/...
>
> I want to create two projects for this module, one for production code
> and one for tests. I would define a production project that included
> 'module-a/src' and 'module-a/resources' as its java build path. I would
> save the project definition file as 'module-a/module-a-prod.ipr'. Then I
> would define a second project which included 'module-a/test' as its java
> build path and save that project as 'module-a/module-a-test.ipr'.
>
> The result is that I have two projects for the same cvs module. When I
> open Idea I can select the project by name, rather than by directory.
I admit that Eclipse doesn't handle this well. The SWT component of
Eclipse has the same problem. Wht they do is commit several variations
of the .classpath file (.classpath_win, .classpath_gtk, etc.) and copy
the one they want to the .classpath file on a checkout (the .classpath
file is ignore to avoid commiting it to the repository
>>> You have a few options to explore here:
>>>
>>>> 1) Create a module in the CVSROOT/modules file for configuring your
>>>> local project. I think something like the following lines should work.
>>>>
>>>> project-source module/src
>>>> eclipse-project module/project/eclipse/src &project-source
>>>
>>> This won't work because it will change the checkout directory
>>> structure, breaking the other IDE projects (mainly Idea).
>>
>> This doesn't make sense to me unless you are using Eclipse and IDEA
>> simultaneously on the same checkout structure. Is this the case?
>
>
> Yes. Sorry, I should have made that clear. The reason is simply for
> convience. It allows me to learn eclipse while still having idea (in
> which I am very proficient) as a backup. Also when I pair with others on
> the team I need to use Idea.
>
> Also, our ant scripts expect the existing directory structure, so if I
> created custom cvs modules to checkout with a different structure they
> will break.
>
>>>> 2) Checkout module/project/eclipse/src and module/src as two
>>>> projects and then add the src to the eclipse project as a linked
>>>> folder.
>>>
>>>
>>>
>>> If I were to do this I would just put the two projects files in
>>> 'module/src' and 'module/test'. The problem is that 'module/src' also
>>> needs to depend on other directories immediatly below 'module' (eg,
>>> 'module/resources'). Which puts back the in same situation of not
>>> having all project files under the project directory.
>>
>>
>> I'm not sure what you mean by "project files" but couldn't you link in
>> all the source folders you need? In other words, cck out all the
>> different source folders you need as seprate projects and then link
>> them all into a single project.
>
>
> This is what I thought and what I was trying to do. I /can/ create the
> projects with the current directory structure using links. But then I
> can't seem to get the projects to be hooked into cvs.
Yes, this is a limitation of the Eclipse Team (VCM) architecture. That's
why I prefer defining modules in the CVSROOT/modules file over using
links. The workaround is to load the link folders as project in Eclipse
as well. You can perform CVS operations on these.
Michael
|
|
|
Re: sharing existing cvs modules? [message #246441 is a reply to message #246290] |
Thu, 27 May 2004 14:24   |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
Barry Kaplan wrote:
> Well, that /is/ one of the main compelling reasons. Yes, I could check
> out the directory structure such that eclipse is happy and use cvs to
> merge/sync. But if I'm working getting a deployment pushed to eap, I'm
> not going to want to "go the eclipse cvs workspace, make some changes
> and checkin to cvs; then go the ant cvs workspace, update/merge and test
> the deployment; back to eclipse to make some fixes -- etc".
Oh, no that should not be necessary. You should be able to use the same
check-out to work with Ant. I've done that before definitely. Ant can be
the least common denominator, so to speak; you obviously want to be
careful of how you define your Eclipse Project build destination in that
scenario. I've usually been able to set it up to build classes into the
same location that the Ant script would do, and then let Ant do its
other stuff.
> For working with multiple branches I would of course use multiple
> workspaces. When using Idea I simply checkout the cvs modules from the
> appropriate branch and open the Idea project from each checkout. But in
> this case I can perform all tasks from a single workspace (ie, I don't
> have to multiple workspaces for each tool I use, just for each branch;
> all tools work together nicely in the single workspace).
You don't necessarily need separate workspaces for separate branches. I
recently had a coworker who had a distinct Eclipse Project for each
branch, all in one workspace - that was how he liked to work. Seemed to
work well for him.
Eric
|
|
|
Re: sharing existing cvs modules? [message #246490 is a reply to message #246441] |
Thu, 27 May 2004 15:09   |
Eclipse User |
|
|
|
Eric Rizzo wrote:
> Barry Kaplan wrote:
>
>> Well, that /is/ one of the main compelling reasons. Yes, I could check
>> out the directory structure such that eclipse is happy and use cvs to
>> merge/sync. But if I'm working getting a deployment pushed to eap, I'm
>> not going to want to "go the eclipse cvs workspace, make some changes
>> and checkin to cvs; then go the ant cvs workspace, update/merge and
>> test the deployment; back to eclipse to make some fixes -- etc".
>
>
> Oh, no that should not be necessary. You should be able to use the same
> check-out to work with Ant.
The ant scripts won't work if I use psuedo/alias cvs modules to
rearrange the directory structure. At least that is what I thought you
were suggesting.
>> For working with multiple branches I would of course use multiple
>> workspaces. When using Idea I simply checkout the cvs modules from the
>> appropriate branch and open the Idea project from each checkout. But
>> in this case I can perform all tasks from a single workspace (ie, I
>> don't have to multiple workspaces for each tool I use, just for each
>> branch; all tools work together nicely in the single workspace).
>
>
> You don't necessarily need separate workspaces for separate branches. I
> recently had a coworker who had a distinct Eclipse Project for each
> branch, all in one workspace - that was how he liked to work. Seemed to
> work well for him.
Except that we will have about three dozen projects (one for each
module) that comprise the deployable system. Also, I don't want to
recreate a new projects just for a branch. I want to checkout the branch
and have the project files already there.
-bk
|
|
|
Re: sharing existing cvs modules? [message #246857 is a reply to message #246490] |
Fri, 28 May 2004 10:35   |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
Barry Kaplan wrote:
> Eric Rizzo wrote:
>> Oh, no that should not be necessary. You should be able to use the
>> same check-out to work with Ant.
>
>
> The ant scripts won't work if I use psuedo/alias cvs modules to
> rearrange the directory structure. At least that is what I thought you
> were suggesting.
No, someone else suggested that. I thought you would be able to get what
you need simply by having multiple Projects (same CVS module) that are
configured slightly differently.
Looks like that is not possible unless you get one of us to sit down in
front of Eclipse with you and see exactly what you have and try some
ideas. And even then it might just not work...
> Except that we will have about three dozen projects (one for each
> module) that comprise the deployable system. Also, I don't want to
> recreate a new projects just for a branch. I want to checkout the branch
> and have the project files already there.
Yeah, that sounds like how I prefer to work. If I want to work on a
different branch, I just select my Project and choose "Replace with >
Another branch." If I have uncommitted changes that I want to save, I'll
just create a quick patch file of them before switching branches.
Anyway, I hope you find a way to work that supports your needs and lets
you take advantage of Eclipse's power. I think you already realize that
what you're trying is a bit unorthodox; I'm still not convinced that it
is impossible, but I can't think of anything else to suggest that might
help.
Good luck,
Eric
|
|
|
Re: sharing existing cvs modules? [message #247025 is a reply to message #246857] |
Fri, 28 May 2004 17:22  |
Eclipse User |
|
|
|
Originally posted by: smesh.openrules.com
Eric Rizzo wrote:
> Anyway, I hope you find a way to work that supports your needs and lets
> you take advantage of Eclipse's power. I think you already realize that
> what you're trying is a bit unorthodox; I'm still not convinced that it
> is impossible, but I can't think of anything else to suggest that might
> help.
Eric, where is *orthodox docs for Eclipse and CVS*?
--
Thanks,
Sam Mesh - http://openrules.com
|
|
|
Goto Forum:
Current Time: Fri Apr 25 22:26:51 EDT 2025
Powered by FUDForum. Page generated in 0.03649 seconds
|