Difference between revisions of "IT-SDK-Maven"

From wiki.samerhijazi.net
Jump to navigation Jump to search
(Install Pachage)
(Creating a Project)
Line 11: Line 11:
 
=Creating a Project=
 
=Creating a Project=
 
<pre class="code">
 
<pre class="code">
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
+
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
 
</pre>
 
</pre>
  

Revision as of 13:35, 28 February 2022

Ref.

Install Pachage

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>

Creating a Project

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Maven Phases

mvn clean       # cleans up artifacts created by prior builds
mvn validate    # validate the project is correct and all necessary information is available
mvn compile     # compile the source code of the project
mvn package     # take the compiled code and package it in its distributable format, such as a JAR.
mvn install     # install the package into the local repository, for use as a dependency in other projects locally
mvn deploy      # done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.