Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Library dependencies
Library dependencies [message #134492] Tue, 23 August 2005 18:46 Go to next message
Eclipse UserFriend
Originally posted by: schulten.escalon.de

I'm trying to use spring from a Dynamic Web Application and I have
difficulties to get all needed jars in .deployables.

I've added spring.jar to the build path, but it is not added to
..deployables. Spring is no jar dependency from another project, so I
cannot configure it as jar dependency.

Is a dynamic web project not supposed to put all libraries needed by the
project into deployables?

How should I proceed to get spring.jar into my web project?

Regards,
D'
Re: Library dependencies [message #134506 is a reply to message #134492] Tue, 23 August 2005 22:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thisisnot.mymail.com

Did you put it in WEB-INF/lib/ ?

Dietrich Schulten wrote:
> I'm trying to use spring from a Dynamic Web Application and I have
> difficulties to get all needed jars in .deployables.
>
> I've added spring.jar to the build path, but it is not added to
> .deployables. Spring is no jar dependency from another project, so I
> cannot configure it as jar dependency.
>
> Is a dynamic web project not supposed to put all libraries needed by the
> project into deployables?
>
> How should I proceed to get spring.jar into my web project?
>
> Regards,
> D'
Re: Library dependencies [message #134700 is a reply to message #134492] Wed, 24 August 2005 16:09 Go to previous messageGo to next message
Lawrence Mandel is currently offline Lawrence MandelFriend
Messages: 486
Registered: July 2009
Senior Member
Adding a library to the build path is akin to making it available on the
classpath when you run your application. For example, if you're deploying
to Tomcat, you might choose to add a library to the build path if Tomcat
has been configured with a global version of the library and you do not
need to bundle it with your application. If this isn't the case and you
need to bundle it with your app you need to add it to the WEB-INF/lib
folder.

Lawrence
Re: Library dependencies [message #134725 is a reply to message #134700] Wed, 24 August 2005 18:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erickson_d.yahoo.removethis.com

I can see the rationale here, since WTP might be called on to actually
perform a build. But a requirement to physically copy a library into a
project conflicts with our company's practice of keeping one copy of a
library to be shared among dozens of independent projects.

Is there a way to add some sort of link to the /WEB-INF/lib directory
rather than actually copying a JAR? This would tell WTP where to find
the actual JAR file when building a WAR, but let people continue to
manage their external dependencies ... externally.

lmandel@ca.ibm.com wrote:
> Adding a library to the build path is akin to making it available on the
> classpath when you run your application. For example, if you're deploying
> to Tomcat, you might choose to add a library to the build path if Tomcat
> has been configured with a global version of the library and you do not
> need to bundle it with your application. If this isn't the case and you
> need to bundle it with your app you need to add it to the WEB-INF/lib
> folder.
>
> Lawrence
Re: Library dependencies [message #134759 is a reply to message #134725] Wed, 24 August 2005 19:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thisisnot.mymail.com

Yes, some sort of a library manager like the user libraries could be
more intelligent.

Doug Erickson wrote:
> I can see the rationale here, since WTP might be called on to actually
> perform a build. But a requirement to physically copy a library into a
> project conflicts with our company's practice of keeping one copy of a
> library to be shared among dozens of independent projects.
>
> Is there a way to add some sort of link to the /WEB-INF/lib directory
> rather than actually copying a JAR? This would tell WTP where to find
> the actual JAR file when building a WAR, but let people continue to
> manage their external dependencies ... externally.
>
> lmandel@ca.ibm.com wrote:
>
>> Adding a library to the build path is akin to making it available on
>> the classpath when you run your application. For example, if you're
>> deploying to Tomcat, you might choose to add a library to the build
>> path if Tomcat has been configured with a global version of the
>> library and you do not need to bundle it with your application. If
>> this isn't the case and you need to bundle it with your app you need
>> to add it to the WEB-INF/lib folder.
>>
>> Lawrence
Re: Library dependencies [message #134904 is a reply to message #134725] Thu, 25 August 2005 14:48 Go to previous message
Greg A Seguin is currently offline Greg A SeguinFriend
Messages: 9
Registered: July 2009
Junior Member
What we actually need is a function akin to the Library Export for
projects.
This could be implemented as a tab inside of the Java Build Path property
page called "deployed libs" with checkboxes next to all of the libs.

This would allow you to add libraries to a single project. This opens up
a seperate issue, that of "library projects". Although these are relative
more to JDT than WTP, they become more important for WTP.

-
A quick way of solving library issues within some companies is to share a
common directory with many libraries. You use source controle to get the
latest version of all libraries at once. This guarantees that two
in-house projects or more are not using the same library. This also
reduces sync-time with large libraries over slow networks.

Having a specific <java> project type that does not expect source code,
but only libraries could simplify this.
-

Another problem that this doesn't solve is that some libraries you want in
your app server, some in your ear, and some in your war. Your Ear project
depends on your war, but not the other way around, so adding a library to
your EAR project or to your server does not help eclipse compile your war.

You either have to make a round trip dependency, or add the lib manually
to the project. There should be an intrinsic way for the war to say "I am
part of this EAR, the EAR has the lib, I have the lib".

Doug Erickson wrote:

> I can see the rationale here, since WTP might be called on to actually
> perform a build. But a requirement to physically copy a library into a
> project conflicts with our company's practice of keeping one copy of a
> library to be shared among dozens of independent projects.

> Is there a way to add some sort of link to the /WEB-INF/lib directory
> rather than actually copying a JAR? This would tell WTP where to find
> the actual JAR file when building a WAR, but let people continue to
> manage their external dependencies ... externally.

> lmandel@ca.ibm.com wrote:
>> Adding a library to the build path is akin to making it available on the
>> classpath when you run your application. For example, if you're deploying
>> to Tomcat, you might choose to add a library to the build path if Tomcat
>> has been configured with a global version of the library and you do not
>> need to bundle it with your application. If this isn't the case and you
>> need to bundle it with your app you need to add it to the WEB-INF/lib
>> folder.
>>
>> Lawrence
Previous Topic:WTP 0.7 WebApp importing POJO from another project module name funkiness?
Next Topic:JUnit Tests from .deployables
Goto Forum:
  


Current Time: Sat Oct 19 22:12:26 GMT 2024

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

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

Back to the top