On Thu, 2006-03-09 at 09:49 +0100, Jochen Wiedmann wrote: > [I posted this question a while ago without replies, so I try to repost.] > > Hi, > > I have a multiproject. One of the subprojects generates several > non-standard artifacts: Zip, files, tar.gz files, and the like. > > Another subproject is generating a war file. The generated war file > should contain the non-standard artifact generated by the other > subproject. > > How do I do that?
You might like to look at the dependency-maven-plugin from codehaus: http://mojo.codehaus.org/dependency-maven-plugin/ It allows a particular dependency (eg a jar) to be fetched and stored into the target directory as part of the build process. If you pick the right phase and place to do the copying then I expect the dependency will end up inside the warfile. The dependency plugin is available on ibiblio so you just need to add ibiblio as a known repository: <repositories> <repository> <id>Ibiblio</id> <url>http://www.ibiblio.org/pub/packages/maven2</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>Ibiblio</id> <url>http://www.ibiblio.org/pub/packages/maven2</url> </pluginRepository> </pluginRepositories> then do something like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>dependency-maven-plugin</artifactId> <executions> <execution> <id>unpack-dependencies</id> <phase>process-resources</phase> <goals> <goal>unpack</goal> </goals> </execution> </executions> <configuration> <artifactItems> <artifactItem> <groupId>org.apache.commons.logging</groupId> <artifactId>commons-logging-core</artifactId> <version>0.1-SNAPSHOT</version> <type>jar</type> <outputDirectory>${project.build.outputDirectory}</outputDirectory> </artifactItem> </artifactItems> </configuration> </plugin> The above actually *unpacks* the dependency which may not be what you want; the "copy" goal downloads without unpacking which might be what you're looking for. Cheers, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]