【发布时间】:2012-08-27 22:46:24
【问题描述】:
我有一个使用 maven-compiler-plugin 的 Maven webapp。几天前我可以正常编译和运行应用程序,但是发生了一些事情,现在编译失败并出现以下错误:
[ERROR] Failure executing javac, but could not parse the error:
javac: -endorseddirs requires an argument
Usage: javac <options> <source files>
它与编译器有关,但我无法理解。这是我的 pom.xml(只是插件):
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
</executions>
</plugin>
</plugins>
我尝试了一些解决方案,例如this。
【问题讨论】:
标签: java maven maven-compiler-plugin