Maven How To Extract Jar Files Or Dependency

Do you like this?

Summary:
This short example shows you the snippet of code that you can insert into your pom.xml so that you can extract JAR libraries files from command line.


Content:

<build>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-dependency-plugin</artifactId>
		<executions>
			<execution>
				<id>copy</id>
				<phase>package</phase>
				<goals>
					<goal>copy-dependencies</goal>
				</goals>
				<configuration>
					<includeScope>compile</includeScope>
					<outputDirectory>
						${project.build.directory}/libs
					</outputDirectory>
				</configuration>
			</execution>
		</executions>
	</plugin>
</build>

 
comments powered by Disqus