Murray,
You need to use dependency scope "provided" to declare dependencies
provided by j2ee container
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
You can read more about maven dependency management here
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Murray Waters wrote:
Hi all,
Was wondering how you specify compile time dependencies but have those
jars excluded from the final build?
I want to have a dependency on the tomcat runtime libraries. I can do
this in eclipse by clicking properties --> java build path --> Add Library.
Eclipse then stops complaining about being unable to find (eg)
javax.servlet.http etc, and when m2eclipse WTP plugin deploys to the
server all is well.
I do not want these dependencies included in my war because they are
already present in my tomcat/lib directory and I have had big troubles
when trying to include them because of this.
However when i run the compiler:compile goal manually, it now complains
about not being able to locate these classes.
So I have a situation where I can deploy my app with the WTP plugin, but
cant run the maven compile goal, and what i want is to have the jars
present at compile time but not present in my war. Im still new to maven
- there must be a way to do this.
Can anyone help?
Thanks
Murray.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email