我想用maven-deploy-plugin部署一个文件。目前,我在我的POM如下:maven-deploy-plugin repository
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>deploy-features-xml</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<repositoryId>${project.distributionManagement.snapshotRepository.id}</repositoryId>
<url>${project.distributionManagement.snapshotRepository.url}</url>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<file>features.xml</file>
</configuration>
</execution>
</executions>
</plugin>
我想基于版本快照和版本库之间切换。如果项目版本为1-SNAPSHOT,则应将文件部署到快照存储库,如果项目是1.0版,则应将文件部署到发布存储库。但是maven-deploy-plugin会对它进行硬编码吗?
很棒的回答。我结束了使用你的解决方案。看起来我们都在上传Karaf features.xml – 2014-11-14 18:14:52