我正在使用以下 Maven 文件。他仅将 jar(artifact-1.0.jar) 发布到存储库。但我也想发布 zip 文件(project1.zip)。任何人都可以帮忙解决这个问题吗?
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.java</groupId>
<artifactId>artifact</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>project1</name>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>create-archive-in-archive-ant</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target name="bundle">
//
//ant task to create zip file
//
<zip zipfile="target/project1.zip" basedir="${target-content}" />
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>