mirror of https://github.com/apache/maven.git
Trim trailing whitespace
This commit is contained in:
parent
8c9c303f9c
commit
673a7d1fef
|
@ -26,10 +26,10 @@ under the License.
|
||||||
<artifactId>maven</artifactId>
|
<artifactId>maven</artifactId>
|
||||||
<version>4.0.0-alpha-1-SNAPSHOT</version>
|
<version>4.0.0-alpha-1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>apache-maven-wrapper</artifactId>
|
<artifactId>apache-maven-wrapper</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>Apache Maven Wrapper Distribution</name>
|
<name>Apache Maven Wrapper Distribution</name>
|
||||||
<description>The Apache Maven Wrapper distribution in zip and tar.gz formats.</description>
|
<description>The Apache Maven Wrapper distribution in zip and tar.gz formats.</description>
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ under the License.
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
|
@ -97,7 +97,7 @@ under the License.
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>apache-release</id>
|
<id>apache-release</id>
|
||||||
|
|
|
@ -101,7 +101,7 @@ under the License.
|
||||||
<outputDirectory>lib</outputDirectory>
|
<outputDirectory>lib</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
|
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<sources>
|
<sources>
|
||||||
|
|
|
@ -44,24 +44,24 @@ under the License.
|
||||||
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
| With toolchains you can refer to installations on your system. This
|
| With toolchains you can refer to installations on your system. This
|
||||||
| way you don't have to hardcode paths in your pom.xml.
|
| way you don't have to hardcode paths in your pom.xml.
|
||||||
|
|
|
|
||||||
| Every toolchain consist of 3 elements:
|
| Every toolchain consist of 3 elements:
|
||||||
| * type: the type of tool. An often used value is 'jdk'. Toolchains-aware
|
| * type: the type of tool. An often used value is 'jdk'. Toolchains-aware
|
||||||
| plugins should document which type you must use.
|
| plugins should document which type you must use.
|
||||||
|
|
|
|
||||||
| * provides: A list of key/value-pairs.
|
| * provides: A list of key/value-pairs.
|
||||||
| Based on the toolchain-configuration in the pom.xml Maven will search for
|
| Based on the toolchain-configuration in the pom.xml Maven will search for
|
||||||
| matching <provides/> configuration. You can decide for yourself which key-value
|
| matching <provides/> configuration. You can decide for yourself which key-value
|
||||||
| pairs to use. Often used keys are 'version', 'vendor' and 'arch'. By default
|
| pairs to use. Often used keys are 'version', 'vendor' and 'arch'. By default
|
||||||
| the version has a special meaning. If you configured in the pom.xml '1.5'
|
| the version has a special meaning. If you configured in the pom.xml '1.5'
|
||||||
| Maven will search for 1.5 and above.
|
| Maven will search for 1.5 and above.
|
||||||
|
|
|
|
||||||
| * configuration: Additional configuration for this tool.
|
| * configuration: Additional configuration for this tool.
|
||||||
| Look for documentation of the toolchains-aware plugin which configuration elements
|
| Look for documentation of the toolchains-aware plugin which configuration elements
|
||||||
| can be used.
|
| can be used.
|
||||||
|
|
|
|
||||||
| See also https://maven.apache.org/guides/mini/guide-using-toolchains.html
|
| See also https://maven.apache.org/guides/mini/guide-using-toolchains.html
|
||||||
|
|
|
|
||||||
|
@ -69,12 +69,12 @@ under the License.
|
||||||
|
|
||||||
<toolchain>
|
<toolchain>
|
||||||
<type/>
|
<type/>
|
||||||
<provides>
|
<provides>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</provides>
|
</provides>
|
||||||
<configuration/>
|
<configuration/>
|
||||||
</toolchain>
|
</toolchain>
|
||||||
|
|
||||||
| JDK examples
|
| JDK examples
|
||||||
|
|
||||||
<toolchain>
|
<toolchain>
|
||||||
|
@ -97,7 +97,7 @@ under the License.
|
||||||
<jdkHome>/path/to/jdk/1.6</jdkHome>
|
<jdkHome>/path/to/jdk/1.6</jdkHome>
|
||||||
</configuration>
|
</configuration>
|
||||||
</toolchain>
|
</toolchain>
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</toolchains>
|
</toolchains>
|
|
@ -37,7 +37,7 @@ under the License.
|
||||||
<outputDirectory>.mvn/wrapper</outputDirectory>
|
<outputDirectory>.mvn/wrapper</outputDirectory>
|
||||||
<outputFileNameMapping>maven-wrapper.jar</outputFileNameMapping>
|
<outputFileNameMapping>maven-wrapper.jar</outputFileNameMapping>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<source>src/assembly/shared/mvnwDebug.cmd</source>
|
<source>src/assembly/shared/mvnwDebug.cmd</source>
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
# to you under the Apache License, Version 2.0 (the
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# "License"); you may not use this file except in compliance
|
# "License"); you may not use this file except in compliance
|
||||||
# with the License. You may obtain a copy of the License at
|
# with the License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing,
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# software distributed under the License is distributed on an
|
# software distributed under the License is distributed on an
|
||||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class MavenWrapperDownloader {
|
||||||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||||
// wrapperUrl parameter.
|
// wrapperUrl parameter.
|
||||||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
||||||
|
|
||||||
String url = null;
|
String url = null;
|
||||||
|
|
||||||
String repoUrl = System.getenv( "MVNW_REPOURL" );
|
String repoUrl = System.getenv( "MVNW_REPOURL" );
|
||||||
|
@ -70,20 +70,20 @@ public class MavenWrapperDownloader {
|
||||||
{
|
{
|
||||||
url = repoUrl + DEFAULT_DOWNLOAD_PATH;
|
url = repoUrl + DEFAULT_DOWNLOAD_PATH;
|
||||||
}
|
}
|
||||||
else if ( mavenWrapperPropertyFile.exists() )
|
else if ( mavenWrapperPropertyFile.exists() )
|
||||||
{
|
{
|
||||||
Properties mavenWrapperProperties = new Properties();
|
Properties mavenWrapperProperties = new Properties();
|
||||||
try ( InputStream mavenWrapperPropertyFileInputStream = new FileInputStream( mavenWrapperPropertyFile ) )
|
try ( InputStream mavenWrapperPropertyFileInputStream = new FileInputStream( mavenWrapperPropertyFile ) )
|
||||||
{
|
{
|
||||||
mavenWrapperProperties.load( mavenWrapperPropertyFileInputStream );
|
mavenWrapperProperties.load( mavenWrapperPropertyFileInputStream );
|
||||||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( url == null )
|
if ( url == null )
|
||||||
{
|
{
|
||||||
url = "https://repo.maven.apache.org/maven2" + DEFAULT_DOWNLOAD_PATH;
|
url = "https://repo.maven.apache.org/maven2" + DEFAULT_DOWNLOAD_PATH;
|
||||||
|
|
|
@ -47,27 +47,27 @@ about.html in archive lib/org.eclipse.sisu.inject-0.3.4.jar
|
||||||
</head>
|
</head>
|
||||||
<body lang="EN-US">
|
<body lang="EN-US">
|
||||||
<h2>About org.eclipse.sisu.inject</h2>
|
<h2>About org.eclipse.sisu.inject</h2>
|
||||||
|
|
||||||
<p>November 5, 2013</p>
|
<p>November 5, 2013</p>
|
||||||
<h3>License</h3>
|
<h3>License</h3>
|
||||||
|
|
||||||
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||||
indicated below, the Content is provided to you under the terms and conditions of the
|
indicated below, the Content is provided to you under the terms and conditions of the
|
||||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||||
|
|
||||||
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||||
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
||||||
|
|
||||||
<h3>Third Party Content</h3>
|
<h3>Third Party Content</h3>
|
||||||
<p>The Content includes items that have been sourced from third parties as set
|
<p>The Content includes items that have been sourced from third parties as set
|
||||||
out below. If you did not receive this Content directly from the Eclipse Foundation,
|
out below. If you did not receive this Content directly from the Eclipse Foundation,
|
||||||
the following is provided for informational purposes only, and you should look
|
the following is provided for informational purposes only, and you should look
|
||||||
to the Redistributor's license for terms and conditions of use.</p>
|
to the Redistributor's license for terms and conditions of use.</p>
|
||||||
|
|
||||||
<h4>ASM 4.1</h4>
|
<h4>ASM 4.1</h4>
|
||||||
|
|
|
@ -17,12 +17,12 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
Modifications, in each case including portions thereof.
|
Modifications, in each case including portions thereof.
|
||||||
|
|
||||||
1.4. "Executable" means the Covered Software in any form
|
1.4. "Executable" means the Covered Software in any form
|
||||||
other than Source Code.
|
other than Source Code.
|
||||||
|
|
||||||
1.5. "Initial Developer" means the individual or entity
|
1.5. "Initial Developer" means the individual or entity
|
||||||
that first makes Original Software available under this
|
that first makes Original Software available under this
|
||||||
License.
|
License.
|
||||||
|
|
||||||
1.6. "Larger Work" means a work which combines Covered
|
1.6. "Larger Work" means a work which combines Covered
|
||||||
Software or portions thereof with code not governed by the
|
Software or portions thereof with code not governed by the
|
||||||
terms of this License.
|
terms of this License.
|
||||||
|
@ -33,29 +33,29 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
maximum extent possible, whether at the time of the initial
|
maximum extent possible, whether at the time of the initial
|
||||||
grant or subsequently acquired, any and all of the rights
|
grant or subsequently acquired, any and all of the rights
|
||||||
conveyed herein.
|
conveyed herein.
|
||||||
|
|
||||||
1.9. "Modifications" means the Source Code and Executable
|
1.9. "Modifications" means the Source Code and Executable
|
||||||
form of any of the following:
|
form of any of the following:
|
||||||
|
|
||||||
A. Any file that results from an addition to,
|
A. Any file that results from an addition to,
|
||||||
deletion from or modification of the contents of a
|
deletion from or modification of the contents of a
|
||||||
file containing Original Software or previous
|
file containing Original Software or previous
|
||||||
Modifications;
|
Modifications;
|
||||||
|
|
||||||
B. Any new file that contains any part of the
|
B. Any new file that contains any part of the
|
||||||
Original Software or previous Modification; or
|
Original Software or previous Modification; or
|
||||||
|
|
||||||
C. Any new file that is contributed or otherwise made
|
C. Any new file that is contributed or otherwise made
|
||||||
available under the terms of this License.
|
available under the terms of this License.
|
||||||
|
|
||||||
1.10. "Original Software" means the Source Code and
|
1.10. "Original Software" means the Source Code and
|
||||||
Executable form of computer software code that is
|
Executable form of computer software code that is
|
||||||
originally released under this License.
|
originally released under this License.
|
||||||
|
|
||||||
1.11. "Patent Claims" means any patent claim(s), now owned
|
1.11. "Patent Claims" means any patent claim(s), now owned
|
||||||
or hereafter acquired, including without limitation,
|
or hereafter acquired, including without limitation,
|
||||||
method, process, and apparatus claims, in any patent
|
method, process, and apparatus claims, in any patent
|
||||||
Licensable by grantor.
|
Licensable by grantor.
|
||||||
|
|
||||||
1.12. "Source Code" means (a) the common form of computer
|
1.12. "Source Code" means (a) the common form of computer
|
||||||
software code in which modifications are made and (b)
|
software code in which modifications are made and (b)
|
||||||
|
@ -72,40 +72,40 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
of more than fifty percent (50%) of the outstanding shares
|
of more than fifty percent (50%) of the outstanding shares
|
||||||
or beneficial ownership of such entity.
|
or beneficial ownership of such entity.
|
||||||
|
|
||||||
2. License Grants.
|
2. License Grants.
|
||||||
|
|
||||||
2.1. The Initial Developer Grant.
|
2.1. The Initial Developer Grant.
|
||||||
|
|
||||||
Conditioned upon Your compliance with Section 3.1 below and
|
Conditioned upon Your compliance with Section 3.1 below and
|
||||||
subject to third party intellectual property claims, the
|
subject to third party intellectual property claims, the
|
||||||
Initial Developer hereby grants You a world-wide,
|
Initial Developer hereby grants You a world-wide,
|
||||||
royalty-free, non-exclusive license:
|
royalty-free, non-exclusive license:
|
||||||
|
|
||||||
(a) under intellectual property rights (other than
|
(a) under intellectual property rights (other than
|
||||||
patent or trademark) Licensable by Initial Developer,
|
patent or trademark) Licensable by Initial Developer,
|
||||||
to use, reproduce, modify, display, perform,
|
to use, reproduce, modify, display, perform,
|
||||||
sublicense and distribute the Original Software (or
|
sublicense and distribute the Original Software (or
|
||||||
portions thereof), with or without Modifications,
|
portions thereof), with or without Modifications,
|
||||||
and/or as part of a Larger Work; and
|
and/or as part of a Larger Work; and
|
||||||
|
|
||||||
(b) under Patent Claims infringed by the making,
|
(b) under Patent Claims infringed by the making,
|
||||||
using or selling of Original Software, to make, have
|
using or selling of Original Software, to make, have
|
||||||
made, use, practice, sell, and offer for sale, and/or
|
made, use, practice, sell, and offer for sale, and/or
|
||||||
otherwise dispose of the Original Software (or
|
otherwise dispose of the Original Software (or
|
||||||
portions thereof).
|
portions thereof).
|
||||||
|
|
||||||
(c) The licenses granted in Sections 2.1(a) and (b)
|
(c) The licenses granted in Sections 2.1(a) and (b)
|
||||||
are effective on the date Initial Developer first
|
are effective on the date Initial Developer first
|
||||||
distributes or otherwise makes the Original Software
|
distributes or otherwise makes the Original Software
|
||||||
available to a third party under the terms of this
|
available to a third party under the terms of this
|
||||||
License.
|
License.
|
||||||
|
|
||||||
(d) Notwithstanding Section 2.1(b) above, no patent
|
(d) Notwithstanding Section 2.1(b) above, no patent
|
||||||
license is granted: (1) for code that You delete from
|
license is granted: (1) for code that You delete from
|
||||||
the Original Software, or (2) for infringements
|
the Original Software, or (2) for infringements
|
||||||
caused by: (i) the modification of the Original
|
caused by: (i) the modification of the Original
|
||||||
Software, or (ii) the combination of the Original
|
Software, or (ii) the combination of the Original
|
||||||
Software with other software or devices.
|
Software with other software or devices.
|
||||||
|
|
||||||
2.2. Contributor Grant.
|
2.2. Contributor Grant.
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
Contributor (or portions thereof), either on an
|
Contributor (or portions thereof), either on an
|
||||||
unmodified basis, with other Modifications, as
|
unmodified basis, with other Modifications, as
|
||||||
Covered Software and/or as part of a Larger Work; and
|
Covered Software and/or as part of a Larger Work; and
|
||||||
|
|
||||||
|
|
||||||
(b) under Patent Claims infringed by the making,
|
(b) under Patent Claims infringed by the making,
|
||||||
using, or selling of Modifications made by that
|
using, or selling of Modifications made by that
|
||||||
|
@ -132,12 +132,12 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
Modifications made by that Contributor (or portions
|
Modifications made by that Contributor (or portions
|
||||||
thereof); and (2) the combination of Modifications
|
thereof); and (2) the combination of Modifications
|
||||||
made by that Contributor with its Contributor Version
|
made by that Contributor with its Contributor Version
|
||||||
(or portions of such combination).
|
(or portions of such combination).
|
||||||
|
|
||||||
(c) The licenses granted in Sections 2.2(a) and
|
(c) The licenses granted in Sections 2.2(a) and
|
||||||
2.2(b) are effective on the date Contributor first
|
2.2(b) are effective on the date Contributor first
|
||||||
distributes or otherwise makes the Modifications
|
distributes or otherwise makes the Modifications
|
||||||
available to a third party.
|
available to a third party.
|
||||||
|
|
||||||
(d) Notwithstanding Section 2.2(b) above, no patent
|
(d) Notwithstanding Section 2.2(b) above, no patent
|
||||||
license is granted: (1) for any code that Contributor
|
license is granted: (1) for any code that Contributor
|
||||||
|
@ -148,7 +148,7 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
with other software (except as part of the
|
with other software (except as part of the
|
||||||
Contributor Version) or other devices; or (3) under
|
Contributor Version) or other devices; or (3) under
|
||||||
Patent Claims infringed by Covered Software in the
|
Patent Claims infringed by Covered Software in the
|
||||||
absence of Modifications made by that Contributor.
|
absence of Modifications made by that Contributor.
|
||||||
|
|
||||||
3. Distribution Obligations.
|
3. Distribution Obligations.
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
Developer and every Contributor for any liability incurred
|
Developer and every Contributor for any liability incurred
|
||||||
by the Initial Developer or such Contributor as a result of
|
by the Initial Developer or such Contributor as a result of
|
||||||
warranty, support, indemnity or liability terms You offer.
|
warranty, support, indemnity or liability terms You offer.
|
||||||
|
|
||||||
|
|
||||||
3.5. Distribution of Executable Versions.
|
3.5. Distribution of Executable Versions.
|
||||||
|
|
||||||
|
@ -226,9 +226,9 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
with other code not governed by the terms of this License
|
with other code not governed by the terms of this License
|
||||||
and distribute the Larger Work as a single product. In such
|
and distribute the Larger Work as a single product. In such
|
||||||
a case, You must make sure the requirements of this License
|
a case, You must make sure the requirements of this License
|
||||||
are fulfilled for the Covered Software.
|
are fulfilled for the Covered Software.
|
||||||
|
|
||||||
4. Versions of the License.
|
4. Versions of the License.
|
||||||
|
|
||||||
4.1. New Versions.
|
4.1. New Versions.
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
from time to time. Each version will be given a
|
from time to time. Each version will be given a
|
||||||
distinguishing version number. Except as provided in
|
distinguishing version number. Except as provided in
|
||||||
Section 4.3, no one other than the license steward has the
|
Section 4.3, no one other than the license steward has the
|
||||||
right to modify this License.
|
right to modify this License.
|
||||||
|
|
||||||
4.2. Effect of New Versions.
|
4.2. Effect of New Versions.
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
the Covered Software. Otherwise, You may also choose to
|
the Covered Software. Otherwise, You may also choose to
|
||||||
use, distribute or otherwise make the Covered Software
|
use, distribute or otherwise make the Covered Software
|
||||||
available under the terms of any subsequent version of the
|
available under the terms of any subsequent version of the
|
||||||
License published by the license steward.
|
License published by the license steward.
|
||||||
|
|
||||||
4.3. Modified Versions.
|
4.3. Modified Versions.
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
license steward (except to note that the license differs
|
license steward (except to note that the license differs
|
||||||
from this License); and (b) otherwise make it clear that
|
from this License); and (b) otherwise make it clear that
|
||||||
the license contains terms which differ from this License.
|
the license contains terms which differ from this License.
|
||||||
|
|
||||||
|
|
||||||
5. DISCLAIMER OF WARRANTY.
|
5. DISCLAIMER OF WARRANTY.
|
||||||
|
|
||||||
|
@ -279,9 +279,9 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||||
ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
|
ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
|
||||||
WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||||
ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
|
ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
|
||||||
DISCLAIMER.
|
DISCLAIMER.
|
||||||
|
|
||||||
6. TERMINATION.
|
6. TERMINATION.
|
||||||
|
|
||||||
6.1. This License and the rights granted hereunder will
|
6.1. This License and the rights granted hereunder will
|
||||||
terminate automatically if You fail to comply with terms
|
terminate automatically if You fail to comply with terms
|
||||||
|
|
|
@ -25,7 +25,7 @@ package org.apache.maven.artifact.handler;
|
||||||
* <li>information on how to use the artifact: whether to add it to the classpath, or to take into account its
|
* <li>information on how to use the artifact: whether to add it to the classpath, or to take into account its
|
||||||
* dependencies.</li>
|
* dependencies.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||||
*/
|
*/
|
||||||
public interface ArtifactHandler
|
public interface ArtifactHandler
|
||||||
|
@ -43,7 +43,7 @@ public interface ArtifactHandler
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the classifier associated to the dependency type.
|
* Get the classifier associated to the dependency type.
|
||||||
*
|
*
|
||||||
* @return the classifier
|
* @return the classifier
|
||||||
*/
|
*/
|
||||||
String getClassifier();
|
String getClassifier();
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class DefaultArtifactVersion
|
||||||
}
|
}
|
||||||
catch ( NumberFormatException e )
|
catch ( NumberFormatException e )
|
||||||
{
|
{
|
||||||
// should never happen since checked isDigits(s) before
|
// should never happen since checked isDigits(s) before
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class VersionRange
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated VersionRange is immutable, cloning is not useful and even more an issue against the cache
|
* @deprecated VersionRange is immutable, cloning is not useful and even more an issue against the cache
|
||||||
* @return a clone
|
* @return a clone
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -52,10 +52,10 @@ public class ComparableVersionIT
|
||||||
if ( mavenArtifactJar.matcher( filename ).matches() )
|
if ( mavenArtifactJar.matcher( filename ).matches() )
|
||||||
{
|
{
|
||||||
Process p = Runtime.getRuntime().exec( new String[] {
|
Process p = Runtime.getRuntime().exec( new String[] {
|
||||||
Paths.get( System.getProperty( "java.home" ), "bin/java" ).toString(),
|
Paths.get( System.getProperty( "java.home" ), "bin/java" ).toString(),
|
||||||
"-jar",
|
"-jar",
|
||||||
file.toAbsolutePath().toString(),
|
file.toAbsolutePath().toString(),
|
||||||
"5.32",
|
"5.32",
|
||||||
"5.27" } );
|
"5.27" } );
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class FileSource
|
||||||
{
|
{
|
||||||
private final File file;
|
private final File file;
|
||||||
|
|
||||||
private final int hashCode;
|
private final int hashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new source backed by the specified file.
|
* Creates a new source backed by the specified file.
|
||||||
|
|
|
@ -41,17 +41,17 @@ public interface ProblemCollector
|
||||||
* @param cause The cause of the problem, may be {@code null}.
|
* @param cause The cause of the problem, may be {@code null}.
|
||||||
*/
|
*/
|
||||||
void add( Problem.Severity severity, String message, int line, int column, Exception cause );
|
void add( Problem.Severity severity, String message, int line, int column, Exception cause );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The next messages will be bound to this source. When calling this method again, previous messages keep
|
* The next messages will be bound to this source. When calling this method again, previous messages keep
|
||||||
* their source, but the next messages will use the new source.
|
* their source, but the next messages will use the new source.
|
||||||
*
|
*
|
||||||
* @param source
|
* @param source
|
||||||
*/
|
*/
|
||||||
void setSource( String source );
|
void setSource( String source );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the collected Problems, never {@code null}
|
* @return the collected Problems, never {@code null}
|
||||||
*/
|
*/
|
||||||
List<Problem> getProblems();
|
List<Problem> getProblems();
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.maven.building;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Robert Scholte
|
* @author Robert Scholte
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
|
@ -30,8 +30,8 @@ public class ProblemCollectorFactory
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default implementation is not visible, create it with this factory
|
* The default implementation is not visible, create it with this factory
|
||||||
*
|
*
|
||||||
* @param problems starting set of problems, may be {@code null}
|
* @param problems starting set of problems, may be {@code null}
|
||||||
* @return a new instance of a ProblemCollector
|
* @return a new instance of a ProblemCollector
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class StringSource
|
||||||
@Override
|
@Override
|
||||||
public boolean equals( Object obj )
|
public boolean equals( Object obj )
|
||||||
{
|
{
|
||||||
if ( this == obj )
|
if ( this == obj )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,10 +35,10 @@ public class DefaultProblemCollectorTest
|
||||||
assertEquals( 0, collector.getProblems().size() );
|
assertEquals( 0, collector.getProblems().size() );
|
||||||
|
|
||||||
collector.add( null, "MESSAGE1", -1, -1, null );
|
collector.add( null, "MESSAGE1", -1, -1, null );
|
||||||
|
|
||||||
Exception e2 = new Exception();
|
Exception e2 = new Exception();
|
||||||
collector.add( Severity.WARNING, null, 42, 127, e2 );
|
collector.add( Severity.WARNING, null, 42, 127, e2 );
|
||||||
|
|
||||||
assertEquals( 2, collector.getProblems().size() );
|
assertEquals( 2, collector.getProblems().size() );
|
||||||
|
|
||||||
Problem p1 = collector.getProblems().get(0);
|
Problem p1 = collector.getProblems().get(0);
|
||||||
|
@ -47,7 +47,7 @@ public class DefaultProblemCollectorTest
|
||||||
assertEquals( -1, p1.getLineNumber() );
|
assertEquals( -1, p1.getLineNumber() );
|
||||||
assertEquals( -1, p1.getColumnNumber() );
|
assertEquals( -1, p1.getColumnNumber() );
|
||||||
assertEquals( null, p1.getException() );
|
assertEquals( null, p1.getException() );
|
||||||
|
|
||||||
Problem p2 = collector.getProblems().get(1);
|
Problem p2 = collector.getProblems().get(1);
|
||||||
assertEquals( Severity.WARNING, p2.getSeverity() );
|
assertEquals( Severity.WARNING, p2.getSeverity() );
|
||||||
assertEquals( "",p2.getMessage() );
|
assertEquals( "",p2.getMessage() );
|
||||||
|
@ -60,7 +60,7 @@ public class DefaultProblemCollectorTest
|
||||||
public void testSetSource()
|
public void testSetSource()
|
||||||
{
|
{
|
||||||
DefaultProblemCollector collector = new DefaultProblemCollector( null );
|
DefaultProblemCollector collector = new DefaultProblemCollector( null );
|
||||||
|
|
||||||
collector.add( null, "PROBLEM1", -1, -1, null );
|
collector.add( null, "PROBLEM1", -1, -1, null );
|
||||||
|
|
||||||
collector.setSource( "SOURCE_PROBLEM2" );
|
collector.setSource( "SOURCE_PROBLEM2" );
|
||||||
|
|
|
@ -36,14 +36,14 @@ public class DefaultProblemTest
|
||||||
|
|
||||||
problem = new DefaultProblem( null, Severity.FATAL, null, -1, -1, null );
|
problem = new DefaultProblem( null, Severity.FATAL, null, -1, -1, null );
|
||||||
assertEquals( Severity.FATAL, problem.getSeverity() );
|
assertEquals( Severity.FATAL, problem.getSeverity() );
|
||||||
|
|
||||||
problem = new DefaultProblem( null, Severity.ERROR, null, -1, -1, null );
|
problem = new DefaultProblem( null, Severity.ERROR, null, -1, -1, null );
|
||||||
assertEquals( Severity.ERROR, problem.getSeverity() );
|
assertEquals( Severity.ERROR, problem.getSeverity() );
|
||||||
|
|
||||||
problem = new DefaultProblem( null, Severity.WARNING, null, -1, -1, null );
|
problem = new DefaultProblem( null, Severity.WARNING, null, -1, -1, null );
|
||||||
assertEquals( Severity.WARNING, problem.getSeverity() );
|
assertEquals( Severity.WARNING, problem.getSeverity() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetLineNumber()
|
public void testGetLineNumber()
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ public class DefaultProblemTest
|
||||||
|
|
||||||
problem = new DefaultProblem( null, null, null, 42, -1, null );
|
problem = new DefaultProblem( null, null, null, 42, -1, null );
|
||||||
assertEquals( 42, problem.getLineNumber() );
|
assertEquals( 42, problem.getLineNumber() );
|
||||||
|
|
||||||
problem = new DefaultProblem( null, null, null, Integer.MAX_VALUE, -1, null );
|
problem = new DefaultProblem( null, null, null, Integer.MAX_VALUE, -1, null );
|
||||||
assertEquals( Integer.MAX_VALUE, problem.getLineNumber() );
|
assertEquals( Integer.MAX_VALUE, problem.getLineNumber() );
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class DefaultProblemTest
|
||||||
problem = new DefaultProblem( null, null, null, Integer.MIN_VALUE, -1, null );
|
problem = new DefaultProblem( null, null, null, Integer.MIN_VALUE, -1, null );
|
||||||
assertEquals( Integer.MIN_VALUE, problem.getLineNumber() );
|
assertEquals( Integer.MIN_VALUE, problem.getLineNumber() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetColumnNumber()
|
public void testGetColumnNumber()
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ public class DefaultProblemTest
|
||||||
|
|
||||||
problem = new DefaultProblem( null, null, null, -1, 42, null );
|
problem = new DefaultProblem( null, null, null, -1, 42, null );
|
||||||
assertEquals( 42, problem.getColumnNumber() );
|
assertEquals( 42, problem.getColumnNumber() );
|
||||||
|
|
||||||
problem = new DefaultProblem( null, null, null, -1, Integer.MAX_VALUE, null );
|
problem = new DefaultProblem( null, null, null, -1, Integer.MAX_VALUE, null );
|
||||||
assertEquals( Integer.MAX_VALUE, problem.getColumnNumber() );
|
assertEquals( Integer.MAX_VALUE, problem.getColumnNumber() );
|
||||||
|
|
||||||
|
@ -77,13 +77,13 @@ public class DefaultProblemTest
|
||||||
problem = new DefaultProblem( null, null, null, -1, Integer.MIN_VALUE, null );
|
problem = new DefaultProblem( null, null, null, -1, Integer.MIN_VALUE, null );
|
||||||
assertEquals( Integer.MIN_VALUE, problem.getColumnNumber() );
|
assertEquals( Integer.MIN_VALUE, problem.getColumnNumber() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetException()
|
public void testGetException()
|
||||||
{
|
{
|
||||||
DefaultProblem problem = new DefaultProblem( null, null, null, -1, -1, null );
|
DefaultProblem problem = new DefaultProblem( null, null, null, -1, -1, null );
|
||||||
assertEquals( null, problem.getException() );
|
assertEquals( null, problem.getException() );
|
||||||
|
|
||||||
Exception e = new Exception();
|
Exception e = new Exception();
|
||||||
problem = new DefaultProblem( null, null, null, -1, -1, e );
|
problem = new DefaultProblem( null, null, null, -1, -1, e );
|
||||||
assertSame( e, problem.getException() );
|
assertSame( e, problem.getException() );
|
||||||
|
@ -94,7 +94,7 @@ public class DefaultProblemTest
|
||||||
{
|
{
|
||||||
DefaultProblem problem = new DefaultProblem( null, null, null, -1, -1, null );
|
DefaultProblem problem = new DefaultProblem( null, null, null, -1, -1, null );
|
||||||
assertEquals( "", problem.getSource() );
|
assertEquals( "", problem.getSource() );
|
||||||
|
|
||||||
problem = new DefaultProblem( null, null, "", -1, -1, null );
|
problem = new DefaultProblem( null, null, "", -1, -1, null );
|
||||||
assertEquals( "", problem.getSource() );
|
assertEquals( "", problem.getSource() );
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ public class DefaultProblemTest
|
||||||
{
|
{
|
||||||
DefaultProblem problem = new DefaultProblem( null, null, null, -1, -1, null );
|
DefaultProblem problem = new DefaultProblem( null, null, null, -1, -1, null );
|
||||||
assertEquals( "", problem.getLocation() );
|
assertEquals( "", problem.getLocation() );
|
||||||
|
|
||||||
problem = new DefaultProblem( null, null, "SOURCE", -1, -1, null );
|
problem = new DefaultProblem( null, null, "SOURCE", -1, -1, null );
|
||||||
assertEquals( "SOURCE", problem.getLocation() );
|
assertEquals( "SOURCE", problem.getLocation() );
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class DefaultProblemTest
|
||||||
problem = new DefaultProblem( null, null, "SOURCE", 42, 127, null );
|
problem = new DefaultProblem( null, null, "SOURCE", 42, 127, null );
|
||||||
assertEquals( "SOURCE, line 42, column 127", problem.getLocation() );
|
assertEquals( "SOURCE, line 42, column 127", problem.getLocation() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetMessage()
|
public void testGetMessage()
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,10 +33,10 @@ public class ProblemCollectorFactoryTest
|
||||||
public void testNewInstance()
|
public void testNewInstance()
|
||||||
{
|
{
|
||||||
ProblemCollector collector1 = ProblemCollectorFactory.newInstance( null );
|
ProblemCollector collector1 = ProblemCollectorFactory.newInstance( null );
|
||||||
|
|
||||||
Problem problem = new DefaultProblem( "MESSAGE1", null, null, -1, -1, null );
|
Problem problem = new DefaultProblem( "MESSAGE1", null, null, -1, -1, null );
|
||||||
ProblemCollector collector2 = ProblemCollectorFactory.newInstance( Collections.singletonList( problem ) );
|
ProblemCollector collector2 = ProblemCollectorFactory.newInstance( Collections.singletonList( problem ) );
|
||||||
|
|
||||||
assertNotSame( collector1, collector2 );
|
assertNotSame( collector1, collector2 );
|
||||||
assertEquals( 0, collector1.getProblems().size() );
|
assertEquals( 0, collector1.getProblems().size() );
|
||||||
assertEquals( 1, collector2.getProblems().size() );
|
assertEquals( 1, collector2.getProblems().size() );
|
||||||
|
|
|
@ -440,7 +440,7 @@ public class DefaultWagonManager
|
||||||
}
|
}
|
||||||
catch ( ChecksumFailedException e )
|
catch ( ChecksumFailedException e )
|
||||||
{
|
{
|
||||||
// if we catch a ChecksumFailedException, it means the transfer/read succeeded, but the
|
// if we catch a ChecksumFailedException, it means the transfer/read succeeded, but the
|
||||||
// checksum doesn't match. This could be a problem with the server (ibiblio HTTP-200 error
|
// checksum doesn't match. This could be a problem with the server (ibiblio HTTP-200 error
|
||||||
// page), so we'll try this up to two times. On the second try, we'll handle it as a bona-fide
|
// page), so we'll try this up to two times. On the second try, we'll handle it as a bona-fide
|
||||||
// error, based on the repository's checksum checking policy.
|
// error, based on the repository's checksum checking policy.
|
||||||
|
|
|
@ -695,7 +695,7 @@ public class DefaultLegacyArtifactCollector
|
||||||
fireEvent( ResolutionListener.UPDATE_SCOPE, listeners, nearest, farthestArtifact );
|
fireEvent( ResolutionListener.UPDATE_SCOPE, listeners, nearest, farthestArtifact );
|
||||||
|
|
||||||
// previously we cloned the artifact, but it is more efficient to just update the artifactScope
|
// previously we cloned the artifact, but it is more efficient to just update the artifactScope
|
||||||
// if problems are later discovered that the original object needs its original artifactScope value,
|
// if problems are later discovered that the original object needs its original artifactScope value,
|
||||||
// cloning may
|
// cloning may
|
||||||
// again be appropriate
|
// again be appropriate
|
||||||
nearestArtifact.setScope( farthestArtifact.getScope() );
|
nearestArtifact.setScope( farthestArtifact.getScope() );
|
||||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
||||||
|
|
||||||
<name>Maven Integration Test :: Dummy Artifact</name>
|
<name>Maven Integration Test :: Dummy Artifact</name>
|
||||||
<description>
|
<description>
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
||||||
|
|
||||||
<name>Maven Integration Test :: Dummy Artifact</name>
|
<name>Maven Integration Test :: Dummy Artifact</name>
|
||||||
<description>
|
<description>
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:svn:http://host/p0</connection>
|
<connection>scm:svn:http://host/p0</connection>
|
||||||
<developerConnection>scm:svn:https://host/p0</developerConnection>
|
<developerConnection>scm:svn:https://host/p0</developerConnection>
|
||||||
<url>http://host/viewer?path=/p0</url>
|
<url>http://host/viewer?path=/p0</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>modules/p1</module>
|
<module>modules/p1</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -30,7 +30,7 @@ public interface ArtifactFilterManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns a filter for core + extension artifacts.
|
* Returns a filter for core + extension artifacts.
|
||||||
*
|
*
|
||||||
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
|
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
|
||||||
* extensions.
|
* extensions.
|
||||||
*/
|
*/
|
||||||
|
@ -43,7 +43,7 @@ public interface ArtifactFilterManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclude an extension artifact (doesn't affect getArtifactFilter's result, only getExtensionArtifactFilter).
|
* Exclude an extension artifact (doesn't affect getArtifactFilter's result, only getExtensionArtifactFilter).
|
||||||
*
|
*
|
||||||
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
|
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
|
||||||
* extensions.
|
* extensions.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class DefaultProjectDependenciesResolver
|
||||||
|
|
||||||
if ( ! exclusions.isEmpty() )
|
if ( ! exclusions.isEmpty() )
|
||||||
{
|
{
|
||||||
filter = new AndArtifactFilter( Arrays.asList( new ArtifactFilter[]{
|
filter = new AndArtifactFilter( Arrays.asList( new ArtifactFilter[]{
|
||||||
new ExcludesArtifactFilter( exclusions ), scopeFilter } ) );
|
new ExcludesArtifactFilter( exclusions ), scopeFilter } ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ProjectCycleException
|
||||||
{
|
{
|
||||||
super( message );
|
super( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProjectCycleException( String message, CycleDetectedException cause )
|
public ProjectCycleException( String message, CycleDetectedException cause )
|
||||||
{
|
{
|
||||||
super( message, cause );
|
super( message, cause );
|
||||||
|
|
|
@ -382,7 +382,7 @@ public class RepositoryUtils
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( Iterator<RemoteRepository> it1 = r1.iterator(), it2 = r2.iterator(); it1.hasNext(); )
|
for ( Iterator<RemoteRepository> it1 = r1.iterator(), it2 = r2.iterator(); it1.hasNext(); )
|
||||||
{
|
{
|
||||||
if ( !repositoryEquals( it1.next(), it2.next() ) )
|
if ( !repositoryEquals( it1.next(), it2.next() ) )
|
||||||
|
@ -390,7 +390,7 @@ public class RepositoryUtils
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ public class RepositoryUtils
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Objects.equals( r1.getId(), r2.getId() ) && Objects.equals( r1.getUrl(), r2.getUrl() )
|
return Objects.equals( r1.getId(), r2.getId() ) && Objects.equals( r1.getUrl(), r2.getUrl() )
|
||||||
&& policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) )
|
&& policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) )
|
||||||
&& policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) );
|
&& policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) );
|
||||||
|
|
|
@ -58,9 +58,9 @@ import org.codehaus.plexus.util.StringUtils;
|
||||||
public class DefaultMavenExecutionRequestPopulator
|
public class DefaultMavenExecutionRequestPopulator
|
||||||
implements MavenExecutionRequestPopulator
|
implements MavenExecutionRequestPopulator
|
||||||
{
|
{
|
||||||
|
|
||||||
private final MavenRepositorySystem repositorySystem;
|
private final MavenRepositorySystem repositorySystem;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public DefaultMavenExecutionRequestPopulator( MavenRepositorySystem repositorySystem )
|
public DefaultMavenExecutionRequestPopulator( MavenRepositorySystem repositorySystem )
|
||||||
{
|
{
|
||||||
|
@ -90,7 +90,7 @@ public class DefaultMavenExecutionRequestPopulator
|
||||||
}
|
}
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MavenExecutionRequest populateDefaults( MavenExecutionRequest request )
|
public MavenExecutionRequest populateDefaults( MavenExecutionRequest request )
|
||||||
throws MavenExecutionRequestPopulationException
|
throws MavenExecutionRequestPopulationException
|
||||||
|
@ -107,11 +107,11 @@ public class DefaultMavenExecutionRequestPopulator
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
private void populateDefaultPluginGroups( MavenExecutionRequest request )
|
private void populateDefaultPluginGroups( MavenExecutionRequest request )
|
||||||
{
|
{
|
||||||
request.addPluginGroup( "org.apache.maven.plugins" );
|
request.addPluginGroup( "org.apache.maven.plugins" );
|
||||||
|
@ -211,10 +211,10 @@ public class DefaultMavenExecutionRequestPopulator
|
||||||
{
|
{
|
||||||
request.setBaseDirectory( request.getPom().getAbsoluteFile().getParentFile() );
|
request.setBaseDirectory( request.getPom().getAbsoluteFile().getParentFile() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if_not[MAVEN4]*/
|
/*if_not[MAVEN4]*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MavenExecutionRequest populateFromSettings( MavenExecutionRequest request, Settings settings )
|
public MavenExecutionRequest populateFromSettings( MavenExecutionRequest request, Settings settings )
|
||||||
|
@ -316,8 +316,8 @@ public class DefaultMavenExecutionRequestPopulator
|
||||||
}
|
}
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*end[MAVEN4]*/
|
/*end[MAVEN4]*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public interface MavenExecutionRequestPopulator
|
||||||
throws MavenExecutionRequestPopulationException;
|
throws MavenExecutionRequestPopulationException;
|
||||||
|
|
||||||
/*if_not[MAVEN4]*/
|
/*if_not[MAVEN4]*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the values from the given settings into the specified execution request. This method will replace any
|
* Copies the values from the given settings into the specified execution request. This method will replace any
|
||||||
* existing values in the execution request that are controlled by the settings. Hence, it is expected that this
|
* existing values in the execution request that are controlled by the settings. Hence, it is expected that this
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class MavenSession
|
||||||
{
|
{
|
||||||
this.projectMap = projectMap;
|
this.projectMap = projectMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is a provisional method and may be removed */
|
/** This is a provisional method and may be removed */
|
||||||
public List<MavenProject> getAllProjects()
|
public List<MavenProject> getAllProjects()
|
||||||
{
|
{
|
||||||
|
@ -285,24 +285,24 @@ public class MavenSession
|
||||||
{
|
{
|
||||||
this.allProjects = allProjects;
|
this.allProjects = allProjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if_not[MAVEN4]*/
|
/*if_not[MAVEN4]*/
|
||||||
|
|
||||||
//
|
//
|
||||||
// Deprecated
|
// Deprecated
|
||||||
//
|
//
|
||||||
|
|
||||||
private PlexusContainer container;
|
private PlexusContainer container;
|
||||||
|
|
||||||
private final Settings settings;
|
private final Settings settings;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
/** @deprecated This appears not to be used anywhere within Maven itself. */
|
/** @deprecated This appears not to be used anywhere within Maven itself. */
|
||||||
public Map<String, MavenProject> getProjectMap()
|
public Map<String, MavenProject> getProjectMap()
|
||||||
{
|
{
|
||||||
return projectMap;
|
return projectMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MavenSession( PlexusContainer container, RepositorySystemSession repositorySession,
|
public MavenSession( PlexusContainer container, RepositorySystemSession repositorySession,
|
||||||
MavenExecutionRequest request, MavenExecutionResult result )
|
MavenExecutionRequest request, MavenExecutionResult result )
|
||||||
|
@ -313,7 +313,7 @@ public class MavenSession
|
||||||
this.settings = new SettingsAdapter( request );
|
this.settings = new SettingsAdapter( request );
|
||||||
this.repositorySession = repositorySession;
|
this.repositorySession = repositorySession;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MavenSession( PlexusContainer container, MavenExecutionRequest request, MavenExecutionResult result,
|
public MavenSession( PlexusContainer container, MavenExecutionRequest request, MavenExecutionResult result,
|
||||||
MavenProject project )
|
MavenProject project )
|
||||||
|
@ -365,7 +365,7 @@ public class MavenSession
|
||||||
{
|
{
|
||||||
return getProjects();
|
return getProjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
//
|
//
|
||||||
// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
|
// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
|
||||||
|
@ -403,7 +403,7 @@ public class MavenSession
|
||||||
|
|
||||||
return executionProperties;
|
return executionProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public PlexusContainer getContainer()
|
public PlexusContainer getContainer()
|
||||||
{
|
{
|
||||||
|
@ -436,7 +436,7 @@ public class MavenSession
|
||||||
throws ComponentLookupException
|
throws ComponentLookupException
|
||||||
{
|
{
|
||||||
return container.lookupMap( role );
|
return container.lookupMap( role );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*end[MAVEN4]*/
|
/*end[MAVEN4]*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
||||||
/**
|
/**
|
||||||
* Provides information about artifacts (identified by groupId:artifactId string key) and classpath elements exported by
|
* Provides information about artifacts (identified by groupId:artifactId string key) and classpath elements exported by
|
||||||
* Maven core itself and loaded Maven core extensions.
|
* Maven core itself and loaded Maven core extensions.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
public class CoreExports
|
public class CoreExports
|
||||||
|
|
|
@ -54,13 +54,13 @@ class ConsumerModelSourceTransformer extends AbstractModelSourceTransformer
|
||||||
return new DefaultConsumerPomXMLFilterFactory( new DefaultBuildPomXMLFilterFactory( context,
|
return new DefaultConsumerPomXMLFilterFactory( new DefaultBuildPomXMLFilterFactory( context,
|
||||||
lexicalHandlerConsumer, true ) ).get( pomFile );
|
lexicalHandlerConsumer, true ) ).get( pomFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This transformer will ensure that encoding and version are kept.
|
* This transformer will ensure that encoding and version are kept.
|
||||||
* However, it cannot prevent:
|
* However, it cannot prevent:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>attributes will be on one line</li>
|
* <li>attributes will be on one line</li>
|
||||||
* <li>Unnecessary whitespace before the rootelement will be removed</li>
|
* <li>Unnecessary whitespace before the rootelement will be removed</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -68,9 +68,9 @@ class ConsumerModelSourceTransformer extends AbstractModelSourceTransformer
|
||||||
throws IOException, org.apache.maven.model.building.TransformerException
|
throws IOException, org.apache.maven.model.building.TransformerException
|
||||||
{
|
{
|
||||||
final TransformerHandler transformerHandler;
|
final TransformerHandler transformerHandler;
|
||||||
|
|
||||||
final SAXTransformerFactory transformerFactory = getTransformerFactory();
|
final SAXTransformerFactory transformerFactory = getTransformerFactory();
|
||||||
|
|
||||||
// Keep same encoding+version
|
// Keep same encoding+version
|
||||||
try ( InputStream input = Files.newInputStream( pomFile ) )
|
try ( InputStream input = Files.newInputStream( pomFile ) )
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ class ConsumerModelSourceTransformer extends AbstractModelSourceTransformer
|
||||||
|
|
||||||
final String encoding = streamReader.getCharacterEncodingScheme();
|
final String encoding = streamReader.getCharacterEncodingScheme();
|
||||||
final String version = streamReader.getVersion();
|
final String version = streamReader.getVersion();
|
||||||
|
|
||||||
Transformer transformer = transformerHandler.getTransformer();
|
Transformer transformer = transformerHandler.getTransformer();
|
||||||
transformer.setOutputProperty( OutputKeys.METHOD, "xml" );
|
transformer.setOutputProperty( OutputKeys.METHOD, "xml" );
|
||||||
if ( encoding == null && version == null )
|
if ( encoding == null && version == null )
|
||||||
|
@ -104,7 +104,7 @@ class ConsumerModelSourceTransformer extends AbstractModelSourceTransformer
|
||||||
}
|
}
|
||||||
catch ( XMLStreamException | TransformerConfigurationException e )
|
catch ( XMLStreamException | TransformerConfigurationException e )
|
||||||
{
|
{
|
||||||
throw new org.apache.maven.model.building.TransformerException(
|
throw new org.apache.maven.model.building.TransformerException(
|
||||||
"Failed to detect XML encoding and version", e );
|
"Failed to detect XML encoding and version", e );
|
||||||
}
|
}
|
||||||
return transformerHandler;
|
return transformerHandler;
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class DefaultLifecycles
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lifecycle based on phase
|
* Get lifecycle based on phase
|
||||||
*
|
*
|
||||||
* @param phase
|
* @param phase
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -121,22 +121,22 @@ public class DefaultLifecycles
|
||||||
public List<Lifecycle> getLifeCycles()
|
public List<Lifecycle> getLifeCycles()
|
||||||
{
|
{
|
||||||
List<String> lifecycleIds = Arrays.asList( STANDARD_LIFECYCLES );
|
List<String> lifecycleIds = Arrays.asList( STANDARD_LIFECYCLES );
|
||||||
|
|
||||||
Comparator<String> comparator = ( l, r ) ->
|
Comparator<String> comparator = ( l, r ) ->
|
||||||
{
|
{
|
||||||
int lx = lifecycleIds.indexOf( l );
|
int lx = lifecycleIds.indexOf( l );
|
||||||
int rx = lifecycleIds.indexOf( r );
|
int rx = lifecycleIds.indexOf( r );
|
||||||
|
|
||||||
if ( lx < 0 || rx < 0 )
|
if ( lx < 0 || rx < 0 )
|
||||||
{
|
{
|
||||||
return rx - lx;
|
return rx - lx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return lx - rx;
|
return lx - rx;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ensure canonical order of standard lifecycles
|
// ensure canonical order of standard lifecycles
|
||||||
return lifecyclesMap.values().stream()
|
return lifecyclesMap.values().stream()
|
||||||
.peek( l -> Objects.requireNonNull( l.getId(), "A lifecycle must have an id." ) )
|
.peek( l -> Objects.requireNonNull( l.getId(), "A lifecycle must have an id." ) )
|
||||||
|
@ -150,5 +150,5 @@ public class DefaultLifecycles
|
||||||
.flatMap( l -> l.getPhases().stream() )
|
.flatMap( l -> l.getPhases().stream() )
|
||||||
.collect( Collectors.joining( ", " ) );
|
.collect( Collectors.joining( ", " ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class Lifecycle
|
||||||
{
|
{
|
||||||
return defaultPhases;
|
return defaultPhases;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Map<String, String> getDefaultPhases()
|
public Map<String, String> getDefaultPhases()
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ public interface MojoExecutionConfigurator
|
||||||
/**
|
/**
|
||||||
* Create the MojoExecution configuration based on configuration for a Mojo in the MavenProject and the
|
* Create the MojoExecution configuration based on configuration for a Mojo in the MavenProject and the
|
||||||
* default configuration for the Mojo from the containing plugin's plugin.xml descriptor.
|
* default configuration for the Mojo from the containing plugin's plugin.xml descriptor.
|
||||||
*
|
*
|
||||||
* @param project
|
* @param project
|
||||||
* @param mojoExecution
|
* @param mojoExecution
|
||||||
* @param allowPluginLevelConfig
|
* @param allowPluginLevelConfig
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.maven.project.MavenProject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Kristian Rosenvold
|
* @author Kristian Rosenvold
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -65,7 +65,7 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
* @author Kristian Rosenvold (Extract class)
|
* @author Kristian Rosenvold (Extract class)
|
||||||
|
@ -155,7 +155,7 @@ public class DefaultLifecycleExecutionPlanCalculator
|
||||||
LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
|
LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
|
||||||
{
|
{
|
||||||
Set<MojoDescriptor> alreadyPlannedExecutions = fillMojoDescriptors( session, project, mojoExecutions );
|
Set<MojoDescriptor> alreadyPlannedExecutions = fillMojoDescriptors( session, project, mojoExecutions );
|
||||||
|
|
||||||
for ( MojoExecution mojoExecution : mojoExecutions )
|
for ( MojoExecution mojoExecution : mojoExecutions )
|
||||||
{
|
{
|
||||||
setupMojoExecution( session, project, mojoExecution, alreadyPlannedExecutions );
|
setupMojoExecution( session, project, mojoExecution, alreadyPlannedExecutions );
|
||||||
|
|
|
@ -45,7 +45,7 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
* @author Jason van Zyl
|
* @author Jason van Zyl
|
||||||
|
@ -153,13 +153,13 @@ public class DefaultLifecyclePluginAnalyzer
|
||||||
List<LifecycleMojo> mojos = goals.getMojos();
|
List<LifecycleMojo> mojos = goals.getMojos();
|
||||||
if ( mojos != null )
|
if ( mojos != null )
|
||||||
{
|
{
|
||||||
|
|
||||||
for ( int i = 0; i < mojos.size(); i++ )
|
for ( int i = 0; i < mojos.size(); i++ )
|
||||||
{
|
{
|
||||||
LifecycleMojo mojo = mojos.get( i );
|
LifecycleMojo mojo = mojos.get( i );
|
||||||
|
|
||||||
GoalSpec gs = parseGoalSpec( mojo.getGoal() );
|
GoalSpec gs = parseGoalSpec( mojo.getGoal() );
|
||||||
|
|
||||||
if ( gs == null )
|
if ( gs == null )
|
||||||
{
|
{
|
||||||
logger.warn( "Ignored invalid goal specification '" + mojo.getGoal()
|
logger.warn( "Ignored invalid goal specification '" + mojo.getGoal()
|
||||||
|
@ -176,7 +176,7 @@ public class DefaultLifecyclePluginAnalyzer
|
||||||
plugin.setLocation( "groupId", location );
|
plugin.setLocation( "groupId", location );
|
||||||
plugin.setLocation( "artifactId", location );
|
plugin.setLocation( "artifactId", location );
|
||||||
plugin.setLocation( "version", location );
|
plugin.setLocation( "version", location );
|
||||||
|
|
||||||
Plugin existing = plugins.get( plugin );
|
Plugin existing = plugins.get( plugin );
|
||||||
if ( existing != null )
|
if ( existing != null )
|
||||||
{
|
{
|
||||||
|
@ -191,7 +191,7 @@ public class DefaultLifecyclePluginAnalyzer
|
||||||
{
|
{
|
||||||
plugins.put( plugin, plugin );
|
plugins.put( plugin, plugin );
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginExecution execution = new PluginExecution();
|
PluginExecution execution = new PluginExecution();
|
||||||
execution.setId( getExecutionId( plugin, gs.goal ) );
|
execution.setId( getExecutionId( plugin, gs.goal ) );
|
||||||
execution.setPhase( phase );
|
execution.setPhase( phase );
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.TreeSet;
|
||||||
* Context of dependency artifacts for a particular project.
|
* Context of dependency artifacts for a particular project.
|
||||||
* </p>
|
* </p>
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
* @author Kristian Rosenvold (class extract only)
|
* @author Kristian Rosenvold (class extract only)
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class LifecycleDependencyResolver
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EventSpyDispatcher eventSpyDispatcher;
|
private EventSpyDispatcher eventSpyDispatcher;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ProjectArtifactsCache projectArtifactsCache;
|
private ProjectArtifactsCache projectArtifactsCache;
|
||||||
|
|
||||||
|
@ -129,13 +129,13 @@ public class LifecycleDependencyResolver
|
||||||
throw new LifecycleExecutionException( e );
|
throw new LifecycleExecutionException( e );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Artifact> resolvedArtifacts;
|
Set<Artifact> resolvedArtifacts;
|
||||||
ProjectArtifactsCache.Key cacheKey = projectArtifactsCache.createKey( project, scopesToCollect,
|
ProjectArtifactsCache.Key cacheKey = projectArtifactsCache.createKey( project, scopesToCollect,
|
||||||
scopesToResolve, aggregating, session.getRepositorySession() );
|
scopesToResolve, aggregating, session.getRepositorySession() );
|
||||||
ProjectArtifactsCache.CacheRecord recordArtifacts;
|
ProjectArtifactsCache.CacheRecord recordArtifacts;
|
||||||
recordArtifacts = projectArtifactsCache.get( cacheKey );
|
recordArtifacts = projectArtifactsCache.get( cacheKey );
|
||||||
|
|
||||||
if ( recordArtifacts != null )
|
if ( recordArtifacts != null )
|
||||||
{
|
{
|
||||||
resolvedArtifacts = recordArtifacts.getArtifacts();
|
resolvedArtifacts = recordArtifacts.getArtifacts();
|
||||||
|
@ -167,7 +167,7 @@ public class LifecycleDependencyResolver
|
||||||
for ( Artifact artifact : resolvedArtifacts )
|
for ( Artifact artifact : resolvedArtifacts )
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* MNG-6300: resolvedArtifacts can be cache result; this ensures reactor files are always up to date
|
* MNG-6300: resolvedArtifacts can be cache result; this ensures reactor files are always up to date
|
||||||
* During lifecycle the Artifact.getFile() can change from target/classes to the actual jar.
|
* During lifecycle the Artifact.getFile() can change from target/classes to the actual jar.
|
||||||
* This clearly shows that target/classes should not be abused as artifactFile just for the classpath
|
* This clearly shows that target/classes should not be abused as artifactFile just for the classpath
|
||||||
*/
|
*/
|
||||||
|
@ -179,9 +179,9 @@ public class LifecycleDependencyResolver
|
||||||
|
|
||||||
map.put( artifact.getDependencyConflictId(), artifact );
|
map.put( artifact.getDependencyConflictId(), artifact );
|
||||||
}
|
}
|
||||||
|
|
||||||
project.setResolvedArtifacts( resolvedArtifacts );
|
project.setResolvedArtifacts( resolvedArtifacts );
|
||||||
|
|
||||||
for ( Artifact artifact : project.getDependencyArtifacts() )
|
for ( Artifact artifact : project.getDependencyArtifacts() )
|
||||||
{
|
{
|
||||||
if ( artifact.getFile() == null )
|
if ( artifact.getFile() == null )
|
||||||
|
|
|
@ -42,7 +42,7 @@ import org.apache.maven.session.scope.internal.SessionScope;
|
||||||
* Builds one or more lifecycles for a full module
|
* Builds one or more lifecycles for a full module
|
||||||
* </p>
|
* </p>
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
* @author Jason van Zyl
|
* @author Jason van Zyl
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class LifecycleStarter
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Map<String, Builder> builders;
|
private Map<String, Builder> builders;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SessionScope sessionScope;
|
private SessionScope sessionScope;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.maven.project.artifact.InvalidDependencyVersionException;
|
||||||
* Component interface responsible for creation of MavenProject#dependencyArtifacts instances.
|
* Component interface responsible for creation of MavenProject#dependencyArtifacts instances.
|
||||||
* </p>
|
* </p>
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.2.4
|
* @since 3.2.4
|
||||||
*/
|
*/
|
||||||
public interface ProjectArtifactFactory
|
public interface ProjectArtifactFactory
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||||
* Describes the required task segment as provided on the maven command line; i.e. "clean jetty:run install"
|
* Describes the required task segment as provided on the maven command line; i.e. "clean jetty:run install"
|
||||||
*
|
*
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
* @author Kristian Rosenvold (extracted class only)
|
* @author Kristian Rosenvold (extracted class only)
|
||||||
|
|
|
@ -140,18 +140,18 @@ public class BuilderCommon
|
||||||
logger.warn( "*****************************************************************" );
|
logger.warn( "*****************************************************************" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final String defaulModelId = DefaultLifecyclePluginAnalyzer.DEFAULTLIFECYCLEBINDINGS_MODELID;
|
final String defaulModelId = DefaultLifecyclePluginAnalyzer.DEFAULTLIFECYCLEBINDINGS_MODELID;
|
||||||
|
|
||||||
List<String> unversionedPlugins = executionPlan.getMojoExecutions().stream()
|
List<String> unversionedPlugins = executionPlan.getMojoExecutions().stream()
|
||||||
.map( MojoExecution::getPlugin )
|
.map( MojoExecution::getPlugin )
|
||||||
.filter( p -> p.getLocation( "version" ) != null ) // versionless cli goal (?)
|
.filter( p -> p.getLocation( "version" ) != null ) // versionless cli goal (?)
|
||||||
.filter( p -> p.getLocation( "version" ).getSource() != null ) // versionless in pom (?)
|
.filter( p -> p.getLocation( "version" ).getSource() != null ) // versionless in pom (?)
|
||||||
.filter( p -> defaulModelId.equals( p.getLocation( "version" ).getSource().getModelId() ) )
|
.filter( p -> defaulModelId.equals( p.getLocation( "version" ).getSource().getModelId() ) )
|
||||||
.distinct()
|
.distinct()
|
||||||
.map( Plugin::getArtifactId ) // managed by us, groupId is always o.a.m.plugins
|
.map( Plugin::getArtifactId ) // managed by us, groupId is always o.a.m.plugins
|
||||||
.collect( Collectors.toList() );
|
.collect( Collectors.toList() );
|
||||||
|
|
||||||
if ( !unversionedPlugins.isEmpty() )
|
if ( !unversionedPlugins.isEmpty() )
|
||||||
{
|
{
|
||||||
logger.warn( "Version not locked for default bindings plugins " + unversionedPlugins
|
logger.warn( "Version not locked for default bindings plugins " + unversionedPlugins
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.apache.maven.lifecycle.internal.ProjectSegment;
|
||||||
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
* <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
* This class in particular may spontaneously self-combust and be replaced by a plexus-compliant thread aware
|
* This class in particular may spontaneously self-combust and be replaced by a plexus-compliant thread aware
|
||||||
* logger implementation at any time.
|
* logger implementation at any time.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Kristian Rosenvold
|
* @author Kristian Rosenvold
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class DefaultLifecycleMapping
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Map<String, String> getPhases( String lifecycle )
|
public Map<String, String> getPhases( String lifecycle )
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,36 +29,36 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||||
*/
|
*/
|
||||||
public class LifecycleMojo
|
public class LifecycleMojo
|
||||||
{
|
{
|
||||||
|
|
||||||
private String goal;
|
private String goal;
|
||||||
private Xpp3Dom configuration;
|
private Xpp3Dom configuration;
|
||||||
private List<Dependency> dependencies;
|
private List<Dependency> dependencies;
|
||||||
|
|
||||||
public String getGoal()
|
public String getGoal()
|
||||||
{
|
{
|
||||||
return goal;
|
return goal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Xpp3Dom getConfiguration()
|
public Xpp3Dom getConfiguration()
|
||||||
{
|
{
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Dependency> getDependencies()
|
public List<Dependency> getDependencies()
|
||||||
{
|
{
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoal( String goal )
|
public void setGoal( String goal )
|
||||||
{
|
{
|
||||||
this.goal = goal;
|
this.goal = goal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfiguration( Xpp3Dom configuration )
|
public void setConfiguration( Xpp3Dom configuration )
|
||||||
{
|
{
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDependencies( List<Dependency> dependencies )
|
public void setDependencies( List<Dependency> dependencies )
|
||||||
{
|
{
|
||||||
this.dependencies = dependencies;
|
this.dependencies = dependencies;
|
||||||
|
|
|
@ -32,36 +32,36 @@ import org.codehaus.plexus.util.StringUtils;
|
||||||
*/
|
*/
|
||||||
public class LifecyclePhase
|
public class LifecyclePhase
|
||||||
{
|
{
|
||||||
|
|
||||||
private List<LifecycleMojo> mojos;
|
private List<LifecycleMojo> mojos;
|
||||||
|
|
||||||
public LifecyclePhase()
|
public LifecyclePhase()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public LifecyclePhase( String goals )
|
public LifecyclePhase( String goals )
|
||||||
{
|
{
|
||||||
set( goals );
|
set( goals );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LifecycleMojo> getMojos()
|
public List<LifecycleMojo> getMojos()
|
||||||
{
|
{
|
||||||
return mojos;
|
return mojos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMojos( List<LifecycleMojo> mojos )
|
public void setMojos( List<LifecycleMojo> mojos )
|
||||||
{
|
{
|
||||||
this.mojos = mojos;
|
this.mojos = mojos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set( String goals )
|
public void set( String goals )
|
||||||
{
|
{
|
||||||
mojos = new ArrayList<>();
|
mojos = new ArrayList<>();
|
||||||
|
|
||||||
if ( StringUtils.isNotEmpty( goals ) )
|
if ( StringUtils.isNotEmpty( goals ) )
|
||||||
{
|
{
|
||||||
String[] mojoGoals = StringUtils.split( goals, "," );
|
String[] mojoGoals = StringUtils.split( goals, "," );
|
||||||
|
|
||||||
for ( String mojoGoal: mojoGoals )
|
for ( String mojoGoal: mojoGoals )
|
||||||
{
|
{
|
||||||
LifecycleMojo lifecycleMojo = new LifecycleMojo();
|
LifecycleMojo lifecycleMojo = new LifecycleMojo();
|
||||||
|
@ -70,7 +70,7 @@ public class LifecyclePhase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class LifecyclePhase
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static Map<String, String> toLegacyMap( Map<String, LifecyclePhase> lifecyclePhases )
|
public static Map<String, String> toLegacyMap( Map<String, LifecyclePhase> lifecyclePhases )
|
||||||
{
|
{
|
||||||
|
@ -102,12 +102,12 @@ public class LifecyclePhase
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( lifecyclePhases.isEmpty() )
|
if ( lifecyclePhases.isEmpty() )
|
||||||
{
|
{
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> phases = new LinkedHashMap<>();
|
Map<String, String> phases = new LinkedHashMap<>();
|
||||||
for ( Map.Entry<String, LifecyclePhase> e: lifecyclePhases.entrySet() )
|
for ( Map.Entry<String, LifecyclePhase> e: lifecyclePhases.entrySet() )
|
||||||
{
|
{
|
||||||
|
@ -115,5 +115,5 @@ public class LifecyclePhase
|
||||||
}
|
}
|
||||||
return phases;
|
return phases;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,9 +122,9 @@ public class DefaultPluginArtifactsCache
|
||||||
|
|
||||||
CacheKey that = (CacheKey) o;
|
CacheKey that = (CacheKey) o;
|
||||||
|
|
||||||
return CacheUtils.pluginEquals( plugin, that.plugin )
|
return CacheUtils.pluginEquals( plugin, that.plugin )
|
||||||
&& Objects.equals( workspace, that.workspace )
|
&& Objects.equals( workspace, that.workspace )
|
||||||
&& Objects.equals( localRepo, that.localRepo )
|
&& Objects.equals( localRepo, that.localRepo )
|
||||||
&& RepositoryUtils.repositoriesEquals( repositories, that.repositories )
|
&& RepositoryUtils.repositoriesEquals( repositories, that.repositories )
|
||||||
&& Objects.equals( filter, that.filter );
|
&& Objects.equals( filter, that.filter );
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,9 +197,9 @@ public class DefaultPluginDescriptorCache
|
||||||
|
|
||||||
CacheKey that = (CacheKey) obj;
|
CacheKey that = (CacheKey) obj;
|
||||||
|
|
||||||
return Objects.equals( this.artifactId, that.artifactId )
|
return Objects.equals( this.artifactId, that.artifactId )
|
||||||
&& Objects.equals( this.groupId, that.groupId )
|
&& Objects.equals( this.groupId, that.groupId )
|
||||||
&& Objects.equals( this.version, that.version )
|
&& Objects.equals( this.version, that.version )
|
||||||
&& Objects.equals( this.localRepo, that.localRepo )
|
&& Objects.equals( this.localRepo, that.localRepo )
|
||||||
&& Objects.equals( this.workspace, that.workspace )
|
&& Objects.equals( this.workspace, that.workspace )
|
||||||
&& RepositoryUtils.repositoriesEquals( this.repositories, that.repositories );
|
&& RepositoryUtils.repositoriesEquals( this.repositories, that.repositories );
|
||||||
|
|
|
@ -135,11 +135,11 @@ public class DefaultPluginRealmCache
|
||||||
|
|
||||||
CacheKey that = (CacheKey) o;
|
CacheKey that = (CacheKey) o;
|
||||||
|
|
||||||
return parentRealm == that.parentRealm
|
return parentRealm == that.parentRealm
|
||||||
&& CacheUtils.pluginEquals( plugin, that.plugin )
|
&& CacheUtils.pluginEquals( plugin, that.plugin )
|
||||||
&& Objects.equals( workspace, that.workspace )
|
&& Objects.equals( workspace, that.workspace )
|
||||||
&& Objects.equals( localRepo, that.localRepo )
|
&& Objects.equals( localRepo, that.localRepo )
|
||||||
&& RepositoryUtils.repositoriesEquals( this.repositories, that.repositories )
|
&& RepositoryUtils.repositoriesEquals( this.repositories, that.repositories )
|
||||||
&& Objects.equals( filter, that.filter )
|
&& Objects.equals( filter, that.filter )
|
||||||
&& Objects.equals( foreignImports, that.foreignImports );
|
&& Objects.equals( foreignImports, that.foreignImports );
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ public interface MavenPluginManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up class realm for the specified build extensions plugin.
|
* Sets up class realm for the specified build extensions plugin.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
ExtensionRealmCache.CacheRecord setupExtensionsRealm( MavenProject project, Plugin plugin,
|
ExtensionRealmCache.CacheRecord setupExtensionsRealm( MavenProject project, Plugin plugin,
|
||||||
|
|
|
@ -54,7 +54,7 @@ import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
|
||||||
* <tr><td><code>settings</code></td> <td></td> <td>{@link MavenSession#getSettings()}</td></tr>
|
* <tr><td><code>settings</code></td> <td></td> <td>{@link MavenSession#getSettings()}</td></tr>
|
||||||
* <tr><td><code>settings.*</code></td> <td></td> <td></td></tr>
|
* <tr><td><code>settings.*</code></td> <td></td> <td></td></tr>
|
||||||
* <tr><td><code>basedir</code></td> <td></td>
|
* <tr><td><code>basedir</code></td> <td></td>
|
||||||
* <td>{@link MavenSession#getExecutionRootDirectory()} or
|
* <td>{@link MavenSession#getExecutionRootDirectory()} or
|
||||||
* <code>System.getProperty( "user.dir" )</code> if null</td></tr>
|
* <code>System.getProperty( "user.dir" )</code> if null</td></tr>
|
||||||
* <tr><td><code>mojoExecution</code></td> <td></td> <td>the actual {@link MojoExecution}</td></tr>
|
* <tr><td><code>mojoExecution</code></td> <td></td> <td>the actual {@link MojoExecution}</td></tr>
|
||||||
* <tr><td><code>mojo</code></td> <td>(since Maven 3)</td><td>same as <code>mojoExecution</code></td></tr>
|
* <tr><td><code>mojo</code></td> <td>(since Maven 3)</td><td>same as <code>mojoExecution</code></td></tr>
|
||||||
|
@ -106,12 +106,12 @@ public class PluginParameterExpressionEvaluator
|
||||||
this.project = session.getCurrentProject();
|
this.project = session.getCurrentProject();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Maven4: We may want to evaluate how this is used but we add these separate as the
|
// Maven4: We may want to evaluate how this is used but we add these separate as the
|
||||||
// getExecutionProperties is deprecated in MavenSession.
|
// getExecutionProperties is deprecated in MavenSession.
|
||||||
//
|
//
|
||||||
this.properties.putAll( session.getUserProperties() );
|
this.properties.putAll( session.getUserProperties() );
|
||||||
this.properties.putAll( session.getSystemProperties() );
|
this.properties.putAll( session.getSystemProperties() );
|
||||||
|
|
||||||
String basedir = null;
|
String basedir = null;
|
||||||
|
|
||||||
if ( project != null )
|
if ( project != null )
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class DefaultMavenPluginManager
|
||||||
* same class realm is used to load build extensions and load mojos for extensions=true plugins.
|
* same class realm is used to load build extensions and load mojos for extensions=true plugins.
|
||||||
* </p>
|
* </p>
|
||||||
* <strong>Note:</strong> This is part of internal implementation and may be changed or removed without notice
|
* <strong>Note:</strong> This is part of internal implementation and may be changed or removed without notice
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
public static final String KEY_EXTENSIONS_REALMS = DefaultMavenPluginManager.class.getName() + "/extensionsRealms";
|
public static final String KEY_EXTENSIONS_REALMS = DefaultMavenPluginManager.class.getName() + "/extensionsRealms";
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ public class MavenProject
|
||||||
MavenProject that = (MavenProject) other;
|
MavenProject that = (MavenProject) other;
|
||||||
|
|
||||||
return Objects.equals( getArtifactId(), that.getArtifactId() )
|
return Objects.equals( getArtifactId(), that.getArtifactId() )
|
||||||
&& Objects.equals( getGroupId(), that.getGroupId() )
|
&& Objects.equals( getGroupId(), that.getGroupId() )
|
||||||
&& Objects.equals( getVersion(), that.getVersion() );
|
&& Objects.equals( getVersion(), that.getVersion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class ProjectModelResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
dependency.setVersion( versionRangeResult.getHighestVersion().toString() );
|
dependency.setVersion( versionRangeResult.getHighestVersion().toString() );
|
||||||
|
|
||||||
if ( modelPool != null )
|
if ( modelPool != null )
|
||||||
{
|
{
|
||||||
Model model =
|
Model model =
|
||||||
|
|
|
@ -108,13 +108,13 @@ class ReactorModelCache
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class SourceCacheKey
|
private static final class SourceCacheKey
|
||||||
{
|
{
|
||||||
private final Source source;
|
private final Source source;
|
||||||
|
|
||||||
private final String tag;
|
private final String tag;
|
||||||
|
|
||||||
private final int hashCode;
|
private final int hashCode;
|
||||||
|
|
||||||
SourceCacheKey( Source source, String tag )
|
SourceCacheKey( Source source, String tag )
|
||||||
|
@ -133,7 +133,7 @@ class ReactorModelCache
|
||||||
@Override
|
@Override
|
||||||
public boolean equals( Object obj )
|
public boolean equals( Object obj )
|
||||||
{
|
{
|
||||||
if ( this == obj )
|
if ( this == obj )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -141,13 +141,13 @@ class ReactorModelCache
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceCacheKey other = (SourceCacheKey) obj;
|
SourceCacheKey other = (SourceCacheKey) obj;
|
||||||
if ( !Objects.equals( this.source, other.source ) )
|
if ( !Objects.equals( this.source, other.source ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !Objects.equals( this.tag, other.tag ) )
|
if ( !Objects.equals( this.tag, other.tag ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -45,7 +45,7 @@ class ReactorModelPool
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the model by its GAV or (since 4.0.0) by its GA if there is only one.
|
* Get the model by its GAV or (since 4.0.0) by its GA if there is only one.
|
||||||
*
|
*
|
||||||
* @param groupId, never {@code null}
|
* @param groupId, never {@code null}
|
||||||
* @param artifactId, never {@code null}
|
* @param artifactId, never {@code null}
|
||||||
* @param version, can be {@code null}
|
* @param version, can be {@code null}
|
||||||
|
@ -56,7 +56,7 @@ class ReactorModelPool
|
||||||
{
|
{
|
||||||
return modelsByGa.getOrDefault( new GAKey( groupId, artifactId ), Collections.emptySet() ).stream()
|
return modelsByGa.getOrDefault( new GAKey( groupId, artifactId ), Collections.emptySet() ).stream()
|
||||||
.filter( m -> version == null || version.equals( getVersion( m ) ) )
|
.filter( m -> version == null || version.equals( getVersion( m ) ) )
|
||||||
.reduce( ( a, b ) ->
|
.reduce( ( a, b ) ->
|
||||||
{
|
{
|
||||||
throw new IllegalStateException( "Multiple modules with key "
|
throw new IllegalStateException( "Multiple modules with key "
|
||||||
+ a.getGroupId() + ':' + a.getArtifactId() );
|
+ a.getGroupId() + ':' + a.getArtifactId() );
|
||||||
|
@ -65,7 +65,7 @@ class ReactorModelPool
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find model by path, useful when location the parent by relativePath
|
* Find model by path, useful when location the parent by relativePath
|
||||||
*
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* @return the matching model or {@code null}
|
* @return the matching model or {@code null}
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
|
@ -83,7 +83,7 @@ class ReactorModelPool
|
||||||
}
|
}
|
||||||
return modelsByPath.get( pomFile );
|
return modelsByPath.get( pomFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getVersion( Model model )
|
private String getVersion( Model model )
|
||||||
{
|
{
|
||||||
String version = model.getVersion();
|
String version = model.getVersion();
|
||||||
|
@ -97,7 +97,7 @@ class ReactorModelPool
|
||||||
static class Builder
|
static class Builder
|
||||||
{
|
{
|
||||||
private ReactorModelPool pool = new ReactorModelPool();
|
private ReactorModelPool pool = new ReactorModelPool();
|
||||||
|
|
||||||
Builder put( Path pomFile, Model model )
|
Builder put( Path pomFile, Model model )
|
||||||
{
|
{
|
||||||
pool.modelsByPath.put( pomFile, model );
|
pool.modelsByPath.put( pomFile, model );
|
||||||
|
@ -105,8 +105,8 @@ class ReactorModelPool
|
||||||
k -> new HashSet<Model>() ).add( model );
|
k -> new HashSet<Model>() ).add( model );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactorModelPool build()
|
ReactorModelPool build()
|
||||||
{
|
{
|
||||||
return pool;
|
return pool;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ import org.eclipse.aether.RepositorySystemSession;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component interface that allows per-project customization of Aether repository system sessions.
|
* Component interface that allows per-project customization of Aether repository system sessions.
|
||||||
*
|
*
|
||||||
* <strong>Note:</strong> This interface is part of work in progress and can be changed or removed without notice.
|
* <strong>Note:</strong> This interface is part of work in progress and can be changed or removed without notice.
|
||||||
* @since 3.2.4
|
* @since 3.2.4
|
||||||
*/
|
*/
|
||||||
public interface RepositorySessionDecorator
|
public interface RepositorySessionDecorator
|
||||||
|
|
|
@ -60,11 +60,11 @@ public class DefaultProjectArtifactsCache
|
||||||
{
|
{
|
||||||
|
|
||||||
private final String groupId;
|
private final String groupId;
|
||||||
|
|
||||||
private final String artifactId;
|
private final String artifactId;
|
||||||
|
|
||||||
private final String version;
|
private final String version;
|
||||||
|
|
||||||
private final Set<String> dependencyArtifacts;
|
private final Set<String> dependencyArtifacts;
|
||||||
|
|
||||||
private final WorkspaceRepository workspace;
|
private final WorkspaceRepository workspace;
|
||||||
|
@ -72,11 +72,11 @@ public class DefaultProjectArtifactsCache
|
||||||
private final LocalRepository localRepo;
|
private final LocalRepository localRepo;
|
||||||
|
|
||||||
private final List<RemoteRepository> repositories;
|
private final List<RemoteRepository> repositories;
|
||||||
|
|
||||||
private final Set<String> collect;
|
private final Set<String> collect;
|
||||||
|
|
||||||
private final Set<String> resolve;
|
private final Set<String> resolve;
|
||||||
|
|
||||||
private boolean aggregating;
|
private boolean aggregating;
|
||||||
|
|
||||||
private final int hashCode;
|
private final int hashCode;
|
||||||
|
@ -85,11 +85,11 @@ public class DefaultProjectArtifactsCache
|
||||||
Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating,
|
Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating,
|
||||||
RepositorySystemSession session )
|
RepositorySystemSession session )
|
||||||
{
|
{
|
||||||
|
|
||||||
groupId = project.getGroupId();
|
groupId = project.getGroupId();
|
||||||
artifactId = project.getArtifactId();
|
artifactId = project.getArtifactId();
|
||||||
version = project.getVersion();
|
version = project.getVersion();
|
||||||
|
|
||||||
Set<String> deps = new LinkedHashSet<>();
|
Set<String> deps = new LinkedHashSet<>();
|
||||||
if ( project.getDependencyArtifacts() != null )
|
if ( project.getDependencyArtifacts() != null )
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ public class DefaultProjectArtifactsCache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencyArtifacts = Collections.unmodifiableSet( deps );
|
dependencyArtifacts = Collections.unmodifiableSet( deps );
|
||||||
|
|
||||||
workspace = RepositoryUtils.getWorkspace( session );
|
workspace = RepositoryUtils.getWorkspace( session );
|
||||||
this.localRepo = session.getLocalRepository();
|
this.localRepo = session.getLocalRepository();
|
||||||
this.repositories = new ArrayList<>( repositories.size() );
|
this.repositories = new ArrayList<>( repositories.size() );
|
||||||
|
@ -115,10 +115,10 @@ public class DefaultProjectArtifactsCache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
collect = scopesToCollect == null
|
collect = scopesToCollect == null
|
||||||
? Collections.<String>emptySet()
|
? Collections.<String>emptySet()
|
||||||
: Collections.unmodifiableSet( new HashSet<>( scopesToCollect ) );
|
: Collections.unmodifiableSet( new HashSet<>( scopesToCollect ) );
|
||||||
resolve = scopesToResolve == null
|
resolve = scopesToResolve == null
|
||||||
? Collections.<String>emptySet()
|
? Collections.<String>emptySet()
|
||||||
: Collections.unmodifiableSet( new HashSet<>( scopesToResolve ) );
|
: Collections.unmodifiableSet( new HashSet<>( scopesToResolve ) );
|
||||||
this.aggregating = aggregating;
|
this.aggregating = aggregating;
|
||||||
|
|
||||||
|
@ -166,10 +166,10 @@ public class DefaultProjectArtifactsCache
|
||||||
return Objects.equals( groupId, that.groupId ) && Objects.equals( artifactId, that.artifactId )
|
return Objects.equals( groupId, that.groupId ) && Objects.equals( artifactId, that.artifactId )
|
||||||
&& Objects.equals( version, that.version )
|
&& Objects.equals( version, that.version )
|
||||||
&& Objects.equals( dependencyArtifacts, that.dependencyArtifacts )
|
&& Objects.equals( dependencyArtifacts, that.dependencyArtifacts )
|
||||||
&& Objects.equals( workspace, that.workspace )
|
&& Objects.equals( workspace, that.workspace )
|
||||||
&& Objects.equals( localRepo, that.localRepo )
|
&& Objects.equals( localRepo, that.localRepo )
|
||||||
&& RepositoryUtils.repositoriesEquals( repositories, that.repositories )
|
&& RepositoryUtils.repositoriesEquals( repositories, that.repositories )
|
||||||
&& Objects.equals( collect, that.collect )
|
&& Objects.equals( collect, that.collect )
|
||||||
&& Objects.equals( resolve, that.resolve )
|
&& Objects.equals( resolve, that.resolve )
|
||||||
&& aggregating == that.aggregating;
|
&& aggregating == that.aggregating;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ public class DefaultProjectArtifactsCache
|
||||||
public Key createKey( MavenProject project, Collection<String> scopesToCollect,
|
public Key createKey( MavenProject project, Collection<String> scopesToCollect,
|
||||||
Collection<String> scopesToResolve, boolean aggregating, RepositorySystemSession session )
|
Collection<String> scopesToResolve, boolean aggregating, RepositorySystemSession session )
|
||||||
{
|
{
|
||||||
return new CacheKey( project, project.getRemoteProjectRepositories(), scopesToCollect, scopesToResolve,
|
return new CacheKey( project, project.getRemoteProjectRepositories(), scopesToCollect, scopesToResolve,
|
||||||
aggregating, session );
|
aggregating, session );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public interface ProjectArtifactsCache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Key createKey( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve,
|
Key createKey( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve,
|
||||||
boolean aggregating, RepositorySystemSession session );
|
boolean aggregating, RepositorySystemSession session );
|
||||||
|
|
||||||
CacheRecord get( Key key ) throws LifecycleExecutionException;
|
CacheRecord get( Key key ) throws LifecycleExecutionException;
|
||||||
|
|
|
@ -50,7 +50,7 @@ public abstract class DefaultToolchain // should have been AbstractToolchain...
|
||||||
private Logger logger;
|
private Logger logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param model the model, must not be {@code null}
|
* @param model the model, must not be {@code null}
|
||||||
* @param logger the logger, must not be {@code null}
|
* @param logger the logger, must not be {@code null}
|
||||||
*/
|
*/
|
||||||
|
@ -62,7 +62,7 @@ public abstract class DefaultToolchain // should have been AbstractToolchain...
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param model the model, must not be {@code null}
|
* @param model the model, must not be {@code null}
|
||||||
* @param type the type
|
* @param type the type
|
||||||
* @param logger the logger, must not be {@code null}
|
* @param logger the logger, must not be {@code null}
|
||||||
|
@ -160,7 +160,7 @@ public abstract class DefaultToolchain // should have been AbstractToolchain...
|
||||||
}
|
}
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -178,9 +178,9 @@ public abstract class DefaultToolchain // should have been AbstractToolchain...
|
||||||
builder.append( ';' );
|
builder.append( ';' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.append( '}' );
|
builder.append( '}' );
|
||||||
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class DefaultToolchainManager
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
Map<String, ToolchainFactory> factories;
|
Map<String, ToolchainFactory> factories;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Toolchain getToolchainFromBuildContext( String type, MavenSession session )
|
public Toolchain getToolchainFromBuildContext( String type, MavenSession session )
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ public class DefaultToolchainManager
|
||||||
if ( model != null )
|
if ( model != null )
|
||||||
{
|
{
|
||||||
List<Toolchain> toolchains = selectToolchains( Collections.singletonList( model ), type, null );
|
List<Toolchain> toolchains = selectToolchains( Collections.singletonList( model ), type, null );
|
||||||
|
|
||||||
if ( !toolchains.isEmpty() )
|
if ( !toolchains.isEmpty() )
|
||||||
{
|
{
|
||||||
return toolchains.get( 0 );
|
return toolchains.get( 0 );
|
||||||
|
@ -112,7 +112,7 @@ public class DefaultToolchainManager
|
||||||
}
|
}
|
||||||
return toolchains;
|
return toolchains;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> retrieveContext( MavenSession session )
|
Map<String, Object> retrieveContext( MavenSession session )
|
||||||
{
|
{
|
||||||
Map<String, Object> context = null;
|
Map<String, Object> context = null;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class DefaultToolchainManagerPrivate
|
||||||
toRet.add( fact.createToolchain( toolchainModel ) );
|
toRet.add( fact.createToolchain( toolchainModel ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add default toolchain
|
// add default toolchain
|
||||||
ToolchainPrivate tool = fact.createDefaultToolchain();
|
ToolchainPrivate tool = fact.createDefaultToolchain();
|
||||||
if ( tool != null )
|
if ( tool != null )
|
||||||
|
|
|
@ -59,7 +59,7 @@ public final class RequirementMatcherFactory
|
||||||
{
|
{
|
||||||
return provides.equalsIgnoreCase( requirement );
|
return provides.equalsIgnoreCase( requirement );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ public final class RequirementMatcherFactory
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@ public interface ToolchainManagerPrivate
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves every toolchains of given type available in user settings.
|
* Retrieves every toolchains of given type available in user settings.
|
||||||
*
|
*
|
||||||
* @param type the type, must not be {@code null}
|
* @param type the type, must not be {@code null}
|
||||||
* @param context the Maven session, must not be {@code null}
|
* @param context the Maven session, must not be {@code null}
|
||||||
* @since 3.0 (addition of the <code>MavenSession</code> parameter)
|
* @since 3.0 (addition of the <code>MavenSession</code> parameter)
|
||||||
|
|
|
@ -40,7 +40,7 @@ public interface ToolchainPrivate
|
||||||
boolean matchesRequirements( Map<String, String> requirements );
|
boolean matchesRequirements( Map<String, String> requirements );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the original model wrapped by this interface
|
* @return the original model wrapped by this interface
|
||||||
*/
|
*/
|
||||||
ToolchainModel getModel();
|
ToolchainModel getModel();
|
||||||
|
|
|
@ -44,7 +44,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Robert Scholte
|
* @author Robert Scholte
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
|
@ -66,13 +66,13 @@ public class DefaultToolchainsBuilder
|
||||||
throws ToolchainsBuildingException
|
throws ToolchainsBuildingException
|
||||||
{
|
{
|
||||||
ProblemCollector problems = ProblemCollectorFactory.newInstance( null );
|
ProblemCollector problems = ProblemCollectorFactory.newInstance( null );
|
||||||
|
|
||||||
PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problems );
|
PersistedToolchains globalToolchains = readToolchains( request.getGlobalToolchainsSource(), request, problems );
|
||||||
|
|
||||||
PersistedToolchains userToolchains = readToolchains( request.getUserToolchainsSource(), request, problems );
|
PersistedToolchains userToolchains = readToolchains( request.getUserToolchainsSource(), request, problems );
|
||||||
|
|
||||||
toolchainsMerger.merge( userToolchains, globalToolchains, TrackableBase.GLOBAL_LEVEL );
|
toolchainsMerger.merge( userToolchains, globalToolchains, TrackableBase.GLOBAL_LEVEL );
|
||||||
|
|
||||||
problems.setSource( "" );
|
problems.setSource( "" );
|
||||||
|
|
||||||
userToolchains = interpolate( userToolchains, problems );
|
userToolchains = interpolate( userToolchains, problems );
|
||||||
|
@ -193,7 +193,7 @@ public class DefaultToolchainsBuilder
|
||||||
|
|
||||||
return toolchains;
|
return toolchains;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasErrors( List<Problem> problems )
|
private boolean hasErrors( List<Problem> problems )
|
||||||
{
|
{
|
||||||
if ( problems != null )
|
if ( problems != null )
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class DefaultToolchainsBuildingRequest
|
||||||
private Source globalToolchainsSource;
|
private Source globalToolchainsSource;
|
||||||
|
|
||||||
private Source userToolchainsSource;
|
private Source userToolchainsSource;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Source getGlobalToolchainsSource()
|
public Source getGlobalToolchainsSource()
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.maven.toolchain.model.PersistedToolchains;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the result of the merged toolchains and holds the problems during this build, if any.
|
* Holds the result of the merged toolchains and holds the problems during this build, if any.
|
||||||
*
|
*
|
||||||
* @author Robert Scholte
|
* @author Robert Scholte
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
|
@ -36,12 +36,12 @@ public class DefaultToolchainsBuildingResult
|
||||||
{
|
{
|
||||||
|
|
||||||
private PersistedToolchains effectiveToolchains;
|
private PersistedToolchains effectiveToolchains;
|
||||||
|
|
||||||
private List<Problem> problems;
|
private List<Problem> problems;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*
|
*
|
||||||
* @param effectiveToolchains the merged toolchains, may not be {@code null}
|
* @param effectiveToolchains the merged toolchains, may not be {@code null}
|
||||||
* @param problems the problems while building the effectiveToolchains, if any.
|
* @param problems the problems while building the effectiveToolchains, if any.
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +56,7 @@ public class DefaultToolchainsBuildingResult
|
||||||
{
|
{
|
||||||
return effectiveToolchains;
|
return effectiveToolchains;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Problem> getProblems()
|
public List<Problem> getProblems()
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@ public interface ToolchainsBuildingResult
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of problems, if any.
|
* Return a list of problems, if any.
|
||||||
*
|
*
|
||||||
* @return a list of problems, never {@code null}.
|
* @return a list of problems, never {@code null}.
|
||||||
*/
|
*/
|
||||||
List<Problem> getProblems();
|
List<Problem> getProblems();
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.codehaus.plexus.logging.Logger;
|
||||||
* Provides backwards compatibility with Maven 3.2.3 and earlier. Clients that do not require compatibility with Maven
|
* Provides backwards compatibility with Maven 3.2.3 and earlier. Clients that do not require compatibility with Maven
|
||||||
* 3.2.3 and earlier are encouraged to use {@link JavaToolchainImpl}.
|
* 3.2.3 and earlier are encouraged to use {@link JavaToolchainImpl}.
|
||||||
* <strong>Note:</strong> This is an internal component whose interface can change without prior notice.
|
* <strong>Note:</strong> This is an internal component whose interface can change without prior notice.
|
||||||
*
|
*
|
||||||
* @deprecated clients that do not require compatibility with Maven 3.2.3 and earlier should link to
|
* @deprecated clients that do not require compatibility with Maven 3.2.3 and earlier should link to
|
||||||
* {@link JavaToolchainImpl} instead.
|
* {@link JavaToolchainImpl} instead.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.apache.maven.toolchain.model.ToolchainModel;
|
||||||
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Robert Scholte
|
* @author Robert Scholte
|
||||||
* @since 3.2.4
|
* @since 3.2.4
|
||||||
*/
|
*/
|
||||||
|
@ -55,14 +55,14 @@ public class MavenToolchainMerger
|
||||||
for ( ToolchainModel dominantModel : dominant )
|
for ( ToolchainModel dominantModel : dominant )
|
||||||
{
|
{
|
||||||
Object key = getToolchainModelKey( dominantModel );
|
Object key = getToolchainModelKey( dominantModel );
|
||||||
|
|
||||||
merged.put( key, dominantModel );
|
merged.put( key, dominantModel );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ToolchainModel recessiveModel : recessive )
|
for ( ToolchainModel recessiveModel : recessive )
|
||||||
{
|
{
|
||||||
Object key = getToolchainModelKey( recessiveModel );
|
Object key = getToolchainModelKey( recessiveModel );
|
||||||
|
|
||||||
ToolchainModel dominantModel = merged.get( key );
|
ToolchainModel dominantModel = merged.get( key );
|
||||||
if ( dominantModel == null )
|
if ( dominantModel == null )
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.maven.xml.sax.filter.ConsumerPomXMLFilterFactory;
|
||||||
/**
|
/**
|
||||||
* The default implementation of the {@link ConsumerPomXMLFilterFactory}
|
* The default implementation of the {@link ConsumerPomXMLFilterFactory}
|
||||||
* It will provide several values for the consumer pom based on its context.
|
* It will provide several values for the consumer pom based on its context.
|
||||||
*
|
*
|
||||||
* @author Robert Scholte
|
* @author Robert Scholte
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -182,7 +182,7 @@
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
/**
|
/**
|
||||||
* Method hashCode.
|
* Method hashCode.
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
|
@ -194,10 +194,10 @@
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} //-- int hashCode()
|
} //-- int hashCode()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method equals.
|
* Method equals.
|
||||||
*
|
*
|
||||||
* @param other
|
* @param other
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@ -220,7 +220,7 @@
|
||||||
result = result && ( getProvides() == null ? that.getProvides() == null : getProvides().equals( that.getProvides() ) );
|
result = result && ( getProvides() == null ? that.getProvides() == null : getProvides().equals( that.getProvides() ) );
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} //-- boolean equals( Object )
|
} //-- boolean equals( Object )
|
||||||
]]>
|
]]>
|
||||||
</code>
|
</code>
|
||||||
</codeSegment>
|
</codeSegment>
|
||||||
|
|
|
@ -106,7 +106,7 @@ under the License.
|
||||||
<exportedPackage>javax.annotation.*</exportedPackage>
|
<exportedPackage>javax.annotation.*</exportedPackage>
|
||||||
<exportedPackage>javax.annotation.security.*</exportedPackage>
|
<exportedPackage>javax.annotation.security.*</exportedPackage>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
| We may potentially want to export these, but right now I'm not sure that anything Guice specific needs
|
| We may potentially want to export these, but right now I'm not sure that anything Guice specific needs
|
||||||
| to be made available to plugin authors. If we find people are getting fancy and want to take advantage of
|
| to be made available to plugin authors. If we find people are getting fancy and want to take advantage of
|
||||||
| Guice specifics we can expose that later. Really some testing needs to be done to see full hiding
|
| Guice specifics we can expose that later. Really some testing needs to be done to see full hiding
|
||||||
|
@ -175,7 +175,7 @@ under the License.
|
||||||
<exportedArtifact>org.fusesource.jansi:jansi</exportedArtifact>
|
<exportedArtifact>org.fusesource.jansi:jansi</exportedArtifact>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
| We must also filter out the old Aether or NoClassDefFoundErrors will surface
|
| We must also filter out the old Aether or NoClassDefFoundErrors will surface
|
||||||
-->
|
-->
|
||||||
<exportedArtifact>org.sonatype.aether:aether-api</exportedArtifact>
|
<exportedArtifact>org.sonatype.aether:aether-api</exportedArtifact>
|
||||||
<exportedArtifact>org.sonatype.aether:aether-spi</exportedArtifact>
|
<exportedArtifact>org.sonatype.aether:aether-spi</exportedArtifact>
|
||||||
|
@ -188,7 +188,7 @@ under the License.
|
||||||
| NOTE: Don't exclude the wagons or any of their dependencies (apart from the wagon API). This would otherwise
|
| NOTE: Don't exclude the wagons or any of their dependencies (apart from the wagon API). This would otherwise
|
||||||
| provoke linkage errors for wagons contributed by build extensions. We also don't need to exclude the wagons
|
| provoke linkage errors for wagons contributed by build extensions. We also don't need to exclude the wagons
|
||||||
| from plugins. Plugins that use wagons directly and declare the corresponding dependency will simply use a
|
| from plugins. Plugins that use wagons directly and declare the corresponding dependency will simply use a
|
||||||
| wagon from their plugin realm.
|
| wagon from their plugin realm.
|
||||||
-->
|
-->
|
||||||
</exportedArtifacts>
|
</exportedArtifacts>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
|
@ -138,7 +138,7 @@ public abstract class AbstractCoreMavenComponentTestCase
|
||||||
{
|
{
|
||||||
return createMavenSession( pom, executionProperties, false );
|
return createMavenSession( pom, executionProperties, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MavenSession createMavenSession( File pom, Properties executionProperties, boolean includeModules )
|
protected MavenSession createMavenSession( File pom, Properties executionProperties, boolean includeModules )
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -155,7 +155,7 @@ public abstract class AbstractCoreMavenComponentTestCase
|
||||||
if ( pom != null )
|
if ( pom != null )
|
||||||
{
|
{
|
||||||
MavenProject project = projectBuilder.build( pom, configuration ).getProject();
|
MavenProject project = projectBuilder.build( pom, configuration ).getProject();
|
||||||
|
|
||||||
projects.add( project );
|
projects.add( project );
|
||||||
if ( includeModules )
|
if ( includeModules )
|
||||||
{
|
{
|
||||||
|
|
|
@ -121,36 +121,36 @@ public class ExclusionArtifactFilterTest
|
||||||
|
|
||||||
assertThat( filter.include( artifact ), is( false ) );
|
assertThat( filter.include( artifact ), is( false ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMultipleExclusionsExcludeArtifactIdWildcard()
|
public void testMultipleExclusionsExcludeArtifactIdWildcard()
|
||||||
{
|
{
|
||||||
Exclusion exclusion1 = new Exclusion();
|
Exclusion exclusion1 = new Exclusion();
|
||||||
exclusion1.setGroupId( "org.apache.groovy" );
|
exclusion1.setGroupId( "org.apache.groovy" );
|
||||||
exclusion1.setArtifactId( "*" );
|
exclusion1.setArtifactId( "*" );
|
||||||
|
|
||||||
Exclusion exclusion2 = new Exclusion();
|
Exclusion exclusion2 = new Exclusion();
|
||||||
exclusion2.setGroupId( "org.apache.maven" );
|
exclusion2.setGroupId( "org.apache.maven" );
|
||||||
exclusion2.setArtifactId( "maven-core" );
|
exclusion2.setArtifactId( "maven-core" );
|
||||||
|
|
||||||
ExclusionArtifactFilter filter = new ExclusionArtifactFilter( Arrays.asList( exclusion1, exclusion2 ) );
|
ExclusionArtifactFilter filter = new ExclusionArtifactFilter( Arrays.asList( exclusion1, exclusion2 ) );
|
||||||
|
|
||||||
assertThat( filter.include( artifact ), is( false ) );
|
assertThat( filter.include( artifact ), is( false ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMultipleExclusionsExcludeGroupIdWildcard()
|
public void testMultipleExclusionsExcludeGroupIdWildcard()
|
||||||
{
|
{
|
||||||
Exclusion exclusion1 = new Exclusion();
|
Exclusion exclusion1 = new Exclusion();
|
||||||
exclusion1.setGroupId( "*" );
|
exclusion1.setGroupId( "*" );
|
||||||
exclusion1.setArtifactId( "maven-model" );
|
exclusion1.setArtifactId( "maven-model" );
|
||||||
|
|
||||||
Exclusion exclusion2 = new Exclusion();
|
Exclusion exclusion2 = new Exclusion();
|
||||||
exclusion2.setGroupId( "org.apache.maven" );
|
exclusion2.setGroupId( "org.apache.maven" );
|
||||||
exclusion2.setArtifactId( "maven-core" );
|
exclusion2.setArtifactId( "maven-core" );
|
||||||
|
|
||||||
ExclusionArtifactFilter filter = new ExclusionArtifactFilter( Arrays.asList( exclusion1, exclusion2 ) );
|
ExclusionArtifactFilter filter = new ExclusionArtifactFilter( Arrays.asList( exclusion1, exclusion2 ) );
|
||||||
|
|
||||||
assertThat( filter.include( artifact ), is( false ) );
|
assertThat( filter.include( artifact ), is( false ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -34,7 +34,7 @@ public class DefaultMavenExecutionRequestPopulatorTest
|
||||||
{
|
{
|
||||||
@Inject
|
@Inject
|
||||||
MavenExecutionRequestPopulator testee;
|
MavenExecutionRequestPopulator testee;
|
||||||
|
|
||||||
public void testPluginRepositoryInjection()
|
public void testPluginRepositoryInjection()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ConsumerModelSourceTransformerTest
|
||||||
Path beforePomFile = Paths.get( "src/test/resources/projects/transform/before.pom").toAbsolutePath();
|
Path beforePomFile = Paths.get( "src/test/resources/projects/transform/before.pom").toAbsolutePath();
|
||||||
Path afterPomFile = Paths.get( "src/test/resources/projects/transform/after.pom").toAbsolutePath();
|
Path afterPomFile = Paths.get( "src/test/resources/projects/transform/after.pom").toAbsolutePath();
|
||||||
|
|
||||||
try( InputStream expected = Files.newInputStream( afterPomFile );
|
try( InputStream expected = Files.newInputStream( afterPomFile );
|
||||||
InputStream result = transformer.transform( beforePomFile, new NoTransformerContext() ) )
|
InputStream result = transformer.transform( beforePomFile, new NoTransformerContext() ) )
|
||||||
{
|
{
|
||||||
XmlAssert.assertThat( result ).and( expected ).areIdentical();
|
XmlAssert.assertThat( result ).and( expected ).areIdentical();
|
||||||
|
@ -53,14 +53,14 @@ public class ConsumerModelSourceTransformerTest
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Model getRawModel( String groupId, String artifactId )
|
public Model getRawModel( String groupId, String artifactId )
|
||||||
throws IllegalStateException
|
throws IllegalStateException
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Model getRawModel( Path p )
|
public Model getRawModel( Path p )
|
||||||
{
|
{
|
||||||
|
|
|
@ -98,27 +98,27 @@ public class DefaultLifecyclesTest
|
||||||
assertThat( lifecycle.getId(), is( "wrapper" ) );
|
assertThat( lifecycle.getId(), is( "wrapper" ) );
|
||||||
assertThat( lifecycle.getPhases(), hasSize( 1 ) );
|
assertThat( lifecycle.getPhases(), hasSize( 1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCustomLifecycle()
|
public void testCustomLifecycle()
|
||||||
{
|
{
|
||||||
List<Lifecycle> myLifecycles = new ArrayList<>();
|
List<Lifecycle> myLifecycles = new ArrayList<>();
|
||||||
Lifecycle myLifecycle = new Lifecycle( "etl",
|
Lifecycle myLifecycle = new Lifecycle( "etl",
|
||||||
Arrays.asList( "extract", "transform", "load" ),
|
Arrays.asList( "extract", "transform", "load" ),
|
||||||
Collections.emptyMap() );
|
Collections.emptyMap() );
|
||||||
myLifecycles.add( myLifecycle );
|
myLifecycles.add( myLifecycle );
|
||||||
myLifecycles.addAll( defaultLifeCycles.getLifeCycles() );
|
myLifecycles.addAll( defaultLifeCycles.getLifeCycles() );
|
||||||
|
|
||||||
DefaultLifecycles dl = new DefaultLifecycles( myLifecycles.stream()
|
DefaultLifecycles dl = new DefaultLifecycles( myLifecycles.stream()
|
||||||
.collect( Collectors.toMap( l -> l.getId(), l -> l ) ),
|
.collect( Collectors.toMap( l -> l.getId(), l -> l ) ),
|
||||||
null );
|
null );
|
||||||
|
|
||||||
assertThat( dl.getLifeCycles().get( 0 ).getId(), is( "default" ) );
|
assertThat( dl.getLifeCycles().get( 0 ).getId(), is( "default" ) );
|
||||||
assertThat( dl.getLifeCycles().get( 1 ).getId(), is( "clean" ) );
|
assertThat( dl.getLifeCycles().get( 1 ).getId(), is( "clean" ) );
|
||||||
assertThat( dl.getLifeCycles().get( 2 ).getId(), is( "site" ) );
|
assertThat( dl.getLifeCycles().get( 2 ).getId(), is( "site" ) );
|
||||||
assertThat( dl.getLifeCycles().get( 3 ).getId(), is( "wrapper" ) );
|
assertThat( dl.getLifeCycles().get( 3 ).getId(), is( "wrapper" ) );
|
||||||
assertThat( dl.getLifeCycles().get( 4 ).getId(), is( "etl" ) );
|
assertThat( dl.getLifeCycles().get( 4 ).getId(), is( "etl" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private Lifecycle getLifeCycleById( String id )
|
private Lifecycle getLifeCycleById( String id )
|
||||||
{
|
{
|
||||||
return defaultLifeCycles.getLifeCycles().stream()
|
return defaultLifeCycles.getLifeCycles().stream()
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.util.HashSet;
|
||||||
public class BuilderCommonTest
|
public class BuilderCommonTest
|
||||||
{
|
{
|
||||||
private Logger logger = mock( Logger.class );
|
private Logger logger = mock( Logger.class );
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testResolveBuildPlan()
|
public void testResolveBuildPlan()
|
||||||
throws Exception
|
throws Exception
|
||||||
|
@ -53,7 +53,7 @@ public class BuilderCommonTest
|
||||||
new HashSet<>() );
|
new HashSet<>() );
|
||||||
assertEquals( LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan().size(), plan.size() );
|
assertEquals( LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan().size(), plan.size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDefaultBindingPluginsWarning()
|
public void testDefaultBindingPluginsWarning()
|
||||||
throws Exception
|
throws Exception
|
||||||
|
@ -65,7 +65,7 @@ public class BuilderCommonTest
|
||||||
session1.setCurrentProject( ProjectDependencyGraphStub.A );
|
session1.setCurrentProject( ProjectDependencyGraphStub.A );
|
||||||
|
|
||||||
getBuilderCommon().resolveBuildPlan( session1, ProjectDependencyGraphStub.A, taskSegment1, new HashSet<>() );
|
getBuilderCommon().resolveBuildPlan( session1, ProjectDependencyGraphStub.A, taskSegment1, new HashSet<>() );
|
||||||
|
|
||||||
verify( logger ).warn("Version not locked for default bindings plugins ["
|
verify( logger ).warn("Version not locked for default bindings plugins ["
|
||||||
+ "stub-plugin-initialize, "
|
+ "stub-plugin-initialize, "
|
||||||
+ "stub-plugin-process-resources, "
|
+ "stub-plugin-process-resources, "
|
||||||
|
@ -77,7 +77,7 @@ public class BuilderCommonTest
|
||||||
+ "stub-plugin-install], "
|
+ "stub-plugin-install], "
|
||||||
+ "you should define versions in pluginManagement section of your pom.xml or parent");
|
+ "you should define versions in pluginManagement section of your pom.xml or parent");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHandleBuildError()
|
public void testHandleBuildError()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ProjectBuildListTest
|
||||||
final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
|
final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
|
||||||
ProjectBuildList projectBuildList = ProjectDependencyGraphStub.getProjectBuildList( session );
|
ProjectBuildList projectBuildList = ProjectDependencyGraphStub.getProjectBuildList( session );
|
||||||
TaskSegment taskSegment = projectBuildList.get( 0 ).getTaskSegment();
|
TaskSegment taskSegment = projectBuildList.get( 0 ).getTaskSegment();
|
||||||
assertThat( "This test assumes there are at least 6 elements in projectBuilds",
|
assertThat( "This test assumes there are at least 6 elements in projectBuilds",
|
||||||
projectBuildList.size(), is( greaterThanOrEqualTo( 6 ) ) );
|
projectBuildList.size(), is( greaterThanOrEqualTo( 6 ) ) );
|
||||||
|
|
||||||
final ProjectBuildList byTaskSegment = projectBuildList.getByTaskSegment( taskSegment );
|
final ProjectBuildList byTaskSegment = projectBuildList.getByTaskSegment( taskSegment );
|
||||||
|
|
|
@ -212,7 +212,7 @@ public class LifecycleExecutionPlanCalculatorStub
|
||||||
{
|
{
|
||||||
InputSource defaultBindings = new InputSource();
|
InputSource defaultBindings = new InputSource();
|
||||||
defaultBindings.setModelId( DefaultLifecyclePluginAnalyzer.DEFAULTLIFECYCLEBINDINGS_MODELID );
|
defaultBindings.setModelId( DefaultLifecyclePluginAnalyzer.DEFAULTLIFECYCLEBINDINGS_MODELID );
|
||||||
|
|
||||||
final Plugin plugin = mojoDescriptor.getPluginDescriptor().getPlugin();
|
final Plugin plugin = mojoDescriptor.getPluginDescriptor().getPlugin();
|
||||||
plugin.setLocation( "version", new InputLocation( 12, 34, defaultBindings ) );
|
plugin.setLocation( "version", new InputLocation( 12, 34, defaultBindings ) );
|
||||||
MojoExecution result = new MojoExecution( plugin, goal, executionId );
|
MojoExecution result = new MojoExecution( plugin, goal, executionId );
|
||||||
|
|
|
@ -33,38 +33,38 @@ public class LifecyclePhaseTest
|
||||||
{
|
{
|
||||||
LifecyclePhase phase = new LifecyclePhase();
|
LifecyclePhase phase = new LifecyclePhase();
|
||||||
assertEquals( "", phase.toString() );
|
assertEquals( "", phase.toString() );
|
||||||
|
|
||||||
LifecycleMojo mojo1 = new LifecycleMojo();
|
LifecycleMojo mojo1 = new LifecycleMojo();
|
||||||
mojo1.setGoal( "jar:jar" );
|
mojo1.setGoal( "jar:jar" );
|
||||||
phase.setMojos( Arrays.asList( mojo1 ) );
|
phase.setMojos( Arrays.asList( mojo1 ) );
|
||||||
assertEquals( "jar:jar", phase.toString() );
|
assertEquals( "jar:jar", phase.toString() );
|
||||||
|
|
||||||
LifecycleMojo mojo2 = new LifecycleMojo();
|
LifecycleMojo mojo2 = new LifecycleMojo();
|
||||||
mojo2.setGoal( "war:war" );
|
mojo2.setGoal( "war:war" );
|
||||||
phase.setMojos( Arrays.asList( mojo1, mojo2 ) );
|
phase.setMojos( Arrays.asList( mojo1, mojo2 ) );
|
||||||
assertEquals( "jar:jar,war:war", phase.toString() );
|
assertEquals( "jar:jar,war:war", phase.toString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSet()
|
public void testSet()
|
||||||
{
|
{
|
||||||
LifecyclePhase phase = new LifecyclePhase();
|
LifecyclePhase phase = new LifecyclePhase();
|
||||||
assertNull( phase.getMojos() );
|
assertNull( phase.getMojos() );
|
||||||
|
|
||||||
phase.set( "" );
|
phase.set( "" );
|
||||||
assertNotNull( phase.getMojos() );
|
assertNotNull( phase.getMojos() );
|
||||||
assertEquals( 0, phase.getMojos().size() );
|
assertEquals( 0, phase.getMojos().size() );
|
||||||
|
|
||||||
phase.set( "jar:jar, war:war" );
|
phase.set( "jar:jar, war:war" );
|
||||||
|
|
||||||
List<LifecycleMojo> mojos = phase.getMojos();
|
List<LifecycleMojo> mojos = phase.getMojos();
|
||||||
assertNotNull( mojos );
|
assertNotNull( mojos );
|
||||||
assertEquals( 2, mojos.size() );
|
assertEquals( 2, mojos.size() );
|
||||||
|
|
||||||
LifecycleMojo mojo1 = mojos.get(0);
|
LifecycleMojo mojo1 = mojos.get(0);
|
||||||
assertNotNull( mojo1 );
|
assertNotNull( mojo1 );
|
||||||
assertEquals( "jar:jar", mojo1.getGoal() );
|
assertEquals( "jar:jar", mojo1.getGoal() );
|
||||||
|
|
||||||
LifecycleMojo mojo2 = mojos.get(1);
|
LifecycleMojo mojo2 = mojos.get(1);
|
||||||
assertNotNull( mojo2 );
|
assertNotNull( mojo2 );
|
||||||
assertEquals( "war:war", mojo2.getGoal() );
|
assertEquals( "war:war", mojo2.getGoal() );
|
||||||
|
|
|
@ -314,7 +314,7 @@ public class PluginManagerTest
|
||||||
pluginManager.loadPlugin( plugin, session.getCurrentProject().getRemotePluginRepositories(),
|
pluginManager.loadPlugin( plugin, session.getCurrentProject().getRemotePluginRepositories(),
|
||||||
session.getRepositorySession() );
|
session.getRepositorySession() );
|
||||||
ClassRealm pluginRealm = pluginManager.getPluginRealm( session, pluginDescriptor );
|
ClassRealm pluginRealm = pluginManager.getPluginRealm( session, pluginDescriptor );
|
||||||
|
|
||||||
assertEquals(pluginRealm, pluginDescriptor.getComponents().get(0).getRealm());
|
assertEquals(pluginRealm, pluginDescriptor.getComponents().get(0).getRealm());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class ProjectSorterTest
|
||||||
projects.add( project1 );
|
projects.add( project1 );
|
||||||
MavenProject project2 = createProject( "groupId", "artifactId", "1.0" );
|
MavenProject project2 = createProject( "groupId", "artifactId", "1.0" );
|
||||||
projects.add( project2 );
|
projects.add( project2 );
|
||||||
|
|
||||||
expectedException.expect( DuplicateProjectException.class );
|
expectedException.expect( DuplicateProjectException.class );
|
||||||
expectedException.reportMissingExceptionWithMessage( "Duplicate projects should fail" );
|
expectedException.reportMissingExceptionWithMessage( "Duplicate projects should fail" );
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import junit.framework.TestCase;
|
||||||
|
|
||||||
public class DefaultProjectArtifactsCacheTest extends TestCase
|
public class DefaultProjectArtifactsCacheTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
private ProjectArtifactsCache cache;
|
private ProjectArtifactsCache cache;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,32 +41,32 @@ public class DefaultProjectArtifactsCacheTest extends TestCase
|
||||||
super.setUp();
|
super.setUp();
|
||||||
cache = new DefaultProjectArtifactsCache();
|
cache = new DefaultProjectArtifactsCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testProjectDependencyOrder() throws Exception
|
public void testProjectDependencyOrder() throws Exception
|
||||||
{
|
{
|
||||||
ProjectArtifactsCache.Key project1 = new ProjectArtifactsCache.Key(){};
|
ProjectArtifactsCache.Key project1 = new ProjectArtifactsCache.Key(){};
|
||||||
|
|
||||||
Set<Artifact> artifacts = new LinkedHashSet<>( 4 );
|
Set<Artifact> artifacts = new LinkedHashSet<>( 4 );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a1", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a1", "v", "compile", "jar", "", null ) );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a2", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a2", "v", "compile", "jar", "", null ) );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a3", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a3", "v", "compile", "jar", "", null ) );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a4", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a4", "v", "compile", "jar", "", null ) );
|
||||||
|
|
||||||
cache.put( project1, artifacts );
|
cache.put( project1, artifacts );
|
||||||
|
|
||||||
assertArrayEquals( artifacts.toArray( new Artifact[0] ),
|
assertArrayEquals( artifacts.toArray( new Artifact[0] ),
|
||||||
cache.get( project1 ).getArtifacts().toArray( new Artifact[0] ) );
|
cache.get( project1 ).getArtifacts().toArray( new Artifact[0] ) );
|
||||||
|
|
||||||
ProjectArtifactsCache.Key project2 = new ProjectArtifactsCache.Key(){};
|
ProjectArtifactsCache.Key project2 = new ProjectArtifactsCache.Key(){};
|
||||||
|
|
||||||
Set<Artifact> reversedArtifacts = new LinkedHashSet<>( 4 );
|
Set<Artifact> reversedArtifacts = new LinkedHashSet<>( 4 );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a4", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a4", "v", "compile", "jar", "", null ) );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a3", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a3", "v", "compile", "jar", "", null ) );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a2", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a2", "v", "compile", "jar", "", null ) );
|
||||||
artifacts.add( new DefaultArtifact( "g", "a1", "v", "compile", "jar", "", null ) );
|
artifacts.add( new DefaultArtifact( "g", "a1", "v", "compile", "jar", "", null ) );
|
||||||
|
|
||||||
cache.put( project2, reversedArtifacts );
|
cache.put( project2, reversedArtifacts );
|
||||||
|
|
||||||
assertArrayEquals( reversedArtifacts.toArray( new Artifact[0] ),
|
assertArrayEquals( reversedArtifacts.toArray( new Artifact[0] ),
|
||||||
cache.get( project2 ).getArtifacts().toArray( new Artifact[0] ) );
|
cache.get( project2 ).getArtifacts().toArray( new Artifact[0] ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class DefaultToolchainManagerPrivateTest
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private ToolchainFactory toolchainFactory_basicType;
|
private ToolchainFactory toolchainFactory_basicType;
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private ToolchainFactory toolchainFactory_rareType;
|
private ToolchainFactory toolchainFactory_rareType;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class DefaultToolchainManagerPrivateTest
|
||||||
verify( logger ).error( "Missing toolchain factory for type: unknown. Possibly caused by misconfigured project." );
|
verify( logger ).error( "Missing toolchain factory for type: unknown. Possibly caused by misconfigured project." );
|
||||||
assertEquals( 0, toolchains.length );
|
assertEquals( 0, toolchains.length );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testToolchainsForConfiguredType()
|
public void testToolchainsForConfiguredType()
|
||||||
throws Exception
|
throws Exception
|
||||||
|
|
|
@ -31,7 +31,7 @@ under the License.
|
||||||
<description>
|
<description>
|
||||||
Check that war packages the jar instead of a directory
|
Check that war packages the jar instead of a directory
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -50,7 +50,7 @@ under the License.
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>lib</module>
|
<module>lib</module>
|
||||||
<module>war</module>
|
<module>war</module>
|
||||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>mng6300-war</artifactId>
|
<artifactId>mng6300-war</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -41,7 +41,7 @@ under the License.
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.its.mng6300</groupId>
|
<groupId>org.apache.maven.its.mng6300</groupId>
|
||||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
||||||
|
|
||||||
<name>Maven Integration Test :: Dummy Artifact</name>
|
<name>Maven Integration Test :: Dummy Artifact</name>
|
||||||
<description>
|
<description>
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
||||||
|
|
||||||
<name>Maven Integration Test :: Dummy Artifact</name>
|
<name>Maven Integration Test :: Dummy Artifact</name>
|
||||||
<description>
|
<description>
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|
|
@ -31,11 +31,11 @@ under the License.
|
||||||
<artifactId>maven-artifact</artifactId>
|
<artifactId>maven-artifact</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>3.0-SNAPSHOT</version>
|
||||||
<name>Maven Artifact</name>
|
<name>Maven Artifact</name>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/artifact/trunk</connection>
|
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/artifact/trunk</connection>
|
||||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/artifact/trunk</developerConnection>
|
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/artifact/trunk</developerConnection>
|
||||||
<url>http://svn.apache.org/viewcvs.cgi/maven/artifact/trunk</url>
|
<url>http://svn.apache.org/viewcvs.cgi/maven/artifact/trunk</url>
|
||||||
</scm>
|
</scm>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
@ -56,7 +56,7 @@ under the License.
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
<groupId>org.apache.maven.wagon</groupId>
|
||||||
<artifactId>wagon-provider-api</artifactId>
|
<artifactId>wagon-provider-api</artifactId>
|
||||||
<version>1.0-beta-2</version>
|
<version>1.0-beta-2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
<groupId>org.apache.maven.wagon</groupId>
|
||||||
<artifactId>wagon-file</artifactId>
|
<artifactId>wagon-file</artifactId>
|
||||||
|
@ -68,7 +68,7 @@ under the License.
|
||||||
<artifactId>easymock</artifactId>
|
<artifactId>easymock</artifactId>
|
||||||
<version>1.2_Java1.3</version>
|
<version>1.2_Java1.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -80,25 +80,25 @@ under the License.
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<model>src/main/mdo/metadata.mdo</model>
|
<model>src/main/mdo/metadata.mdo</model>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>site-docs</id>
|
<id>site-docs</id>
|
||||||
<phase>pre-site</phase>
|
<phase>pre-site</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>xdoc</goal>
|
<goal>xdoc</goal>
|
||||||
<goal>xsd</goal>
|
<goal>xsd</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>standard</id>
|
<id>standard</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>java</goal>
|
<goal>java</goal>
|
||||||
<goal>xpp3-reader</goal>
|
<goal>xpp3-reader</goal>
|
||||||
<goal>xpp3-writer</goal>
|
<goal>xpp3-writer</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<version>1.0-alpha-16</version>
|
<version>1.0-alpha-16</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -62,12 +62,12 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>dummy</id>
|
<id>dummy</id>
|
||||||
<url>file:///tmp/dummy-repo</url>
|
<url>file:///tmp/dummy-repo</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -33,12 +33,12 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>dummy</id>
|
<id>dummy</id>
|
||||||
<url>file:///tmp/dummy-repo</url>
|
<url>file:///tmp/dummy-repo</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -291,9 +291,9 @@ under the License.
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>2.0-beta-4</version>
|
<version>2.0-beta-4</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- This element will be overridden by children -->
|
<!-- This element will be overridden by children -->
|
||||||
<tagBase>https://svn.apache.org/repos/asf/maven/pom/tags</tagBase>
|
<tagBase>https://svn.apache.org/repos/asf/maven/pom/tags</tagBase>
|
||||||
|
@ -379,7 +379,7 @@ under the License.
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>release</id>
|
<id>release</id>
|
||||||
<build>
|
<build>
|
||||||
|
@ -451,10 +451,10 @@ under the License.
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue