mvn dependency:tree
使用树的方式 察看 maven 的lib 依赖关系
mvn dependency:sources
下载依赖的 library 源代码
mvn ant:ant
根据pom 产生 ant build xml 文件。
在编译时调用 ant 的 target 可以使用下面的方式:
<plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>build-config-files</id> <phase>compile</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <property name="compile_classpath" refid="maven.compile.classpath"/> <property name="runtime_classpath" refid="maven.runtime.classpath"/> <property name="test_classpath" refid="maven.test.classpath"/> <property name="plugin_classpath" refid="maven.plugin.classpath"/> <ant antfile="${basedir}/build.xml"> <target name="compile"/> </ant> </tasks> </configuration> </execution> <execution> <id>test-compile-files</id> <phase>test-compile</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <property name="compile_classpath" refid="maven.compile.classpath"/> <property name="runtime_classpath" refid="maven.runtime.classpath"/> <property name="test_classpath" refid="maven.test.classpath"/> <property name="plugin_classpath" refid="maven.plugin.classpath"/> <ant antfile="${basedir}/build.xml"> <target name="compile-tests"/> </ant> </tasks> </configuration> </execution> </executions> </plugin>