[英]How to configure the maven-release-plugin in pom to mimic -Dgoals=deploy on the command line
我正在尝试将pom中的maven-release-plugin的perform
mojo配置为仅执行deploy
目标(与默认的deploy site-deploy
)。 在命令行中,它很简单,如下所示:
mvn release:perform -Dgoals=deploy
这是配置pom的尝试,但均失败。
尝试1:
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>perform</goal>
</goals>
<configuration>
<arguments>-Dgoals=deploy -Dgit.tag.previous=</arguments>
</configuration>
</execution>
</executions>
<configuration>
<preparationGoals>clean install</preparationGoals>
<arguments>-Dgit.tag.previous=</arguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
...
</build>
尝试2:
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4</version>
<configuration>
<preparationGoals>clean install</preparationGoals>
<arguments>-Dgoals=deploy -Dgit.tag.previous=</arguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
...
</build>
尽管配置进行了这些更改,但是当我执行mvn release:perform
时,仍然看到以下日志行:
....
[INFO] Executing goals 'deploy site-deploy'...
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building SearchService
[INFO] [INFO] task-segment: [deploy, site-deploy]
[INFO] [INFO] ------------------------------------------------------------------------
...
请注意任务段中的“站点部署”。
很感谢任何形式的帮助!
您的想法太复杂了。 perform#goals描述了您想要的内容。 就是这样
<configuration>
<goals>deploy</goals>
</configuration>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.