Hi Stephen,
Thank you for the explanation. The documentation is not clear about which
dependency the plugin will work on (from the repository or produced by the
build). For those of you interested in the configuration that fixed my issue
here it go:
<execution>
<id>copy-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<excludeArtifactIds>floggy-persistence-weaver</excludeArtifactIds>
<outputDirectory>${basedir}/target/site/demo</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
<execution>
<id>unpack</id>
<phase>process-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>floggy-persistence-weaver</includeArtifactIds>
<outputDirectory>${basedir}/target/site</outputDirectory>
<includes>schema/*</includes>
</configuration>
</execution>
Thanks!
Thiago Moreira
On Tue, Jan 26, 2010 at 3:18 PM, Stephen Connolly <
[email protected]> wrote:
> dependency:unpack works on artifacts that are not produced as part of your
> build and are not listed as dependencies, as a result you must specify the
> full GAV coordinates to resolve the artifact, and if you are foolish enough
> to use it for an artifact that is produced as part of the same build that
> your project is part of, then you will not be able to release that
> multi-module project with the maven-release-plugin.
>
> dependency:unpack-dependencies works on artifacts that are produced in the
> reactor (i.e. all the projects in the multi-module build that your project
> is part of).
>
> This same pairing exists with dependency:copy vs
> dependency:copy-dependencies
>
> -Stephen
>
> 2010/1/26 Thiago Moreira (timba) <[email protected]>
>
> > Hi there,
> >
> > I'm facing a strange behavior with the dependency plugin. Here is my
> > configuration
> >
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-dependency-plugin</artifactId>
> > <version>2.1</version>
> > <executions>
> > <execution>
> > <id>copy-dependencies</id>
> > <phase>process-sources</phase>
> > <goals>
> > <goal>copy-dependencies</goal>
> > </goals>
> > <configuration>
> > <outputDirectory>${basedir}/target/site/demo</outputDirectory>
> > <overWriteReleases>false</overWriteReleases>
> > <overWriteSnapshots>true</overWriteSnapshots>
> > <overWriteIfNewer>true</overWriteIfNewer>
> > <excludeTransitive>true</excludeTransitive>
> > </configuration>
> > </execution>
> > <execution>
> > <id>unpack</id>
> > <phase>process-sources</phase>
> > <goals>
> > <goal>unpack</goal>
> > </goals>
> > <configuration>
> > <artifactItems>
> > <artifactItem>
> > <groupId>net.sourceforge.floggy</groupId>
> > <artifactId>floggy-persistence-weaver</artifactId>
> > <outputDirectory>${basedir}/target/site</outputDirectory>
> > <includes>schema/*</includes>
> > </artifactItem>
> > </artifactItems>
> > </configuration>
> > </execution>
> > </executions>
> > </plugin>
> >
> > For the copy-dependencies execution it works fine but for the unpack
> > execution it claims that cannot revolve the dependency
> > net.sourceforge.floggy:floggy-persistence-weaver BUT this dependency is
> > declared at dependencies section and it is a sibling project of the
> current
> > one in a multi module project. The only difference that I can observe is
> > that in one execution (unpack ID) I made an explicit reference to the
> > dependency.
> > Any clue why? Any workaround?
> >
> > Thanks
> >
> > Thiago Moreira
> >
>