Well, one typical usage of the plugin is to just use
dependency:copy-dependencies just so you have all your dependencies
locally, so you can include them in an assembly for distribution, etc.
-Stephen
On 3/28/06, Martin Cooper <[EMAIL PROTECTED]> wrote:
> OK, I got this to work by changing:
>
> <phase>package</phase>
>
> to:
>
> <phase>process-resources</phase>
>
> that phase being the only one that made any sense at all and that comes
> before package, but it feels like a hack. If there's a better way, I'm all
> ears.
>
> Also, the whole dependency plugin seems kinda pointless when it's used in
> its default phase, since the rest of the packaging is going to be all over
> before it's ever invoked. Anyone have any insight as to why it's the way
> it is?
>
> --
> Martin Cooper
>
>
> On Tue, 28 Mar 2006, Martin Cooper wrote:
>
> >
> >
> > 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: [email protected]
> >> 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]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Stephen Duncan Jr
www.stephenduncanjr.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]