slackorama

 

Maven

Page history last edited by seth 2 yrs ago


 

Helpful Commands

Create a project

mvn archetype:create \

-DarchetypeGroupId=org.apache.maven.archetypes \

-DgroupId=com.mycompany.app \

-DartifactId=my-app

 

mvn dependency:tree

Displays the dependency tree for the project. Need to run it with -DMAVEN_UNSAFE=true.

Documentation

 

 

mvn dependency:resolve

Goal that resolves the project dependencies from the repository.

Documentation

 

 

mvn idea:idea

Goal for generating IDEA files from a POM. This plug-in provides the ability to generate IDEA project files (.ipr, .iml and .iws files) for IDEA

Documentation

 

mvn jetty:run

This will start Jetty running on port 8080 and serving your project. Jetty will continue to run until the plugin is explicitly stopped, for example, by a .

Documentation

 

mvn project-info-reports:dependencies

To generate a dependency tree report, use mvn project-info-reports:dependencies. This would generate an html file in your target\site\dependencies.html.

Documentation

 

Also, if you doubt the output of the project-info-reports:dependencies, you can add -X to your mvn command (i.e. mvn -X package) and trace the debug logs to find the transitive dependency you are looking for.

Documentation

 

mvn help:effective-pom

 

Skip tests

mvn -Dmaven.test.skip=true install

 

 

Links

Comments (0)

You don't have permission to comment on this page.