DEV Community

Steve Mak
Steve Mak

Posted on • Edited on

1

Maven

Official Reference: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

New a Maven project

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
Enter fullscreen mode Exit fullscreen mode

Clean up target folder (build folder)

mvn clean
Enter fullscreen mode Exit fullscreen mode

Compile the source

mvn compile
Enter fullscreen mode Exit fullscreen mode

Compile and Pack the compiled source

mvn package
Enter fullscreen mode Exit fullscreen mode

Test the package

java -cp target/lt-vaadin-components-1.0-SNAPSHOT.jar <FULL_CLASS_NAME_WITH_PACKAGE>
Enter fullscreen mode Exit fullscreen mode

Install local JAR to local Maven repository

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay