maven-compiler-plugin how to change the classes destination directory
maven
Solution
You should be able to do it like this:
<build>
<outputDirectory>${project.build.directory}/myclasses</outputDirectory>
</build>
Problem
By default the maven compiler plugin put the compiled classes into `${project.build.directory}/classes`. I want to put them into `${project.build.directory}/myclasses`. The argument `-d` changes the destination of the compiled classes. I configured the plugin but I got an error: `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> ```