Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/site/apt/examples/custom-pom-installation.apt.vm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
----
Installing an artifact with a custom POM
------
----
Allan Ramirez
------
----
2009-03-22
------
----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
Expand Down
19 changes: 9 additions & 10 deletions src/site/apt/examples/generic-pom-generation.apt.vm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
----
Generating a generic POM
------
----
Allan Ramirez
------
----
2009-03-22
------
----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
Expand All @@ -28,12 +28,11 @@

Generating a generic POM

There are times when you do not have a POM for a 3rd party artifact.
For instance, when installing a proprietary or commercial JAR into a repository.
The Install Plugin can create a generic POM in this case which
contains the minimal set of POM elements required by Maven, such as groupId,
artifactId, version, packaging. You tell Maven to generate a POM by setting the
<<<generatePom>>> parameter to <<<true>>>.
There are times when you do not have a POM for a third party artifact,
for example, when installing a proprietary or commercial JAR into a repository.
The Install Plugin can create a generic POM for such an artifact which
contains the minimal set of POM elements required by Maven such as groupId,
artifactId, version, and packaging. You tell Maven to generate a POM by setting the <<<generatePom>>> parameter to <<<true>>>.

+---+
mvn ${project.groupId}:${project.artifactId}:${project.version}:install-file -Dfile=path-to-your-artifact-jar \
Expand All @@ -44,5 +43,5 @@ mvn ${project.groupId}:${project.artifactId}:${project.version}:install-file -D
-DgeneratePom=true
+---+

<<Note>>: By using the fully qualified path of a goal, you're ensured to be using the preferred version of the maven-install-plugin. When using <<<mvn install:install-file>>>
<<Note>>: By using the fully qualified path of a goal, you're ensured to be using the preferred version of the maven-install-plugin. When using <<<mvn install:install-file>>>,
its version depends on its specification in the pom or the version of Apache Maven.
10 changes: 5 additions & 5 deletions src/site/apt/examples/installing-secondary-artifacts.apt.vm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
------
----
Installing Secondary Artifacts
------
----
Dennis Lundberg
------
----
2009-03-22
------
----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -42,7 +42,7 @@ Installing Secondary Artifacts
+---+
mvn ${project.groupId}:${project.artifactId}:${project.version}:install-file -Dfile=path-to-commons-logging-sources.jar \
-DgroupId=commons-logging \
-DartifactId=commons-logging \
-DartifactId=commons-logging \
-Dversion=1.0.3 \
-Dpackaging=jar \
-Dclassifier=sources
Expand Down
8 changes: 4 additions & 4 deletions src/site/apt/examples/specific-local-repo.apt.vm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
------
----
Installing an artifact to a specific local repository path
------
----
Vincent Siveton
Robert Scholte
------
----
2013-07-20
------
----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
Expand Down
12 changes: 6 additions & 6 deletions src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
------
----
Introduction
------
----
Allan Ramirez
------
----
2013-07-22
------
----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -35,8 +35,8 @@ ${project.name}

The local repository is the local cache where
all artifacts needed for the build are stored. By default, it is located within
the user's home directory <<<(~/.m2/repository)>>> but the location can be configured in
<<<~/.m2/settings.xml>>> using the <<<\<localRepository\>>>> element.
the user's home directory <<<(~/.m2/repository)>>>, but the location can be configured in
<<<~/.m2/settings.xml>>> using the <<<&lt;localRepository&gt;>>> element.

* Goals Overview

Expand Down
19 changes: 9 additions & 10 deletions src/site/apt/usage.apt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
------
----
Usage
------
----
Allan Ramirez
Robert Scholte
------
----
2013-07-20
------
----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
Expand All @@ -30,7 +30,7 @@
Usage

Apache Maven has a two level strategy to resolve and distribute files, which we call artifacts.
The first level is called the <<<local repository>>>, which is the artifact cache on your system, by default located at <<<$\{user.home\}/.m2/repository>>>.
The first level is called the <<<local repository>>>, which is the artifact cache on your system, by default located at <<<${user.home}/.m2/repository>>>.
When executing Maven, it first looks in this local cache for artifacts. If the artifact cannot be found here, Maven will access the remote repositories to find the artifact.
Once found it will be stored into the local repository, so it's available for current and future usage.

Expand All @@ -39,7 +39,7 @@ Usage

* The <<<install:install>>> goal

In most cases, <<<install:install>>> goal doesn't need any configuration, it
In most cases, the <<<install:install>>> goal doesn't need any configuration. It
needs the project's POM and the artifact file to be installed during the
<<<install>>> phase of the default build lifecycle.

Expand All @@ -49,7 +49,7 @@ mvn install

* The <<<install:install-file>>> goal

The <<<install:install-file>>> goal is used primarily for installing artifacts to
The <<<install:install-file>>> goal is used primarily to install artifacts in
the local repository which were not built by Maven. The project's development team
may or may not provide a POM for the artifact. Here's a list of some of the available parameters for the
<<<install-file>>> goal:
Expand All @@ -64,13 +64,12 @@ mvn install:install-file -Dfile=your-artifact-1.0.jar \
[-Dversion=1.0] \
[-Dpackaging=jar] \
[-Dclassifier=sources] \
[-DgeneratePom=true] \
[-DcreateChecksum=true]
[-DgeneratePom=true]
+---+
Comment thread
elharo marked this conversation as resolved.

* the groupId, artifactId, version and packaging of the file to install. These can
be taken from the specified pomFile, extracted from the pom.xml inside the artifact, and overridden or specified
using the command line. When the pomFile contains a <parent> section, the parent's
using the command line; when the pomFile contains a <parent> section, the parent's
groupId can be considered if the groupId is not specified further for the
current project or on the command line.

Expand Down
1 change: 1 addition & 0 deletions src/site/fml/faq.fml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->


Expand Down
Loading