This tutorial explains some technical details about Maven project in IntelliJ.
Here are two tutorials for importing a Maven project to IntelliJ :
First, you need to understand a Build Lifecycle.
When you want to reuse some classes in the unit tests in another project, such as utils, you create a jar containing test-classes.
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
-
Git pull, and then build and test. If there is no issues, go to the next step.
-
Update the version in "pom.xml". If the project is also a BEAST2 package, e.g. LPhyBeast, you need to update the "version.xml" as well.
-
Run the
install
command to create the release.
mvn clean install
The release will be available under the build directory target
.
mvn clean install -Dmaven.test.skip
- Find the jar or zip file in the corresponding
target
folder, and upload it to Github release.
Read Introduction to the Dependency Mechanism.
- Displays the dependency tree for this project. https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html
mvn dependency:tree -Dverbose
- Output a classpath string of dependencies from the local repository. https://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html
mvn dependency:build-classpath