Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/69971a92decae71e30ae5e00384e4ac5 to your computer and use it in GitHub Desktop.
Save ezhov-da/69971a92decae71e30ae5e00384e4ac5 to your computer and use it in GitHub Desktop.
java maven сборка проекта с библиотеками в отдельную папку
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