【发布时间】:2016-07-25 11:35:23
【问题描述】:
如果我有 artifactId、groupId 和版本,我可以如何配置 pom.xml,因此 maven 将从 nexus 存储库下载 test.war 文件。 我认为这应该发生在
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
.....
</plugin>
在执行块中。 我已经尝试过了,但没有运气:
<execution>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<artifactId>mytest</artifactId>
<groupId>com.mytest</groupId>
<version>${version}</version>
<type>war</type>
<destFileName>mytest-${version}.war</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
【问题讨论】:
-
我试过了,但是没用!
-
那么请发布您实际尝试过的内容,以便我们缩小故障排除范围,并详细说明此副本的目标是什么(涉及的其他插件/程序?)会有所帮助
-
我更新了问题:)
-
你复制的战争,真的是来自同一个项目吗?我的意思是,它实际上是项目正在生成的那个吗?还有,什么没用?你遇到了什么错误?