简体   繁体   中英

Config Maven 2 to print out javac commands during compile phase

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.

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>

Have you tried running Maven with the -X command to print debugging information?

$ mvn -?
...
 -X,--debug      Produce execution debug output

The maven-javac-plugin should then print out the classpath being used, the source directories/path, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM