Sometimes you need to download jars, which were in your "dependencies" block into specified directory.
For this task you may use this approach: in "plugins" part of your pom.xml add such block:
author - Mikhail Sidelnikov
email: sidelnikovmike@gmail.com
For this task you may use this approach: in "plugins" part of your pom.xml add such block:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
This will copy all jars into target/lib folder after run command : mvn generate-sources
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${path_to_file}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
After this, you can path patameter "path_to_file" from command line : mvn -Dpath_to_file=your_path generate-sources
author - Mikhail Sidelnikov
email: sidelnikovmike@gmail.com