maven.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 16 Feb 2017 21:44:42 +0200
changeset 2089 8cb9302cc62b
parent 2088 e42e4484ff0b
child 2109 f6f8041d49d6
permissions -rw-r--r--
Install file to local repository.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1395
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
.. -*- coding: utf-8; -*-
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
========
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
 Maven.
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
========
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1679
diff changeset
     7
   :local:
1395
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1396
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
     9
Maven tutorial.
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    10
===============
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    11
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    12
 * http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
1450
e39ad9b6224a http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1447
diff changeset
    13
 * http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
1396
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    14
1439
afa9be44e23c Maven FAQ.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1421
diff changeset
    15
Maven FAQ.
afa9be44e23c Maven FAQ.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1421
diff changeset
    16
==========
afa9be44e23c Maven FAQ.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1421
diff changeset
    17
afa9be44e23c Maven FAQ.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1421
diff changeset
    18
 * http://maven.apache.org/general.html
afa9be44e23c Maven FAQ.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1421
diff changeset
    19
1440
712f5bd9d59b Maven plugins.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1439
diff changeset
    20
Maven plugins.
712f5bd9d59b Maven plugins.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1439
diff changeset
    21
==============
712f5bd9d59b Maven plugins.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1439
diff changeset
    22
712f5bd9d59b Maven plugins.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1439
diff changeset
    23
 * http://maven.apache.org/plugins/
712f5bd9d59b Maven plugins.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1439
diff changeset
    24
1581
84a5029867c2 Maven config location.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1580
diff changeset
    25
Maven config location.
84a5029867c2 Maven config location.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1580
diff changeset
    26
======================
84a5029867c2 Maven config location.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1580
diff changeset
    27
84a5029867c2 Maven config location.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1580
diff changeset
    28
``~/.m2/settings.xml``.
84a5029867c2 Maven config location.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1580
diff changeset
    29
1396
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    30
Generate simple project.
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    31
========================
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    32
::
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    33
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    34
  $ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
f5ac2d7c9317 Maven tutorial. Generate simple project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1395
diff changeset
    35
1665
45c70a566ed9 Debug Maven build.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1663
diff changeset
    36
Debug Maven build.
45c70a566ed9 Debug Maven build.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1663
diff changeset
    37
==================
45c70a566ed9 Debug Maven build.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1663
diff changeset
    38
45c70a566ed9 Debug Maven build.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1663
diff changeset
    39
Run build with ``-X`` option for verbose logging.
45c70a566ed9 Debug Maven build.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1663
diff changeset
    40
1662
2fc04c90ddd3 Introduction to the Standard Directory Layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1632
diff changeset
    41
Project directory layout.
2fc04c90ddd3 Introduction to the Standard Directory Layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1632
diff changeset
    42
=========================
2fc04c90ddd3 Introduction to the Standard Directory Layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1632
diff changeset
    43
2fc04c90ddd3 Introduction to the Standard Directory Layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1632
diff changeset
    44
  http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
2fc04c90ddd3 Introduction to the Standard Directory Layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1632
diff changeset
    45
    Introduction to the Standard Directory Layout.
2fc04c90ddd3 Introduction to the Standard Directory Layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1632
diff changeset
    46
1395
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    47
Search for maven artifact by Java package or class name.
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    48
========================================================
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    49
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    50
 * https://repository.sonatype.org/
1445
4920ffd155a4 http://search.maven.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1440
diff changeset
    51
 * http://search.maven.org/
1395
afa2a45a49fa Search for maven artifact by Java package or class name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    52
2087
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    53
Get help on Maven plug-in
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    54
=========================
1397
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    55
::
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    56
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    57
  $ mvn help:describe -DartifactId=maven-war-plugin -DgroupId=org.apache.maven.plugins
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    58
  $ mvn help:describe -Dcmd=dependency:resolve -Ddetail
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    59
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    60
  $ mvn -X ...
d96348dbf006 Get help on Maven plug-in.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1396
diff changeset
    61
1580
638073b869c6 Fix docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1512
diff changeset
    62
What actual code processed by Maven (dump Maven config)::
1412
77b08d4c703b What actual code processed by Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1398
diff changeset
    63
1414
a1792156210d mvn help:effective-settings
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1413
diff changeset
    64
  $ mvn help:effective-settings
1412
77b08d4c703b What actual code processed by Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1398
diff changeset
    65
  $ mvn help:effective-pom
77b08d4c703b What actual code processed by Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1398
diff changeset
    66
2087
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    67
Investigating and resolving dependencies
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    68
========================================
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    69
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    70
List dependencies::
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    71
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    72
  $ mvn dependency:tree
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    73
  $ mvn dependency:list
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    74
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    75
Resolve dependencies::
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    76
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    77
  $ mvn dependency:resolve
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    78
  $ mvn dependency:resolve-plugins
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    79
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    80
Just download dependencies::
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    81
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    82
  $ mvn dependency:get
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    83
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    84
Reason for inclusion or omitting dependencies::
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    85
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    86
  $ mvn dependency:tree -Dverbose=true
