To Maven gurus out there: I'm trying to package non-java project artifacts (.NET) into a single zip file. I'm having 2 problems:
If I change packaging in my POM to zip <packaging>zip</packaging>
, I get this error message: [INFO] Cannot find lifecycle mapping for packaging: 'zip'.
Component descriptor cannot be found in the component repository: org.apache.mav
en.lifecycle.mapping.LifecycleMappingzip.
OK, no big deal - I changed it to <packaging>pom</packaging>
to get rid of useless jar that is otherwise created in the target dir
My main problem is that files I'm packaging into ZIP are nested within few directories but I need put these into top directory of ZIP. Here's my assembly file:
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${basedir}/${project.artifactId}</directory>
<includes>
<include>**/Bin/Release/*.dll</include>
<include>**/Bin/Release/*.pdb</include>
</includes>
</fileSet>
</fileSets>
</assembly>
When I run this - I'll get ZIP file but files will be nested starting with C:\ followed by full path. To give you idea - project dumps it's binaries into the following structure
ProjectFoo\ProjectFoo\subproject1\Bin\Release\foo.dll
and I need ZIP\foo.dll
Here's assembly plugin configuration:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
Maybe I just need to use antrun and execute ant zip task?