You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Todd Nine <to...@spidertracks.com> on 2010/10/28 06:07:15 UTC
Setting class path with Shade plugin
Hi all,
We're creating an uber jar using the shade plugin. This is working
well, but I'm having trouble getting the class path set properly in my
manifest. Our deployment directory structure is as follows.
/appdir/service.jar
/appdir/conf/log4j.properties
/appdir/conf/zookeeper.properties
etc etc.
All our class files will be in the service.jar that is created by shade.
All the configuration information is loaded as a resource from the
classpath, so I need any item in ./conf to also be in the classpath.
Below is my configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<minimizeJar>true</minimizeJar><!-- may not work, test this -->
<finalName>systemservice</finalName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.spidertracks.aviator.systemservice.ServiceRunner</mainClass>
<manifestEntries>
<Class-Path>./conf/</Class-Path>
<Version>${version}</Version>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
Any help would be greatly appreciated. I've tried ./conf, conf, conf/,
and conf/*. None seem to work.
Thanks,
Todd