Difference between revisions of "IT-SDK-Maven"
Jump to navigation
Jump to search
Samerhijazi (talk | contribs) (→Creating a Project) |
|||
| Line 3: | Line 3: | ||
* https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html | * https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html | ||
* https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html | * https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html | ||
| + | |||
| + | =Creating a Project= | ||
| + | <pre class="code"> | ||
| + | mvn archetype:generate -DartifactId=app -DgroupId=com.company.app -DarchetypeArtifactId=archive-name -DinteractiveMode=false | ||
| + | </pre> | ||
=Install Pachage= | =Install Pachage= | ||
<pre class="code"> | <pre class="code"> | ||
| Line 8: | Line 13: | ||
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile> | mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile> | ||
</pre> | </pre> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
=Maven Phases= | =Maven Phases= | ||
<pre class="code"> | <pre class="code"> | ||
Revision as of 09:03, 4 August 2022
Ref.
- https://maven.apache.org/
- https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
- https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
Creating a Project
mvn archetype:generate -DartifactId=app -DgroupId=com.company.app -DarchetypeArtifactId=archive-name -DinteractiveMode=false
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>
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.