用Maven打印出配置变量

配置pom文件时候有时候需要调试变量可以使用maven-antrun-plugin来做这事


将下面的代码放到<build>当中

               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.5</version>
                    <configuration>
                        <target>
                            <echo message="hello ant, from Maven!" />
                            <echo>Maybe this will work?</echo>
                        </target>
                    </configuration>
                </plugin>


控制台运行mvn antrun:run

即可调试变量.

猜你喜欢

转载自tobato.iteye.com/blog/2232322