I have a pom.xml with various dependencies included in it.

I want, in the output JAR file, to include a directory that contains a
subsection of the repository from those dependencies.

I can nearly get there, by using the assembly descriptor (at the end), but I
have 2 problems

1) I want to use the directory the M2 repo would use - the example below is
creating a directory com.cswgroup.kms.kes.config when I really want
com/cswgroup/kms/kes/config - is there a way of getting at ${groupId} with /
separators ?

2) I would like to include the .pom descriptors as well.

Is there a way of specifying this with the assembly plugin, or should I look
at rolling my own MOJO ?


<assembly>
 <id>directory</id>
 <formats>
   <format>jar</format>
  </formats>

   <dependencySets>
     <dependencySet>
       <includes>
         <include>com.cswgroup.kms.kes.config:config-kms</include>
       </includes>

<outputFileNameMapping>${groupId}/${artifactId}/${version}/${artifactId}-${version}.${extension}</outputFileNameMapping>
       <outputDirectory>/</outputDirectory>
       <unpack>false</unpack>
       <scope>runtime</scope>
     </dependencySet>
   </dependencySets>

</assembly>

Reply via email to