如何在maven中echo一些信息
需求:
需要在maven执行的时候打印一些调试信息。
实现方式:
方案1:基于maven-echo-plugin使用方式如下:
<plugins><plugin><groupId>org.apache.maven.plugin</groupId><artifactId>echo-plugin</artifactId><configuration><info>BUILT %s %s CONFIGURATION</info><elements><param>with</param><param>ALPHA</param></elements></configuration></plugin></plugins>
方案2:基于maven-antrun-plugin实现如下:
<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><version>1.1</version><executions><execution><phase>validate</phase><goals><goal>run</goal></goals><configuration><tasks><echo>Displaying value of pom.xml element</echo><echo>[project.artifactId] ${project.artifactId}</echo></tasks></configuration></execution></executions></plugin></plugins>
?
?
?
1 楼 liubey 2013-12-18 没听过maven-echo-plugin,一般都是用maven-antrun-plugin,长见识了! 2 楼 小网客 2013-12-18 liubey 写道没听过maven-echo-plugin,一般都是用maven-antrun-plugin,长见识了!