In addition to the src/main/java, I am adding a src/bootstrap directory that I want to include in my build process, in other words, I want maven to compile and include the sources there in my build. How!?
the src/test/resources directory contains the test resources, the target/classes directory contains the compiled classes. the pom. xml file is the project's Project Object Model, or POM.
Source Directories The Maven property ${project. basedir} defaults to the top level directory of the project, so the build directory defaults to the target directory in project base dir. It also sets the property ${project.
Add a Java Maven Dependency to the Utility ProjectRight-click the utility project, and select Maven>Add Dependency. Type a dependency name in the Enter groupID… field (e.g., commons-logging) to search for a dependency. Select the dependency, and click OK.
The target folder is the maven default output folder. When a project is build or packaged, all the content of the sources, resources and web files will be put inside of it, it will be used for construct the artifacts and for run tests.
You can use the Build Helper Plugin, e.g:
<project> ... <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>some directory</source> ... </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
pom.xml
as -<project> .... <build> <resources> <resource> <directory>src/main/config</directory> </resource> </resources> ... </build> ... </project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With