Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 2.31 KB

gettingstarted.md

File metadata and controls

42 lines (25 loc) · 2.31 KB

Getting Started

To get started with Maven, you can create a new Maven project using the archetype plugin. An archetype is a template that provides a basic project structure and configuration for a specific type of project. Maven comes with several built-in archetypes, and you can also create your own.

To create a new Maven project using an archetype, follow these steps:

  • Open a command prompt or terminal window.
  • Navigate to the directory where you want to create the new project.
  • Run the following command, replacing archetypeArtifactId and groupId with the desired archetype and group IDs:
mvn archetype:generate -DgroupId=com.unicauca.app -DartifactId=users-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false

Maven will prompt you to enter additional information about the project, such as the project name and version. Enter the requested information and press Enter to accept the default values for any optional fields.

Maven will generate the project structure and configuration files based on the selected archetype. Once you have generated a new Maven project, you can use the mvn command to perform various tasks, such as compiling the code, running tests, and packaging the application.

Here are some common Maven commands:

mvn clean: Cleans the target directory, removing any compiled classes and generated files.

mvn compile: Compiles the project's source code.

mvn test: Runs the project's tests.

mvn package: Packages the compiled code into a distributable format, such as a JAR or WAR file.

mvn install: Installs the packaged artifact in the local Maven repository, making it available to other projects.

You can also use Maven to manage dependencies for your project. To add a new dependency to your project, you can add the dependency information to the project's POM file, and then run the mvn install command to download and install the dependency.

Maven also supports plugins, which are extensions that provide additional functionality for Maven. Plugins can be used to perform tasks such as code analysis, code coverage, and code quality checks.

Official docs

Running users-app

Check the README


Back to Index