Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » sharing existing cvs modules?
sharing existing cvs modules? [message #243147] Fri, 21 May 2004 14:13 Go to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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 #243186 is a reply to message #243147] Fri, 21 May 2004 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

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?

I recommend opening the CVS Repository Explorer view and checking out
the module(s) you want into new Java Project(s). Also, have you seen the
CVS tutorial under Workbench User Guide > Getting Started in the Eclipse
Help?

HTH,
Eric
Re: sharing existing cvs modules? [message #243218 is a reply to message #243186] Fri, 21 May 2004 16:35 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
Eric Rizzo wrote:

> I recommend opening the CVS Repository Explorer view and checking out
> the module(s) you want into new Java Project(s).

Of course that would be best, but given our directory structure I need
to create multiple eclipse projects per cvs module. Futhermore the
eclipse project files cannot be stored at the root of the cvs module.

Also, have you seen the
> CVS tutorial under Workbench User Guide > Getting Started in the Eclipse
> Help?

Yes. But because of the above mentioned constraints it does not apply to
our project structure. BTW, I use eclipse for other projects that do not
have this legacy directory structure. Its just this specific directory
layout that is causing grief.
Re: sharing existing cvs modules? [message #243274 is a reply to message #243218] Fri, 21 May 2004 18:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.metacasa.com

Barry Kaplan wrote:
> Eric Rizzo wrote:
>
>> I recommend opening the CVS Repository Explorer view and checking out
>> the module(s) you want into new Java Project(s).
>
>
> Of course that would be best, but given our directory structure I need
> to create multiple eclipse projects per cvs module. Futhermore the
> eclipse project files cannot be stored at the root of the cvs module.

You can add module aliases to the CVSROOT/modules file in the CVS
repository. For example, to create a "fake" project "eclipse-project",
you would add the line:

eclipse-project module/project/eclipse

In your example, this would check out the module/project/eclipse
directory (and all its contents) as the top-level CVS module
"eclipse-project". You'd have:

eclipse-project/src
eclipse-project/test

It's all behind the scenes in the CVS repository, so eclipse doesn't
know the difference (although IIRC, the alias modules come up with a
different icon in CVS Repository Explorer).

See the CVS docs for more info about fiddling with CVSROOT/modules.

John
Re: sharing existing cvs modules? [message #243345 is a reply to message #243274] Fri, 21 May 2004 22:10 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
John Sheets wrote:

> Barry Kaplan wrote:
> You can add module aliases to the CVSROOT/modules file in the CVS
> repository. For example, to create a "fake" project "eclipse-project",
> you would add the line:
>
> eclipse-project module/project/eclipse
>
> In your example, this would check out the module/project/eclipse
> directory (and all its contents) as the top-level CVS module
> "eclipse-project". You'd have:
>
> eclipse-project/src
> eclipse-project/test

Thanks John, but...

.... the directory 'module/project/eclipse' does not contain any
subdirectories. The 'src' and 'test' directories are a few levels up.
Also there are often other directories at the 'src' level, for example
'module/resources' or 'module/database' that need to be included in the
non-test project.

In addition I would like the checked cvs workspace to be usable by all
our environments concurrently: Idea, Eclipse, and Ant. Each of which
expects a certain relative directory structure. I start using cvs module
aliases that will no longer be possible.

So in summary, it seems that eclipse only supports a cvs module when the
project files are in the root of the module. No?
Re: sharing existing cvs modules? [message #243354 is a reply to message #243345] Fri, 21 May 2004 22:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Barry Kaplan wrote:
> So in summary, it seems that eclipse only supports a cvs module when the
> project files are in the root of the module. No?

No.

- To checkout *any* dir from CVS
- goto CVS Explorer
- find required dir
- use *Check out*in

- To share project not as a module
- click *share*
- write required path in the custom name field
- for example, aka *module/.../project*

--
Sam Mesh - http://openrules.com
Re: sharing existing cvs modules? [message #245090 is a reply to message #243147] Tue, 25 May 2004 17:58 Go to previous messageGo to next message
Michael Valenta is currently offline Michael ValentaFriend
Messages: 560
Registered: July 2009
Senior Member
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. 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

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.

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 #245265 is a reply to message #245090] Tue, 25 May 2004 22:26 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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 14:03 Go to previous messageGo to next message
Michael Valenta is currently offline Michael ValentaFriend
Messages: 560
Registered: July 2009
Senior Member
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 #245621 is a reply to message #245265] Wed, 26 May 2004 14:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Barry Kaplan wrote:

[snipped a bunch of stuff]

I have to say that setting up Projects in Eclipse is not very difficult.
It is different in some ways than some other tools (all tools are
different from each other in one way or another), but not necessarily
more difficult IME.

Have you looked at my responses in the recent thread "Eclipse project
structure"? There is another newbie user who was confused about the
fundamental concept of an Eclipse Project and what it means. It is not
exactly the same as how some other IDEs define a "project" and that is
likely the impedance mismatch that is leading to your confusion. Read
that thread and see if it helps.

Also, I think it would help a great deal if you clearly stated your
existing directory structure(s) and how you'd like to organize things in
terms of logical projects in Eclipse. I (and many others) have set up a
dozen or more different projects in Eclipse, all with different existing
structures and dependencies, and it always has met the needs. So I'm
sure we can help get your set up if we just could see how it is
structured - it's hard to talk about this kind of thing in abstract terms.

HTH,
Eric
Re: sharing existing cvs modules? [message #245744 is a reply to message #245595] Wed, 26 May 2004 17:10 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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 #245892 is a reply to message #245621] Wed, 26 May 2004 21:49 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
Eric Rizzo wrote:

> Barry Kaplan wrote:
>
> [snipped a bunch of stuff]
>
> I have to say that setting up Projects in Eclipse is not very difficult.
> It is different in some ways than some other tools (all tools are
> different from each other in one way or another), but not necessarily
> more difficult IME.

Setting up a project in which the project files can live in the root of
the directory of the tree is easy, I agree. Its just when you have a
strange directory structure that it becomes harder than other IDEs.

> Have you looked at my responses in the recent thread "Eclipse project
> structure"?

Yes, I read that thread. I don't believe I have any confusion on the
Eclipse project concepts, nor even its implementation.

> Also, I think it would help a great deal if you clearly stated your
> existing directory structure(s) and how you'd like to organize things in
> terms of logical projects in Eclipse. I (and many others) have set up a
> dozen or more different projects in Eclipse, all with different existing
> structures and dependencies, and it always has met the needs. So I'm
> sure we can help get your set up if we just could see how it is
> structured - it's hard to talk about this kind of thing in abstract terms.

My first post defined the concrete structure. A post today also had
concrete examples and talked about what I was trying to achieve. If you
can't find those posts let me know and I'll repost.

Thanks Eric!

-bk
Re: sharing existing cvs modules? [message #245897 is a reply to message #245621] Wed, 26 May 2004 21:52 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
Eric Rizzo wrote:

> I have to say that setting up Projects in Eclipse is not very difficult.

Eric, I should also mention that I /have/ setup a project that includes
all the sources in all the modules. This is no problem because I can
checkout the top-level cvs module as a project, tweak the paths and
setup the libraries. This was no problem at all.

What I want to do is to create seperate projects for each module --
really two projects for each project: one for production code and one
for test code. But again, I have detailed all this in previous posts.

-bk
Re: sharing existing cvs modules? [message #246270 is a reply to message #245744] Thu, 27 May 2004 13:55 Go to previous messageGo to next message
Eclipse UserFriend
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 14:24 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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 16:00 Go to previous messageGo to next message
Michael Valenta is currently offline Michael ValentaFriend
Messages: 560
Registered: July 2009
Senior Member
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 18:24 Go to previous messageGo to next message
Eclipse UserFriend
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 19:09 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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 14:35 Go to previous messageGo to next message
Eclipse UserFriend
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 21:22 Go to previous message
Eclipse UserFriend
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
Previous Topic:Waiting for background work
Next Topic:Migrating between milestone releases
Goto Forum:
  


Current Time: Fri Oct 18 13:26:08 GMT 2024

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

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

Back to the top