if you don't want the dependency included in the war, remove the war.bundle.jar property, or set it to false in your project.xml
<dependency>
<id>jarid</id>
<version>jarversion</version>
<properties>
<war.bundle.jar>true</war.bundle.jar>
</properties>
</dependency>
Steve Davis wrote:
This is just my opinion and I do not mean to be critical, but I found the war plugin not to be of much use. It assumes you want all the .class and dependency jars in your war file; and it will recompile and retest your source. I use Java Web Start which basically requires jar files and I already have the dependent jars already on my J2EE container. So, I just but the xml below in the maven.xml file as a postGoal to the site goal....it gives me control of what I want (need actually) in the war file. The same issues apply to the J2EE plugin and creating EAR files...Just my opinion, I love Maven...
<echo> Building ${maven.war.build.dir}/${pom.id}.war</echo>
<war warfile="${maven.war.build.dir}/${pom.id}.war"
webxml="${maven.war.webxml}">
<fileset dir="${maven.war.src}">
<exclude name="WEB-INF/web.xml"/>
</fileset>
<fileset dir="${maven.war.build.dir}">
<include name="${maven.final.name}.jar"/>
</fileset>
<metainf dir="${basedir}">
<include name="LICENSE.txt"/>
</metainf>
<manifest>
<attribute name="Built-By" value="${user.name}" />
<section name="${pom.package}">
<attribute name="Specification-Title" value="${pom.id}" />
<attribute name="Specification-Version"
value="${pom.currentVersion}" />
<attribute name="Specification-Vendor"
value="${pom.organization.name}" />
<attribute name="Implementation-Title"
value="${pom.package}" />
<attribute name="Implementation-Version"
value="${pom.currentVersion}" />
<attribute name="Implementation-Vendor"
value="${pom.organization.name}" />
</section>
</manifest>
</war>
At 03:29 PM 11/6/2002 +0000, you wrote:
this element should guarantee that the compiled classes are included in the assembled war. You shouldn't have to manually copy class files
<classes dir="${maven.build.dest}">
<exclude name="${maven.war.excludes} " />
</classes>
[EMAIL PROTECTED] wrote:
Hi everbody!
I'm just downloaded and starting to learn maven and I'm right now exploring
the war goal.
The war goal seems to take its point of departure in a directory called
webapp that should reside under src.
However when compiling the default destination is target/classes. When I
use the war goal there seem to be no relation between
the compiled classes and above mentioned source directory and thus the war
file does not contain any classes.
The war:webapp goal creates new directory in the target directory
containing the classes and lib. However the web.xml
file is not copied and with the assumption made above it can not be used
with the war goal (as the war goal works with the src dir).
If one change the property maven.war.src to ${maven.build.dir}/<project
name> the war goal will archive the directory but
duplicate all dependencies as the war.bundle.jar property is set to true.
If I set to false nor jars will be included in the war file.
It seems to me that I must copy all classes to the src directory (maven.xml
-> correct?) to war the application right.
Is this correct or I'm totally lost?
Best regards, Theis.
--
To unsubscribe, e-mail: <mailto:turbine-maven-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:turbine-maven-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-user-help@;jakarta.apache.org>
-- To unsubscribe, e-mail: <mailto:turbine-maven-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:turbine-maven-user-help@;jakarta.apache.org>
