我正在使用make-maven-plugin构建一个用C语言编写的软件。我的目标是在运行mvn install
和mvn deploy
时自动将源tarball和二进制工件安装和部署到Maven存储库。我目前的pom.xml看起来像这样:
<project>
<groupId>myGroup</groupId>
<artifactId>myProject</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>make-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<destDir>${project.build.directory}/dest</destDir>
<workDir>${basedir}</workDir>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>package</id>
<phase>package</phase>
<goals>
<goal>make-dist</goal>
</goals>
<configuration>
<skipDist>false</skipDist>
<sourceArchive>${project.name}-${project.version}.tar.bz2</sourceArchive>
<sourceArchivePath>${project.build.directory}</sourceArchivePath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
当我打包项目时,我在目标目录中有以下文件:
运行mvn install
时,创建的源tar球和POM文件将安装到本地maven存储库。如何告诉Maven还安装二进制文件?我不想手工复制它。