I would like maven to store the dependent jars in the project specific lib folder instead of in the default MyUser/.m2/repository/. Not everybody has internet access when he gets the project, and copying the global local repository seems like a less-than-ideal solution.
How do I persuade maven to store and use these dependencies in a local, relative, project specific folder?
Seems my question is a rephrased version of this Stackoverflow question
I did something like this:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${mvn-dependency-plugin.version}</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/${local-lib-dir}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<build>
The only downside is, that eclipses maven still refer to the jars in the local repository.