<?xml version="1.0" encoding="UTF-8"?>
<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>demo</groupId>
  <artifactId>sample-zip-module</artifactId>
  <version>1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <properties>
    <c>demo</c>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <configuration>
              <target>
                <mkdir dir="${project.build.directory}"/>
                <zip destfile="${project.build.directory}/${project.build.finalName}-demo.zip" basedir="${basedir}" includes="*.xml"/>
                <attachartifact file="${project.build.directory}/${project.build.finalName}-demo.zip" classifier="${c}" type="zip" />
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
