我不知道如何控制将哪些工件部署到我们当地的公司 Nexus。我们有一个软件产品,它具有在打包过程中构建的安装文件,但是 maven 没有部署它们。如何配置存储哪些工件供人们访问?我错过了部署版本的一些基本点吗?
问问题
48 次
1 回答
0
The trick was to use the build-helper-maven-plugin. Be careful with the classifiers and types, because the thing renames your files assuming it knows what you want. I hope to write code that allows me to punch maven in its bits through the screen.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>install-installation</id>
<phase>install</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${basedir}/target/${project.artifactId}-${project.version}-Setup.exe</file>
<classifier>Setup</classifier>
<type>exe</type>
</artifact>
<artifact>
<file>${basedir}/target/${project.artifactId}-${project.version}-Linux-x86-Install</file>
<classifier>Linux-x86</classifier>
<type>Install</type>
</artifact>
<artifact>
<file>${basedir}/target/${project.artifactId}-${project.version}-Linux-x86_64-Install</file>
<classifier>Linux-x86_64</classifier>
<type>Install</type>
</artifact>
<artifact>
<file>${basedir}/target/${project.artifactId}-${project.version}.zip</file>
<type>zip</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
于 2013-09-25T12:23:44.147 回答