I have a Maven project that is a child project. It has many sibling projects and the job of this project is to get resources from the siblings and package them in a zip file using the antrun plugin.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>SystemOfRegistries</artifactId>
<groupId>someGroup</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>someGroup</groupId>
<artifactId>deploy-data</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<!--
Place any Ant task here. You can add anything you can add
between <target> and </target> in a build.xml.
-->
<zip destfile="${project.build.directory}/${build.finalName}.zip"
whenempty="fail">
<zipfileset dir="${project.parent.basedir}/build/AG" prefix="ag"/>
</zip>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This worked fine for building the zip. However, the problem is that the zip is not the artifact of the build. And, thus there is no link in Hudson to download it.
I would either like to figure out how to get Hudson to recognize this as an artifact of Maven, or get Maven to realize that the ZIP is the artifact. (I used to have packaging element missing and then I would get an unwanted JAR as artifact).