java - Force Maven 3 to copy 'provided' dependencies -
i use copy-dependencies goal copy dependencies current artifact. doesn't copy dependencies scope 'provided'. how fix it?
the xml configuration standard:
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.0.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <executions> <execution> <id>copy-dependencies</id> <phase>install</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputdirectory>lib</outputdirectory> <overwritereleases>true</overwritereleases> <overwritesnapshots>true</overwritesnapshots> <overwriteifnewer>true</overwriteifnewer> <excludeartifactids>project-services</excludeartifactids> </configuration> </execution> </executions> </plugin> </plugins> <finalname>project-web</finalname> </build>
why want this? because have support both ant , maven builds working. therefore, want copy dependencies separate directory running mvn install -o. in ant build.xml include path directory classpath. after ant builds ear file , includes whole lib directory withoud system tools.jar , other 'provided' jars. version of apache maven 3.0.3
as documented plugin use includescope:
http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html#includescope
edit:
why want this? because have support both ant , maven builds working.
consider use ivy manage dependencies ant: http://ant.apache.org/ivy/
here post how can configure ivy connect nexus:
Comments
Post a Comment