Search code examples
mavenpom.xmljava-service-wrapper

What maven 3.0.4 pom will write a dependency artifact including version into a Tanuki Service Wrapper conf file


IS there a way to get Maven 3.0.4 to output a dependency artifact's name and version into a text resource?

A specific use case is: The Tanuki Service Wrapper (wrapper.exe) supports launching a Java Virtual Machine process (java.exe) configured by a text file (.conf file) that contains lines like

wrapper.java.classpath.1=./somejar1
wrapper.java.classpath.2=./somejar2
wrapper.java.classpath.3=./somejar3

We're using the maven-assembly-plugin to create a distribution zip for artifact X that will contain a Tanuki wrapper.exe .conf file. We need the .conf file's classpath entries to contain all the dependencies of X. For example, X depends on log4j. We would like Maven to update the .conf file to be something like

wrapper.java.classpath.1=./log4j-1.2.17.jar

The closest stackoverflow answer I've found is Changing java service wrapper conf file property inside a pom.


Solution

  • Have you ever taken a look into the appassembler-maven-plugin ? Depending on version your are using of the Tanuku Service Wrapper ? in Particular http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/usage-jsw.html