Last active
March 10, 2019 12:22
-
-
Save ezhov-da/69971a92decae71e30ae5e00384e4ac5 to your computer and use it in GitHub Desktop.
java maven сборка проекта с библиотеками в отдельную папку
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.mkyong.com/maven/how-to-create-a-manifest-file-with-maven/ | |
<pre> | |
<directory.extended.library>lib</directory.extended.library> | |
</pre> | |
[code:]xml[:code] | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.4</version> | |
<configuration> | |
<archive> | |
<manifest> | |
<addClasspath>true</addClasspath> | |
<mainClass>ru.ezhov.testmvn.Test</mainClass> | |
<classpathPrefix>${directory.extended.library}/</classpathPrefix> | |
</manifest> | |
</archive> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version>2.5.1</version> | |
<executions> | |
<execution> | |
<id>copy-dependencies</id> | |
<phase>package</phase> | |
<goals> | |
<goal>copy-dependencies</goal> | |
</goals> | |
<configuration> | |
<outputDirectory> | |
${project.build.directory}/${directory.extended.library}/ | |
</outputDirectory> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
[/code] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment