You should define a multi-module POM project
1 master pom, packaged as POM, demending on the JAR module and the WAR
modules
<project>
.....
<packaging>pom</packaging>
...
<modules>
<module>jar</module>
<module>war</module>
</modules>
...
</project>
Then in you JAR directory, POM should look like this
<project>
<groupId>XXXX</groupId>
<artifactId>YYY</artifactId>
<packaging>jar</packaging>
......
<parent>
<groupId>here comes your master-pom-reference</groupId>
<artifactId>QQQQQQ</artifactId>
<version>VVVV</version>
</parent>
.....
.....
.....
</project>
Then, crucial step is to build the WAR file with the JAR included
Please note the <Dependency> section to include the JAR
<project>
<parent>
<artifactId>Master pom</artifactId>
<groupId>master pom</groupId>
<version>master pom</version>
</parent>
<groupId>my WAR</groupId>
<artifactId>my WAR</artifactId>
<packaging>war</packaging>
....
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>./</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>Here comes my JAR</groupId>
<artifactId>Here comes my JAR</artifactId>
<version>Here comes my JAR</version>
</dependency>
</dependencies>
</project>
I hope this will help
Thierry
2006/6/6, Martin Goldhahn <[EMAIL PROTECTED]>:
Hi!
The maven-plugin copies the classes of a project to WEN-INF\classes. Is
there a way to tell the plugin to rather package the class files in a
jar and then put them in the WEB-INF\lib folder.
The background for this is: I have another project that uses the WAR as
a dependency. All jar files are included in this project but not the
class files, which are the ones I'm really interested in.
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]