On Tue, 28 Mar 2006, KC Baltz wrote:
I think the trick is to unpack the downloaded ZIP into the right directory. I have the following in my pom. Note the <outputDirectory>:
That might look like it works if you only use the exploded war, but the files don't actually make it into the war file. The problem is that the war file is created before the unpacking happens. You can see this in the Maven log:
[INFO] Building war: <path to my war file> [INFO] [dependency:unpack {execution: unpack}] Obviously, the unpacking has to happen before the war is created. ;-) Any other ideas? -- Martin Cooper
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>dependency-maven-plugin</artifactId> <executions> <execution> <id>unpack</id> <phase>package</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>com.mycompany</groupId> <artifactId> web-common </artifactId> <version>1.0-SNAPSHOT</version> <type>jar</type> </artifactItem> </artifactItems> <outputDirectory> ${project.build.directory}/${project.build.finalName} </outputDirectory> </configuration> </execution> </executions> </plugin> -----Original Message----- From: Martin Cooper [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 28, 2006 11:53 AM To: users@maven.apache.org Subject: [M2] Adding downloaded files to a war I'm using dependency:unpack to download and explode a zip from the repo. Now I need to get those files into the war file I'm building, but I'm not seeing a way to do this. The warSourceDirectory allows only a single directory (at least according to the docs), and I already have files in the default location that also need to be included. The scenario here is that I'm using an external DHTML toolkit in my web app, so I need to be able to download that from the repo and add the files to my war. It seems like that would be a fairly common scenario. Ideas, anyone? -- Martin Cooper --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]