I'm trying to understand how to use the copy-dependencies goal for the
maven-dependency-plugin.  Basically I want to just copy a few dependencies
that are important to a directory, and exclude the rest.  For some reason, I
can't seem to get any of the filters to work, here is an example of the
plugin definition that gives me trouble:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <excludeTypes>zip</excludeTypes>
              <includeTypes>jar</includeTypes>
              <failOnWarning>true</failOnWarning>

<outputDirectory>${project.build.directory}/standalone</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>

If I use the above plugin definition and have dependencies of jar and zip
types, when I run:

mvn clean dependency:copy-dependencies

I will get all the dependencies to show up in my standalone directory,
whether or not they are of type jar or zip.  According to the documentation,
this is how you would do it, but no combination of filtering I've tried has
seemed to work.  Am I doing something wrong?  I'm using version 2.0.9.
Thanks for any help!!

Ryan

Reply via email to