2
我想在POM配置行家釋放小插件的perform
魔力到僅執行deploy
上目標(而不是默認的deploy site-deploy
)。在命令行中,這是因爲以下簡單:如何POM配置行家釋放小插件來模仿-Dgoals =部署命令行
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] ------------------------------------------------------------------------
...
請注意任務段中的「站點部署」。
任何幫助非常感謝!
對於那些誰明確要求,我用羅伯特Scholte的答案。也就是說,我從標記中刪除了-Dgoals = deploy並添加了部署 標記。乾杯! –
bobbyberg