1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
Description: classpath and parent project config
* configuration from parent project
* maven-jar-plugin adds Class-Path to MANIFEST.MF
Author: Eugene Zhukov <jevgeni.zh@gmail.com>
Last-Update: <2013-05-21>
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,10 @@
</site>
</distributionManagement>
+ <properties>
+ <configs.path>target/config</configs.path>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -56,6 +60,12 @@
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>${configs.path}</directory>
+ <targetPath>META-INF</targetPath>
+ </resource>
+ </resources>
<pluginManagement>
<plugins>
<plugin>
@@ -82,6 +92,29 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
+ </configuration>
+ <version>2.2</version>
+ </plugin>
</plugins>
</build>
|