20c626d79da8 Investigating and resolving dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    87
2088
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    88
Download all external dependencies sources and javadocs
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    89
=======================================================
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    90
::
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    91
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    92
  mvn dependency:resolve -Dclassifier=javadoc
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    93
  mvn dependency:resolve -Dclassifier=sources
e42e4484ff0b Reoder sections.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2087
diff changeset
    94
1678
b06128a21eca Force update of dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1666
diff changeset
    95
Force update of dependencies.
b06128a21eca Force update of dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1666
diff changeset
    96
=============================
1679
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
    97
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
    98
You can try redownload snapshots by::
1678
b06128a21eca Force update of dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1666
diff changeset
    99
b06128a21eca Force update of dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1666
diff changeset
   100
  $ mvn -U compile
b06128a21eca Force update of dependencies.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1666
diff changeset
   101
1679
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   102
You can fix damaged local ``~/.m2`` with::
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   103
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   104
  $ mvn dependency:purge-local-repository
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   105
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   106
In order to perform really clean download::
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   107
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   108
  $ mvn -Dmaven.repo.local=$HOME/.my/other/repository clean install
f0434ace37ce Order to perform really clean download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1678
diff changeset
   109
1663
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   110
Find newer library and plugin versions.
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   111
=======================================
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   112
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   113
Check commands from ``versions-maven-plugin``::
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   114
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   115
  $ mvn versions:display-dependency-updates
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   116
  $ mvn versions:display-plugin-updates
01e26f1cb256 Find newer library and plugin versions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1662
diff changeset
   117
1398
c96c3d6857ea Run Java main from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1397
diff changeset
   118
Run Java main from Maven.
c96c3d6857ea Run Java main from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1397
diff changeset
   119
=========================
c96c3d6857ea Run Java main from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1397
diff changeset
   120
::
c96c3d6857ea Run Java main from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1397
diff changeset
   121
c96c3d6857ea Run Java main from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1397
diff changeset
   122
  mvn exec:java -Dexec.mainClass="com.vineetmanohar.module.Main" -Dexec.args="arg0 arg1 arg2"
c96c3d6857ea Run Java main from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1397
diff changeset
   123
1446
6c935c71520e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1445
diff changeset
   124
How to run single unit test?
6c935c71520e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1445
diff changeset
   125
============================
1512
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   126
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   127
``test`` property substituded to ``**/${test}.java`` pattern and override any
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   128
include/exclude patterns::
1446
6c935c71520e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1445
diff changeset
   129
6c935c71520e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1445
diff changeset
   130
  $ mvn test -Dtest=SeriousComponentTest
6c935c71520e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1445
diff changeset
   131
1512
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   132
or mostly same::
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   133
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   134
  $ mvn test-compile surefire:test -Dtest=RunMe
db0fedd5662e How to run single unit test?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1465
diff changeset
   135
1413
07f163d43116 How do I skip the tests during the default lifecycle?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1412
diff changeset
   136
How do I skip the tests during the default lifecycle?
07f163d43116 How do I skip the tests during the default lifecycle?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1412
diff changeset
   137
=====================================================
07f163d43116 How do I skip the tests during the default lifecycle?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1412
diff changeset
   138
::
07f163d43116 How do I skip the tests during the default lifecycle?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1412
diff changeset
   139
07f163d43116 How do I skip the tests during the default lifecycle?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1412
diff changeset
   140
  $ mvn -DskipTests package
1666
bdc52dabc6e9 maven.test.skip
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1665
diff changeset
   141
  $ mvn -Dmaven.test.skip=true package
1413
07f163d43116 How do I skip the tests during the default lifecycle?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1412
diff changeset
   142
1632
e04a32e3e1d6 Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1631
diff changeset
   143
Deploy parent pom without building children.
e04a32e3e1d6 Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1631
diff changeset
   144
============================================
1631
d18d900b5023 Deploy parent pom without building childs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1581
diff changeset
   145
::
d18d900b5023 Deploy parent pom without building childs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1581
diff changeset
   146
d18d900b5023 Deploy parent pom without building childs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1581
diff changeset
   147
  $ mvn -N deploy
d18d900b5023 Deploy parent pom without building childs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1581
diff changeset
   148
2089
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   149
Install file to local repository
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   150
================================
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   151
::
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   152
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   153
  $ mvn install:install-file -Dfile=... -DgroupId=... -DartifactId=... -Dversion=...
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   154
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   155
Additional option provides packaging type (JAR/WAR), source and javadoc files::
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   156
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   157
  -Dpackaging=...
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   158
  -Dsource=...
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   159
  -Djavadoc=...
8cb9302cc62b Install file to local repository.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2088
diff changeset
   160
1447
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   161
Run Ant from Maven.
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   162
===================
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   163
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   164
 * https://support.sonatype.com/entries/20736282-executing-an-external-ant-script-in-a-maven-build
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   165
 * https://support.sonatype.com/entries/20723081-running-an-inline-ant-script-in-a-maven-build
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   166
 * https://support.sonatype.com/entries/20744068-writing-a-maven-plugin-with-ant
d4399aacf09e Run Ant from Maven.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1446
diff changeset
   167