Config Maven 2在编译阶段打印出javac命令 [英] Config Maven 2 to print out javac commands during compile phase
问题描述
有没有办法强制Maven 2(> 2.0.10)打印它正在执行的实际javac命令。即使我们使用MAVEN_OPTS提升了最大值,我们仍然会耗尽内存。我希望能够看到正在执行的内存不足的实际命令。
Is there any way to force Maven 2 (>2.0.10) to print the actual javac commands it's executing. We keep running out of memory even though we've bumped up the max using MAVEN_OPTS. I'd like to be able to see the actual command being executed that is running out of memory.
我尝试在pom文件的插件中使用下面的详细设置管理部分,但似乎没有给我javac命令:
I've tried using the verbose setting below in the pom file's plugin management section but that doesn't seem to give me the javac command:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<maxmem>1024m</maxmem>
<compilerArguments>
<verbose/>
</compilerArguments>
</configuration>
</plugin>
推荐答案
您是否尝试使用<$ c $运行Maven c> -X 命令打印调试信息?
Have you tried running Maven with the -X
command to print debugging information?
$ mvn -?
...
-X,--debug Produce execution debug output
然后,maven-javac-plugin应该打印出正在使用的类路径,源目录/路径等。
The maven-javac-plugin should then print out the classpath being used, the source directories/path, etc.
这篇关于Config Maven 2在编译阶段打印出javac命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!