Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Including another projects jars(Problems arising from including another projects jars)
Including another projects jars [message #492356] Tue, 20 October 2009 04:06 Go to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 806
Registered: July 2009
Senior Member
Just now I ran -again- into a situation where one of the included projects had an older version of a jar and that caused me a lot of effort to find.

If I include a project in another project, I would like to NOT automatically include all the jars of the included project; but only its java classes.

My argumentation for this is: any project will normally produce a jar that can be included in other projects. That jar does not contain any required jars, just the class files of that one project. If I remove that jar from my buildpath and add the project instead, I expect the same behavior: not adding of any required jars from that project, just the class files.

Is this possible?
Re: Including another projects jars [message #492476 is a reply to message #492356] Tue, 20 October 2009 10:55 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 242
Registered: July 2009
Senior Member
Tom Eugelink wrote:
> If I include a project in another project, I would like to NOT
> automatically include all the jars of the included project; but only its
> java classes.
[...]
> Is this possible?

Project Properties -> Java Build Path -> Order & Export?

Brian.
Re: Including another projects jars [message #492482 is a reply to message #492476] Tue, 20 October 2009 11:10 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 806
Registered: July 2009
Senior Member
Brian de Alwis wrote on Tue, 20 October 2009 10:55
Project Properties -> Java Build Path -> Order & Export?
Brian.


With that I can determine the sequence in which the jars and projects are placed on the classpath, not prevent indirect jars.

It is not that I do not know how to configure it correctly, it is that too often I find Eclipse suddenly picks a wrong JAR and I waste a lot of time figuring it out. (Today it was an old version of Eclipselink in some obscure util project.)

As said; including a project is IMHO like including that project's deviverable; one single jar.
Re: Including another projects jars [message #492539 is a reply to message #492482] Tue, 20 October 2009 12:49 Go to previous messageGo to next message
Eclipse User
Originally posted by: wegener.cboenospam.com

"Tom Eugelink" <tbee@tbee.org> wrote in message
news:hbkjtj$sqb$1@build.eclipse.org...
> Brian de Alwis wrote on Tue, 20 October 2009 10:55
> > Project Properties -> Java Build Path -> Order & Export?
> > Brian.
>
>
> With that I can determine the sequence in which the jars and projects are
placed on the classpath, not prevent indirect jars.
>
> It is not that I do not know how to configure it correctly, it is that too
often I find Eclipse suddenly picks a wrong JAR and I waste a lot of time
figuring it out. (Today it was an old version of Eclipselink in some obscure
util project.)
>
> As said; including a project is IMHO like including that project's
deviverable; one single jar.

Order and Export is used to set which jars are seen by dependent projects.
If the jar is checked, it is exported and dependent projects will see it.
If it is unchecked, it is not exported and it won't be seen by dependent
projects.
Re: Including another projects jars [message #492541 is a reply to message #492539] Tue, 20 October 2009 13:11 Go to previous message
Tom Eugelink is currently offline Tom Eugelink
Messages: 806
Registered: July 2009
Senior Member
Eclipse User wrote on Tue, 20 October 2009 12:49
Order and Export is used to set which jars are seen by dependent projects.
If the jar is checked, it is exported and dependent projects will see it.
If it is unchecked, it is not exported and it won't be seen by dependent
projects.


Aha, the Order and Export (only now actually seeing that last word) of the other side!

Now that is new, I'll give it a try!
Previous Topic:Making indentation nice and neat
Next Topic:Creating a wrapper class code template
Goto Forum:
  


Current Time: Mon Apr 21 00:41:49 EDT 2014

Powered by FUDForum. Page generated in 0.15264 seconds