Hi,
I'm trying to use the maven assembly plugin for the first time. Essentially, I want to combine the output of the maven assembly plugin with that of the maven jar plugin into the target/classes directory so I can still run the app within Eclipse.
I couldn't find a way to tell the maven jar plugin to collect the output of the maven assembly plugin. Similarly, I found no way to tell assembly plugin to put its output into target/classes.
The closes i cam to a solution was to tell assembly plugin to output its result into classes.dir directory. The suffix 'dir' is the format used while 'classes' is the finalName define in the plugin configuration.
I was hoping that directory-single would force assembly plugin to ignore the format and hence, output in the classes directory. This doesn't work for me; am i misinterpreting the description of this goal?
How would you guys solve this issue? Below is my assembly plugin declaration in the pom as well as my descriptor:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-1</version>
<executions>
<execution>
<id>package</id>
<goals>
<goal>directory-single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>classes</finalName>
<descriptors>
<descriptor>descriptor.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<assembly>
<files>
<file>
<source>${repository-path}</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
<destName>repository.xml</destName>
</file>
</files>
<fileSets>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
</fileSet>
</fileSets>
</assembly>