Merge pull request #4952 from asturcon/tutorials/mvnMultipleSrc
BAEL-1834 - Maven Project with Multiple src Directories
This commit is contained in:
commit
977f4e402a
|
@ -94,6 +94,24 @@
|
||||||
</filesets>
|
</filesets>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>${maven.build.helper.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src/main/another-src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
@ -102,6 +120,7 @@
|
||||||
<maven.failsafe.version>2.21.0</maven.failsafe.version>
|
<maven.failsafe.version>2.21.0</maven.failsafe.version>
|
||||||
<maven.verifier.version>1.1</maven.verifier.version>
|
<maven.verifier.version>1.1</maven.verifier.version>
|
||||||
<maven.clean.version>3.0.0</maven.clean.version>
|
<maven.clean.version>3.0.0</maven.clean.version>
|
||||||
|
<maven.build.helper.version>3.0.0</maven.build.helper.version>
|
||||||
<resources.name>Baeldung</resources.name>
|
<resources.name>Baeldung</resources.name>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.baeldung.maven.plugins;
|
||||||
|
|
||||||
|
public class Foo {
|
||||||
|
|
||||||
|
public static String foo() {
|
||||||
|
return "foo";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.baeldung.maven.plugins;
|
||||||
|
|
||||||
|
public class MultipleSrcFolders {
|
||||||
|
|
||||||
|
public static void callFoo() {
|
||||||
|
Foo.foo();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue