I'm working on having all the configuration of a project managed by Maven instead of eclipse and I got stuck when I tried to change the Source from there.
This is what I have:
And this is what I want:
How can I modify this using maven?
Thanks
I'm working on having all the configuration of a project managed by Maven instead of eclipse and I got stuck when I tried to change the Source from there.
This is what I have:
And this is what I want:
How can I modify this using maven?
Thanks
With maven, you can change all this configuration in the <build>
tag :
<build>
<directory>target</directory>
<outputDirectory>target/classes</outputDirectory>
<finalName>${artifactId}-${version}</finalName>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
That said, I think it would be better to copy your source files as maven intend it to avoid the hassle, from src/
to src/main/java
or src/main/resources
depending on the type of file.