我尝试使用maven-antrun-plugin属性。 但在某些情况下似乎被阻止了(我有similar problem with exec-maven-plugin:
我需要发布
这是我的pom.xml的相关部分:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>initialisation</id>
<phase>initialize</phase>
<configuration>
<tasks>
<exec dir="${project.basedir}"
executable="${project.basedir}/livraison/outils/0_init_livraison.ksh"
failonerror="false"
resultproperty="sortieInitScript">
<arg line="${project.name} ${project.version} ${ancienneVersion}" />
<redirector errorproperty="redirector.err" />
</exec>
<echo message="Resultat ${sortieInitScript}, Message ${redirector.err}"/>
<input message=" Souhaitez-vous Continuer ? "
validargs="o,n"
addproperty="procedureChoix" />
<fail message="ARRET VOLONTAIRE DE LA PROCEDURE !!">
<condition>
<equals arg1="${procedureChoix}" arg2="n" />
</condition>
</fail>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
这是我的0_init_livraison.ksh的相关部分:
...
echo -e "\n| FIN DU SCIPT "
echo -e " ============================================================"
echo "warning" 1>&2
当我执行sudo mvn包时,我的控制台的最后几行:
[exec] | FIN DU SCIPT
[exec] ============================================================
[exec]
[echo] Resultat 0, Message warning
Souhaitez-vous Continuer ? (o, n)
o
[INFO] Executed tasks (<- this last line doesn't appear with mvn release:prepare. But it appears with mvn package)
...
我是否会错过发布命令?
感谢阅读:)