默认情况下,maven 编译器插件将编译后的类放入${project.build.directory}/classes
. 我想把它们放进${project.build.directory}/myclasses
. 该参数-d
更改已编译类的目标。我配置了插件,但出现错误:javac: directory not found: C:\home\target/myclasses
.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<showDeprecation>true</showDeprecation>
<compilerArguments>
<d>${project.build.directory}/myclasses</d>
</compilerArguments>
</configuration>
</plugin>