Library dependencies [message #134492] |
Tue, 23 August 2005 14:46  |
Eclipse User |
|
|
|
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 #134904 is a reply to message #134725] |
Thu, 25 August 2005 10:48  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.27728 seconds