I am trying to write pom.xml that will allow me to run the command locally and get all the dependencies that are in my jruby Rails application. I see two different configurations, and I'm not quite sure what to use (since I'm not a Java person)
Firstly, for many Pom, I see only the tag under the root pom.xml, which lists all the dependencies. However, this does not have any information about where they are stored, etc., so I feel that this is not what I want (I need to copy them to the lib dir rails)
The second option that I see in mvn docs is to use the maven-dependency plugin, which is more like what I'm looking for. I assume my outputDirectory will be something like lib
Therefore, I do not quite understand what the purpose of the first list of dependencies is for. All I want is mvn to copy my banks locally (and then, eventually, when my CI server is deploying). Can someone point me in the right direction?
First option
<project> <dependencies> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.4</version> </dependency> </project>
Second option
<project> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <configuration> <artifactItems> <artifactItem> <groupId>[ groupId ]</groupId> <artifactId>[ artifactId ]</artifactId> <version>[ version ]</version> <type>[ packaging ]</type> <classifier> [classifier - optional] </classifier> <overWrite>[ true or false ]</overWrite> <outputDirectory>[ output directory ]</outputDirectory> <destFileName>[ filename ]</destFileName> </artifactItem> </artifactItems> </configuration> </plugin> </plugins> </build> </project>
source share