Merge pull request #4952 from asturcon/tutorials/mvnMultipleSrc

BAEL-1834 - Maven Project with Multiple src Directories
This commit is contained in:
Loredana Crusoveanu 2018-08-12 19:49:50 +03:00 committed by GitHub
commit 977f4e402a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 0 deletions

View File

@ -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>

View File

@ -0,0 +1,10 @@
package com.baeldung.maven.plugins;
public class Foo {
public static String foo() {
return "foo";
}
}

View File

@ -0,0 +1,9 @@
package com.baeldung.maven.plugins;
public class MultipleSrcFolders {
public static void callFoo() {
Foo.foo();
}
}