Reputation: 1476
I have a maven project which I compile with Netbeans. I there a way to specify a different build directory where the compiled binary code is copied after compilation?
Upvotes: 29
Views: 64747
Reputation: 159754
Sure. Update your POM with:
<build>
<directory>my_new_build_path</directory>
</build>
Part 2: To specify the output path for a WAR:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<warName>test-web-app</warName>
<outputDirectory>my_output_path</outputDirectory>
</configuration>
</plugin>
Upvotes: 25
Reputation: 17923
<project>
<build>
<outputDirectory>target/classes</outputDirectory>
</build>
</project>
Upvotes: 19