Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Multiple projects with same source tree
Multiple projects with same source tree [message #87332] Wed, 20 August 2003 13:43 Go to next message
Eclipse UserFriend
I've nearly finished the process of evaluating Eclipse, but one issue
has me really stumped. Is it
possible to create multiple projects that use the same source tree? The
issue is that we're about
to add SSL support to our product and we'd like to support both the jdk
1.3 SSL implementation
and the jdk 1.4 SSL. As I see it there are 2 issues to be resolved,
inclusion of the SSL classes from
jsse.jar, jnet.jar, etc. for the 1.3 support versus the built-in support
in jdk1.4 and the issue of
which JRE to compile against. It seems the only way to handle those issues
is by having 2
different projects, but there doesn't seem to be a way to have 2 projects
without 2 sets of source
code that would be 99.99% identical.

With Codewarrior it's possible to create as many projects as necessary
and simply "point" the
project at a particular source tree, whereas, Eclipse appears to want the
source tree subordinate
to the project.

How have others dealt with this problem?

TIA

Bob
Re: Multiple projects with same source tree [message #87437 is a reply to message #87332] Wed, 20 August 2003 17:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi there,

> I've nearly finished the process of evaluating Eclipse, but one issue
> has me really stumped. Is it
> possible to create multiple projects that use the same source tree? The
> issue is that we're about
> to add SSL support to our product and we'd like to support both the jdk
> 1.3 SSL implementation
> and the jdk 1.4 SSL. As I see it there are 2 issues to be resolved,
> inclusion of the SSL classes from
> jsse.jar, jnet.jar, etc. for the 1.3 support versus the built-in support
> in jdk1.4 and the issue of
> which JRE to compile against. It seems the only way to handle those issues
> is by having 2
> different projects, but there doesn't seem to be a way to have 2 projects
> without 2 sets of source
> code that would be 99.99% identical.
>
> With Codewarrior it's possible to create as many projects as necessary
> and simply "point" the
> project at a particular source tree, whereas, Eclipse appears to want the
> source tree subordinate
> to the project.
>
> How have others dealt with this problem?

Well as far as I get, you want to add an external library when you use Java
1.3 and when you use Java 1.4 you want that external library not be
included.

1. Well there are many ways to do that. First you can have one Java Project
and if you are running it using JDK 1.3 you just add some additional libs to
the classpath (Launer -> Arguments add -cp option). I dont know if you
get fuzz with it but I currently dont see any reason why...

2. You share the same src directory for two independent projects.
You can add an 'external' source directory by using
myProject->Properties->Java Build Path -> Source tab.
Use add and check the advanced checkbox.

3. You may use a second project based on the first one (depends on
it, referrs to it (Projects tab in Java Build Path) and add the libraries
there. (may be tricky because of class tree conflicts ?!)

->
After all I dont know if it is a big problem to run it on JDK 1.4
and having still a library attached which shares some classes
with JDK 1.4. I think it will work or am I wrong?

And maybe you should think about why you want to use JDK 1.4
if you have to relay on JDK 1.3 as well. I would prefer to only
developing for JDK 1.3 if I would be in such situation and only
check for compatibility once every itteration cycle is nearly
completed.

But never the less just play with second and first and if it works
it should be fine then - I guess.


Martin (Kersten)
Re: Multiple projects with same source tree [message #87465 is a reply to message #87437] Wed, 20 August 2003 18:27 Go to previous messageGo to next message
Eclipse UserFriend
Martin Kersten wrote:

> Hi there,

> > I've nearly finished the process of evaluating Eclipse, but one issue
> > has me really stumped. Is it
> > possible to create multiple projects that use the same source tree? The
> > issue is that we're about
> > to add SSL support to our product and we'd like to support both the jdk
> > 1.3 SSL implementation
> > and the jdk 1.4 SSL. As I see it there are 2 issues to be resolved,
> > inclusion of the SSL classes from
> > jsse.jar, jnet.jar, etc. for the 1.3 support versus the built-in support
> > in jdk1.4 and the issue of
> > which JRE to compile against. It seems the only way to handle those issues
> > is by having 2
> > different projects, but there doesn't seem to be a way to have 2 projects
> > without 2 sets of source
> > code that would be 99.99% identical.
> >
> > With Codewarrior it's possible to create as many projects as necessary
> > and simply "point" the
> > project at a particular source tree, whereas, Eclipse appears to want the
> > source tree subordinate
> > to the project.
> >
> > How have others dealt with this problem?

> Well as far as I get, you want to add an external library when you use Java
> 1.3 and when you use Java 1.4 you want that external library not be
> included.

> 1. Well there are many ways to do that. First you can have one Java Project
> and if you are running it using JDK 1.3 you just add some additional libs to
> the classpath (Launer -> Arguments add -cp option). I dont know if you
> get fuzz with it but I currently dont see any reason why...

> 2. You share the same src directory for two independent projects.
> You can add an 'external' source directory by using
> myProject->Properties->Java Build Path -> Source tab.
> Use add and check the advanced checkbox.

> 3. You may use a second project based on the first one (depends on
> it, referrs to it (Projects tab in Java Build Path) and add the libraries
> there. (may be tricky because of class tree conflicts ?!)

> ->
> After all I dont know if it is a big problem to run it on JDK 1.4
> and having still a library attached which shares some classes
> with JDK 1.4. I think it will work or am I wrong?

> And maybe you should think about why you want to use JDK 1.4
> if you have to relay on JDK 1.3 as well. I would prefer to only
> developing for JDK 1.3 if I would be in such situation and only
> check for compatibility once every itteration cycle is nearly
> completed.

> But never the less just play with second and first and if it works
> it should be fine then - I guess.


> Martin (Kersten)

Thanks for the suggestions. I've tried option 2, but attempting to add
folders doesn't work
because the dialog is rooted at the current directory. In other words
given 2 projects, app1 and
app2 at the same level in the directory heirarchy. The source files are
beneath app1, let's say
app1->com->myproduct. The dialog to select the folder containing the source
files for app2 is
rootd at app2 and there's no apparent way to navigate up one level so that
app1->com can be
selected. I also don't see any advanced checkbox so I'm not clear what
you're referring to.

Bob
Re: Multiple projects with same source tree [message #87537 is a reply to message #87465] Thu, 21 August 2003 01:34 Go to previous messageGo to next message
Eclipse UserFriend
> > 2. You share the same src directory for two independent projects.
> > You can add an 'external' source directory by using
> > myProject->Properties->Java Build Path -> Source tab.
> > Use add and check the advanced checkbox.
>
> Thanks for the suggestions. I've tried option 2, but attempting to add
> folders doesn't work
> because the dialog is rooted at the current directory. In other words
> given 2 projects, app1 and
> app2 at the same level in the directory heirarchy. The source files are
> beneath app1, let's say
> app1->com->myproduct. The dialog to select the folder containing the
source
> files for app2 is
> rootd at app2 and there's no apparent way to navigate up one level so that
> app1->com can be
> selected. I also don't see any advanced checkbox so I'm not clear what
> you're referring to.

Bob first what Eclipse version do you use. I am currently using 2.1.0
and here is how it goes:

In the Source tab (JavaBuildPath) click add and type in your new Folder,
then hit the advanced button to see the additional settings. Check
link to file system and then browse button. Now you can select
any directory you want. The folder you create within your eclipse
project is just a folder to keep things more clearly. The project 'folder'
content is the same as the directory you have linked it with.

So your project folder is like a hyper link, it referres to another
directory. Using this your folders can be spread anywhere.


Martin (Kersten)
Re: Multiple projects with same source tree [message #87940 is a reply to message #87537] Thu, 21 August 2003 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Martin Kersten wrote:

> > > 2. You share the same src directory for two independent projects.
> > > You can add an 'external' source directory by using
> > > myProject->Properties->Java Build Path -> Source tab.
> > > Use add and check the advanced checkbox.
> >
> > Thanks for the suggestions. I've tried option 2, but attempting to add
> > folders doesn't work
> > because the dialog is rooted at the current directory. In other words
> > given 2 projects, app1 and
> > app2 at the same level in the directory heirarchy. The source files are
> > beneath app1, let's say
> > app1->com->myproduct. The dialog to select the folder containing the
> source
> > files for app2 is
> > rootd at app2 and there's no apparent way to navigate up one level so that
> > app1->com can be
> > selected. I also don't see any advanced checkbox so I'm not clear what
> > you're referring to.

> Bob first what Eclipse version do you use. I am currently using 2.1.0
> and here is how it goes:

> In the Source tab (JavaBuildPath) click add and type in your new Folder,
> then hit the advanced button to see the additional settings. Check
> link to file system and then browse button. Now you can select
> any directory you want. The folder you create within your eclipse
> project is just a folder to keep things more clearly. The project 'folder'
> content is the same as the directory you have linked it with.

> So your project folder is like a hyper link, it referres to another
> directory. Using this your folders can be spread anywhere.


> Martin (Kersten)
Re: Multiple projects with same source tree [message #87955 is a reply to message #87537] Thu, 21 August 2003 15:46 Go to previous message
Eclipse UserFriend
Martin Kersten wrote:

> > > 2. You share the same src directory for two independent projects.
> > > You can add an 'external' source directory by using
> > > myProject->Properties->Java Build Path -> Source tab.
> > > Use add and check the advanced checkbox.
> >
> > Thanks for the suggestions. I've tried option 2, but attempting to add
> > folders doesn't work
> > because the dialog is rooted at the current directory. In other words
> > given 2 projects, app1 and
> > app2 at the same level in the directory heirarchy. The source files are
> > beneath app1, let's say
> > app1->com->myproduct. The dialog to select the folder containing the
> source
> > files for app2 is
> > rootd at app2 and there's no apparent way to navigate up one level so that
> > app1->com can be
> > selected. I also don't see any advanced checkbox so I'm not clear what
> > you're referring to.

> Bob first what Eclipse version do you use. I am currently using 2.1.0
> and here is how it goes:

> In the Source tab (JavaBuildPath) click add and type in your new Folder,
> then hit the advanced button to see the additional settings. Check
> link to file system and then browse button. Now you can select
> any directory you want. The folder you create within your eclipse
> project is just a folder to keep things more clearly. The project 'folder'
> content is the same as the directory you have linked it with.

> So your project folder is like a hyper link, it referres to another
> directory. Using this your folders can be spread anywhere.


> Martin (Kersten)

Martin,

I'm using the M2 build on Mac OS X. It's apparent that the UI has
changed slightly, but I think
I've figured it out. Of course, now I'm getting a very goofy error about
how the root directory of
all my projects and the directory of one of those projects overlap;-( Not
sure what the error is
trying to tell me, but my directory structure has been the same for 2
months and Eclipse has
never complained before.

Thanks for the assist.

Bob
Previous Topic:External builder tools
Next Topic:link java editor to package explorer
Goto Forum:
  


Current Time: Sat Jul 19 05:38:56 EDT 2025

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

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

Back to the top