You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2018/02/08 22:53:10 UTC

[01/49] maven git commit: [MNG-6123] detect self references in POM and fail fast o Added unit test and self referencing pom [Forced Update!]

Repository: maven
Updated Branches:
  refs/heads/MNG-6255 c24ddf969 -> b918b0b12 (forced update)


[MNG-6123] detect self references in POM and fail fast
 o Added unit test and self referencing pom


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/8f8c45c9
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/8f8c45c9
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/8f8c45c9

Branch: refs/heads/MNG-6255
Commit: 8f8c45c990193b04c1770997d446951c5185b164
Parents: b100257
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Tue Apr 4 22:46:11 2017 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Tue Aug 1 22:01:36 2017 +0200

----------------------------------------------------------------------
 .../model/validation/DefaultModelValidator.java | 54 ++++++++++++++++++--
 .../validation/DefaultModelValidatorTest.java   | 13 +++++
 .../validation/raw-model/self-referencing.xml   | 38 ++++++++++++++
 3 files changed, 102 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/8f8c45c9/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index 2e7985f..d97d8f6 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -131,6 +131,9 @@ public class DefaultModelValidator
 
             validate20RawDependencies( problems, m.getDependencies(), "dependencies.dependency", request );
 
+            validate20RawDependenciesSelfReferencing( problems, m, m.getDependencies(), "dependencies.dependency",
+                                                      request );
+
             if ( m.getDependencyManagement() != null )
             {
                 validate20RawDependencies( problems, m.getDependencyManagement().getDependencies(),
@@ -344,12 +347,12 @@ public class DefaultModelValidator
 
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
-        validateEffectiveDependencies( problems, m.getDependencies(), false, request );
+        validateEffectiveDependencies( problems, m, m.getDependencies(), false, request );
 
         DependencyManagement mgmt = m.getDependencyManagement();
         if ( mgmt != null )
         {
-            validateEffectiveDependencies( problems, mgmt.getDependencies(), true, request );
+            validateEffectiveDependencies( problems, m, mgmt.getDependencies(), true, request );
         }
 
         if ( request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )
@@ -524,7 +527,33 @@ public class DefaultModelValidator
         }
     }
 
-    private void validateEffectiveDependencies( ModelProblemCollector problems, List<Dependency> dependencies,
+    private void validate20RawDependenciesSelfReferencing( ModelProblemCollector problems, Model m,
+                                                           List<Dependency> dependencies, String prefix,
+                                                           ModelBuildingRequest request )
+    {
+        // We only check for groupId/artifactId cause if there is another
+        // module with the same groupId/artifactId this will fail the build 
+        // earlier like "Project '...' is duplicated in the reactor.
+        // So it is sufficient to check only groupId/artifactId and not the
+        // packaging type.
+        for ( Dependency dependency : dependencies )
+        {
+            String key = dependency.getGroupId() + ":" + dependency.getArtifactId() + ":" + dependency.getVersion();
+            String mKey = m.getGroupId() + ":" + m.getArtifactId() + ":" + m.getVersion();
+            if ( key.equals( mKey ) )
+            {
+                // This means a module which is build has a dependency which has the same
+                // groupId, artifactId and version coordinates. This is in consequence
+                // a self reference or in other words a circular reference which can not
+                // being resolved.
+                addViolation( problems, Severity.FATAL, Version.V31, prefix + " " + key, key, "is referencing itself.",
+                              dependency );
+
+            }
+        }
+    }
+
+    private void validateEffectiveDependencies( ModelProblemCollector problems, Model m, List<Dependency> dependencies,
                                                 boolean management, ModelBuildingRequest request )
     {
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
@@ -551,11 +580,30 @@ public class DefaultModelValidator
                      */
                     validateEnum( prefix + "scope", problems, Severity.WARNING, Version.V20, d.getScope(),
                                   d.getManagementKey(), d, "provided", "compile", "runtime", "test", "system" );
+
+                    validateEffectiveModelAgainstDependency( prefix, problems, m, d, request );
                 }
             }
         }
     }
 
+    private void validateEffectiveModelAgainstDependency( String prefix, ModelProblemCollector problems, Model m,
+                                                          Dependency d, ModelBuildingRequest request )
+    {
+        String key = d.getGroupId() + ":" + d.getArtifactId() + ":" + d.getVersion();
+        String mKey = m.getGroupId() + ":" + m.getArtifactId() + ":" + m.getVersion();
+        if ( key.equals( mKey ) )
+        {
+            // This means a module which is build has a dependency which has the same
+            // groupId, artifactId and version coordinates. This is in consequence
+            // a self reference or in other words a circular reference which can not
+            // being resolved.
+            addViolation( problems, Severity.FATAL, Version.V31, prefix + " " + key, key, "is referencing itself.", d );
+
+        }
+
+    }
+
     private void validate20EffectivePluginDependencies( ModelProblemCollector problems, Plugin plugin,
                                                         ModelBuildingRequest request )
     {

http://git-wip-us.apache.org/repos/asf/maven/blob/8f8c45c9/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
index 4da3c87..5614daf 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
@@ -714,4 +714,17 @@ public class DefaultModelValidatorTest
         assertContains( result.getWarnings().get( 1 ),
                 "'dependencies.dependency.version' for test:b:jar is either LATEST or RELEASE (both of them are being deprecated)" );
     }
+
+    public void testSelfReferencingDependencyInRawModel()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/self-referencing.xml" );
+
+        assertViolations( result, 1, 0, 0 );
+
+        assertEquals( "'dependencies.dependency com.example.group:testinvalidpom:0.0.1-SNAPSHOT' for com.example.group:testinvalidpom:0.0.1-SNAPSHOT is referencing itself.",
+                      result.getFatals().get( 0 ) );
+
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/8f8c45c9/maven-model-builder/src/test/resources/poms/validation/raw-model/self-referencing.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/self-referencing.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/self-referencing.xml
new file mode 100644
index 0000000..a902896
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/self-referencing.xml
@@ -0,0 +1,38 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>testinvalidpom</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+
+	<description>
+		This will test if the module validator recognized that this 
+		dependency is the same as the module itself.
+	</description>
+	<dependencies>
+		<dependency>
+			<groupId>com.example.group</groupId>
+			<artifactId>testinvalidpom</artifactId>
+			<version>0.0.1-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file


[12/49] maven git commit: [maven-release-plugin] prepare for next development iteration

Posted by hb...@apache.org.
[maven-release-plugin] prepare for next development iteration


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/312eb535
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/312eb535
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/312eb535

Branch: refs/heads/MNG-6255
Commit: 312eb53502b78355ab21e27610e7ef253990f574
Parents: 094e4e3
Author: Stephen Connolly <st...@gmail.com>
Authored: Sun Sep 10 12:51:43 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Sun Sep 10 12:51:43 2017 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml              | 2 +-
 maven-artifact/pom.xml            | 2 +-
 maven-builder-support/pom.xml     | 2 +-
 maven-compat/pom.xml              | 2 +-
 maven-core/pom.xml                | 2 +-
 maven-embedder/pom.xml            | 2 +-
 maven-model-builder/pom.xml       | 2 +-
 maven-model/pom.xml               | 2 +-
 maven-plugin-api/pom.xml          | 2 +-
 maven-repository-metadata/pom.xml | 2 +-
 maven-resolver-provider/pom.xml   | 2 +-
 maven-settings-builder/pom.xml    | 2 +-
 maven-settings/pom.xml            | 2 +-
 maven-slf4j-provider/pom.xml      | 2 +-
 pom.xml                           | 4 ++--
 15 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index eb97543..4d9b78c 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>apache-maven</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-artifact/pom.xml
----------------------------------------------------------------------
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 8a978a8..8c99f33 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-artifact</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-builder-support/pom.xml
----------------------------------------------------------------------
diff --git a/maven-builder-support/pom.xml b/maven-builder-support/pom.xml
index 02682ab..308f55d 100644
--- a/maven-builder-support/pom.xml
+++ b/maven-builder-support/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-builder-support</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-compat/pom.xml
----------------------------------------------------------------------
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 9d3542e..1b1cd3c 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-compat</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 78a7dc6..a9028c4 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-core</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index b759470..c252426 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-embedder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-model-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index d44ff50..e86193c 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-model-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-model/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index a321d35..da104fd 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-model</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-plugin-api/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 9e81210..6477875 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-plugin-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-repository-metadata/pom.xml
----------------------------------------------------------------------
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index 18c23bf..6395d2d 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-repository-metadata</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-resolver-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index c78fde1..1d3505c 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-resolver-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-settings-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index dd60239..45a5ffd 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-settings-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-settings/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index cd00975..8266761 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-settings</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/maven-slf4j-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index e7fdf96..68912f5 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1</version>
+    <version>3.5.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-slf4j-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/312eb535/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2c97f6b..4a79956 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
   </parent>
 
   <artifactId>maven</artifactId>
-  <version>3.5.1</version>
+  <version>3.5.2-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven</name>
@@ -98,7 +98,7 @@ under the License.
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
     <url>https://github.com/apache/maven/tree/${project.scm.tag}</url>
-    <tag>maven-3.5.1</tag>
+    <tag>master</tag>
   </scm>
   <issueManagement>
     <system>jira</system>


[41/49] maven git commit: [MNG-6308] added packaging in Building message footer and summary

Posted by hb...@apache.org.
[MNG-6308] added packaging in Building message footer and summary

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/58cf490c
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/58cf490c
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/58cf490c

Branch: refs/heads/MNG-6255
Commit: 58cf490c696cebfb0cc3dce31fed68658b16626f
Parents: c2e3b3e
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat Jan 6 22:14:00 2018 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Sat Jan 6 22:40:30 2018 +0100

----------------------------------------------------------------------
 .../org/apache/maven/cli/event/ExecutionEventLogger.java    | 9 +++++++--
 .../apache/maven/cli/event/ExecutionEventLoggerTest.java    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/58cf490c/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 3da9ad3..85760e6 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -114,7 +114,9 @@ public class ExecutionEventLogger
             final List<MavenProject> projects = event.getSession().getProjects();
             for ( MavenProject project : projects )
             {
-                logger.info( project.getName() );
+                int len = LINE_LENGTH - project.getName().length() - project.getPackaging().length() - 2;
+                logger.info( project.getName() + chars( ' ', ( len > 0 ) ? len : 1 ) + '[' + project.getPackaging()
+                    + ']' );
             }
 
             totalProjects = projects.size();
@@ -302,7 +304,10 @@ public class ExecutionEventLogger
                 infoMain( building + ( ( pad > 0 ) ? chars( ' ', pad ) : "" ) + progress );
             }
 
-            infoLine( '-' );
+            // ----------[ packaging ]----------
+            prefix = chars( '-', Math.max( 0, ( LINE_LENGTH - project.getPackaging().length() - 4 ) / 2 ) );
+            suffix = chars( '-', Math.max( 0, LINE_LENGTH - project.getPackaging().length() - 4 - prefix.length() ) );
+            infoMain( prefix + "[ " + project.getPackaging() + " ]" + suffix );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/58cf490c/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
index 4c0539d..ca4c8a4 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
@@ -73,7 +73,7 @@ public class ExecutionEventLoggerTest
         inOrder.verify( logger ).info( "" );
         inOrder.verify( logger ).info( "------------------< org.apache.maven:maven-embedder >-------------------" );
         inOrder.verify( logger ).info( "Building Apache Maven Embedder 3.5.4-SNAPSHOT" );
-        inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
+        inOrder.verify( logger ).info( "--------------------------------[ jar ]---------------------------------" );
     }
 
     @Test
@@ -101,6 +101,6 @@ public class ExecutionEventLoggerTest
         inOrder.verify( logger ).info( "" );
         inOrder.verify( logger ).info( "--< org.apache.maven.plugins.overflow:maven-project-info-reports-plugin >--" );
         inOrder.verify( logger ).info( "Building Apache Maven Project Info Reports Plugin 3.0.0-SNAPSHOT" );
-        inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
+        inOrder.verify( logger ).info( "----------------------------[ maven-plugin ]----------------------------" );
     }
 }


[10/49] maven git commit: [MNG-6275] Maven Embedder compatible fix

Posted by hb...@apache.org.
[MNG-6275] Maven Embedder compatible fix

- Need to use PARENT_CLASSLOADER so that when used by embedder we get a
consistent view of the available classes

- Restores test case from f047ea143766fd22ae42040e6805bef287f3cc3e


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/27a2bda3
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/27a2bda3
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/27a2bda3

Branch: refs/heads/MNG-6255
Commit: 27a2bda3f4a8f5385c4cab360ed7365d3d3d3c09
Parents: c9a288d
Author: Stephen Connolly <st...@gmail.com>
Authored: Thu Aug 24 11:33:01 2017 +0200
Committer: Stephen Connolly <st...@gmail.com>
Committed: Sat Sep 9 11:56:27 2017 +0100

----------------------------------------------------------------------
 .../classrealm/DefaultClassRealmManager.java    |   2 +-
 .../DefaultClassRealmManagerTest.java           | 101 +++++++++++++++++++
 2 files changed, 102 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/27a2bda3/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index 6ce1925..013ab23 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -120,7 +120,7 @@ public class DefaultClassRealmManager
             {
                 try
                 {
-                    ClassRealm classRealm = world.newRealm( realmId, null );
+                    ClassRealm classRealm = world.newRealm( realmId, PARENT_CLASSLOADER );
 
                     if ( logger.isDebugEnabled() )
                     {

http://git-wip-us.apache.org/repos/asf/maven/blob/27a2bda3/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
new file mode 100644
index 0000000..726199f
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
@@ -0,0 +1,101 @@
+package org.apache.maven.classrealm;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.ServiceLoader;
+
+import javax.script.ScriptEngineFactory;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
+import org.junit.Test;
+
+public class DefaultClassRealmManagerTest extends PlexusTestCase
+{
+    private ClassRealmManager classRealmManager;
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        this.classRealmManager = lookup( ClassRealmManager.class );
+    }
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration configuration )
+    {
+        configuration.setClassPathScanning( PlexusConstants.SCANNING_INDEX );
+    }
+
+    @Test
+    public void testMNG6275_pluginRealmDefaultParentClassLoader()
+    {
+        Plugin plugin = new Plugin();
+        plugin.setVersion( "VERSION" );
+        
+        ClassLoader parent = null;
+        
+        ClassRealm pluginRealm = classRealmManager.createPluginRealm( plugin, parent, null, null, null );
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, pluginRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_extensionRealmDefaultParentClassLoader()
+    {
+        Plugin extension = new Plugin();
+        extension.setVersion( "VERSION" );
+        
+        ClassRealm extensionRealm = classRealmManager.createExtensionRealm( extension, null );
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, extensionRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_projectRealmDefaultParentClassLoader()
+    {
+        Model model = new Model();
+        
+        ClassRealm projectRealm = classRealmManager.createProjectRealm( model, null );
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, projectRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_mavenApiRealmDefaultParentClassLoader()
+    {
+        ClassRealm mavenApiRealm = classRealmManager.getMavenApiRealm();
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, mavenApiRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_coreRealmDefaultParentClassLoader()
+    {
+        ClassRealm coreRealm = classRealmManager.getCoreRealm();
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, coreRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+}


[35/49] maven git commit: [MNG-6305] Validation of CI friendly version incorrect o Checkin that only the three expression changelist, revision and sha1 are valid in a version. o Added some tests.

Posted by hb...@apache.org.
[MNG-6305] Validation of CI friendly version incorrect
 o Checkin that only the three expression changelist,
   revision and sha1 are valid in a version.
 o Added some tests.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/2295c17b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/2295c17b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/2295c17b

Branch: refs/heads/MNG-6255
Commit: 2295c17b45f46cae0daa46105e0a7856505a108f
Parents: df5169b
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu Dec 28 21:29:46 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sat Dec 30 21:41:18 2017 +0100

----------------------------------------------------------------------
 .../AbstractStringBasedModelInterpolator.java   |  6 ++
 .../model/validation/DefaultModelValidator.java | 30 ++++---
 .../validation/DefaultModelValidatorTest.java   | 84 ++++++++++++++++----
 .../raw-model/bad-ci-friendly-sha1plus.xml      | 31 ++++++++
 .../raw-model/bad-ci-friendly-sha1plus2.xml     | 31 ++++++++
 .../validation/raw-model/bad-ci-friendly.xml    | 31 ++++++++
 .../ok-ci-friendly-all-expressions.xml          | 31 ++++++++
 .../raw-model/ok-ci-friendly-changelist.xml     | 31 ++++++++
 .../raw-model/ok-ci-friendly-revision.xml       | 31 ++++++++
 .../raw-model/ok-ci-friendly-sha1.xml           | 31 ++++++++
 10 files changed, 311 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
index b47edbe..09b53e4 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
@@ -61,6 +61,12 @@ public abstract class AbstractStringBasedModelInterpolator
     public static final String CHANGELIST_PROPERTY = "changelist";
 
     public static final String REVISION_PROPERTY = "revision";
+    
+    public static final String SHA1_PROPERTY_EXPRESSION = "${" + SHA1_PROPERTY + "}";
+
+    public static final String CHANGELIST_PROPERTY_EXPRESSION = "${" + CHANGELIST_PROPERTY + "}";
+
+    public static final String REVISION_PROPERTY_EXPRESSION = "${" + REVISION_PROPERTY + "}";
 
     private static final List<String> PROJECT_PREFIXES = Arrays.asList( "pom.", "project." );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index d97d8f6..9299b43 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -26,6 +26,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.maven.model.Activation;
@@ -65,6 +66,13 @@ public class DefaultModelValidator
     implements ModelValidator
 {
 
+    private static final Pattern CI_FRIENDLY_EXPRESSION = Pattern.compile( "\\$\\{(.+?)\\}" );
+
+    private static final List<String> CI_FRIENDLY_POSSIBLE_PROPERTY_NAMES =
+        Arrays.asList( AbstractStringBasedModelInterpolator.REVISION_PROPERTY,
+                       AbstractStringBasedModelInterpolator.CHANGELIST_PROPERTY,
+                       AbstractStringBasedModelInterpolator.SHA1_PROPERTY );
+
     private static final Pattern ID_REGEX = Pattern.compile( "[A-Za-z0-9_\\-.]+" );
 
     private static final Pattern ID_WITH_WILDCARDS_REGEX = Pattern.compile( "[A-Za-z0-9_\\-.?*]+" );
@@ -532,7 +540,7 @@ public class DefaultModelValidator
                                                            ModelBuildingRequest request )
     {
         // We only check for groupId/artifactId cause if there is another
-        // module with the same groupId/artifactId this will fail the build 
+        // module with the same groupId/artifactId this will fail the build
         // earlier like "Project '...' is duplicated in the reactor.
         // So it is sufficient to check only groupId/artifactId and not the
         // packaging type.
@@ -855,7 +863,6 @@ public class DefaultModelValidator
     private boolean validateVersionNoExpression( String fieldName, ModelProblemCollector problems, Severity severity,
                                                  Version version, String string, InputLocationTracker tracker )
     {
-
         if ( !hasExpression( string ) )
         {
             return true;
@@ -868,18 +875,19 @@ public class DefaultModelValidator
         // revision
         // sha1
         //
-        string = string.trim();
-        if ( string.contains( "${" + AbstractStringBasedModelInterpolator.CHANGELIST_PROPERTY + "}" )
-            || string.contains( "${" + AbstractStringBasedModelInterpolator.REVISION_PROPERTY + "}" )
-            || string.contains( "${" + AbstractStringBasedModelInterpolator.SHA1_PROPERTY + "}" ) )
+        Matcher m = CI_FRIENDLY_EXPRESSION.matcher( string.trim() );
+        while ( m.find() )
         {
-            return true;
-        }
+            if ( !CI_FRIENDLY_POSSIBLE_PROPERTY_NAMES.contains( m.group( 1 ) ) )
+            {
+                addViolation( problems, severity, version, fieldName, null,
+                              "contains an expression but should be a constant.", tracker );
 
-        addViolation( problems, severity, version, fieldName, null, "contains an expression but should be a constant.",
-                      tracker );
+                return false;
+            }
+        }
 
-        return false;
+        return true;
     }
 
     private boolean hasExpression( String value )

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
index 5614daf..0bb3bd4 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
@@ -419,18 +419,19 @@ public class DefaultModelValidatorTest
         assertViolations( result, 0, 0, 1 );
 
         assertContains( result.getWarnings().get( 0 ),
-                "'dependencies.dependency.systemPath' for test:a:jar should use a variable instead of a hard-coded path" );
+                        "'dependencies.dependency.systemPath' for test:a:jar should use a variable instead of a hard-coded path" );
 
-        SimpleProblemCollector result_31 = validateRaw( "hard-coded-system-path.xml", ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
+        SimpleProblemCollector result_31 =
+            validateRaw( "hard-coded-system-path.xml", ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
 
         assertViolations( result_31, 0, 0, 3 );
 
         assertContains( result_31.getWarnings().get( 0 ),
-                "'dependencies.dependency.scope' for test:a:jar declares usage of deprecated 'system' scope" );
+                        "'dependencies.dependency.scope' for test:a:jar declares usage of deprecated 'system' scope" );
         assertContains( result_31.getWarnings().get( 1 ),
-                "'dependencies.dependency.systemPath' for test:a:jar should use a variable instead of a hard-coded path" );
+                        "'dependencies.dependency.systemPath' for test:a:jar should use a variable instead of a hard-coded path" );
         assertContains( result_31.getWarnings().get( 2 ),
-                "'dependencies.dependency.scope' for test:b:jar declares usage of deprecated 'system' scope" );
+                        "'dependencies.dependency.scope' for test:b:jar declares usage of deprecated 'system' scope" );
 
     }
 
@@ -625,22 +626,23 @@ public class DefaultModelValidatorTest
         assertViolations( result, 0, 0, 2 );
 
         assertContains( result.getWarnings().get( 0 ),
-                "'dependencies.dependency.systemPath' for test:a:jar should not point at files within the project directory" );
+                        "'dependencies.dependency.systemPath' for test:a:jar should not point at files within the project directory" );
         assertContains( result.getWarnings().get( 1 ),
-                "'dependencies.dependency.systemPath' for test:b:jar should not point at files within the project directory" );
+                        "'dependencies.dependency.systemPath' for test:b:jar should not point at files within the project directory" );
 
-        SimpleProblemCollector result_31 = validateRaw( "basedir-system-path.xml", ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
+        SimpleProblemCollector result_31 =
+            validateRaw( "basedir-system-path.xml", ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
 
         assertViolations( result_31, 0, 0, 4 );
 
         assertContains( result_31.getWarnings().get( 0 ),
-                "'dependencies.dependency.scope' for test:a:jar declares usage of deprecated 'system' scope" );
+                        "'dependencies.dependency.scope' for test:a:jar declares usage of deprecated 'system' scope" );
         assertContains( result_31.getWarnings().get( 1 ),
-                "'dependencies.dependency.systemPath' for test:a:jar should not point at files within the project directory" );
+                        "'dependencies.dependency.systemPath' for test:a:jar should not point at files within the project directory" );
         assertContains( result_31.getWarnings().get( 2 ),
-                "'dependencies.dependency.scope' for test:b:jar declares usage of deprecated 'system' scope" );
+                        "'dependencies.dependency.scope' for test:b:jar declares usage of deprecated 'system' scope" );
         assertContains( result_31.getWarnings().get( 3 ),
-                "'dependencies.dependency.systemPath' for test:b:jar should not point at files within the project directory" );
+                        "'dependencies.dependency.systemPath' for test:b:jar should not point at files within the project directory" );
     }
 
     public void testInvalidVersionInPluginManagement()
@@ -703,16 +705,16 @@ public class DefaultModelValidatorTest
     }
 
     public void testDeprecatedDependencyMetaversionsLatestAndRelease()
-            throws Exception
+        throws Exception
     {
         SimpleProblemCollector result = validateRaw( "deprecated-dependency-metaversions-latest-and-release.xml" );
 
         assertViolations( result, 0, 0, 2 );
 
         assertContains( result.getWarnings().get( 0 ),
-               "'dependencies.dependency.version' for test:a:jar is either LATEST or RELEASE (both of them are being deprecated)" );
+                        "'dependencies.dependency.version' for test:a:jar is either LATEST or RELEASE (both of them are being deprecated)" );
         assertContains( result.getWarnings().get( 1 ),
-                "'dependencies.dependency.version' for test:b:jar is either LATEST or RELEASE (both of them are being deprecated)" );
+                        "'dependencies.dependency.version' for test:b:jar is either LATEST or RELEASE (both of them are being deprecated)" );
     }
 
     public void testSelfReferencingDependencyInRawModel()
@@ -727,4 +729,56 @@ public class DefaultModelValidatorTest
 
     }
 
+    public void testCiFriendlySha1()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/ok-ci-friendly-sha1.xml" );
+        assertViolations( result, 0, 0, 0 );
+    }
+
+    public void testCiFriendlyRevision()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/ok-ci-friendly-revision.xml" );
+        assertViolations( result, 0, 0, 0 );
+    }
+
+    public void testCiFriendlyChangeList()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/ok-ci-friendly-changelist.xml" );
+        assertViolations( result, 0, 0, 0 );
+    }
+
+    public void testCiFriendlyAllExpressions()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/ok-ci-friendly-all-expressions.xml" );
+        assertViolations( result, 0, 0, 0 );
+    }
+
+    public void testCiFriendlyBad()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-ci-friendly.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'version' contains an expression but should be a constant.", result.getWarnings().get( 0 ) );
+    }
+
+    public void testCiFriendlyBadSha1Plus()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-ci-friendly-sha1plus.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'version' contains an expression but should be a constant.", result.getWarnings().get( 0 ) );
+    }
+
+    public void testCiFriendlyBadSha1Plus2()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-ci-friendly-sha1plus2.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'version' contains an expression but should be a constant.", result.getWarnings().get( 0 ) );
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus.xml
new file mode 100644
index 0000000..35642d8
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-sha1plus</artifactId>
+	<version>${sha1}${wrong}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct.
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus2.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus2.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus2.xml
new file mode 100644
index 0000000..7f9ab2c
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly-sha1plus2.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-sha1plus</artifactId>
+	<version>${sha1}${wrong}${revision}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct.
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly.xml
new file mode 100644
index 0000000..9288b35
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-ci-friendly.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-wrong</artifactId>
+	<version>${wrong}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct.
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-all-expressions.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-all-expressions.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-all-expressions.xml
new file mode 100644
index 0000000..860b482
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-all-expressions.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-sha1</artifactId>
+	<version>${revision}${changelist}${sha1}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct.
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-changelist.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-changelist.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-changelist.xml
new file mode 100644
index 0000000..f4a1da7
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-changelist.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-changelist</artifactId>
+	<version>${changelist}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct.
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-revision.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-revision.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-revision.xml
new file mode 100644
index 0000000..565cd7b
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-revision.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-revision</artifactId>
+	<version>${revision}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct.
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/2295c17b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-sha1.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-sha1.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-sha1.xml
new file mode 100644
index 0000000..5287c99
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/ok-ci-friendly-sha1.xml
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-sha1</artifactId>
+	<version>${sha1}</version>
+
+	<description>
+        This will test if the validation for the ci friendly versions
+        is working correct. This c
+	</description>
+</project>
\ No newline at end of file


[27/49] maven git commit: [MNG-6306] Replace use of Guava in maven-resolver-provider with a lighter weight alternative

Posted by hb...@apache.org.
[MNG-6306] Replace use of Guava in maven-resolver-provider with a lighter weight alternative

This closes #138


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/866582d2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/866582d2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/866582d2

Branch: refs/heads/MNG-6255
Commit: 866582d296ed80f36f33e5293cd07647185e0e43
Parents: 909fb7c
Author: Sylwester Lachiewicz <sl...@gmail.com>
Authored: Fri Nov 24 20:38:10 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Fri Nov 24 23:55:19 2017 +0100

----------------------------------------------------------------------
 maven-resolver-provider/pom.xml                       |  4 ----
 .../repository/internal/DefaultModelResolver.java     | 14 +++++++-------
 2 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/866582d2/maven-resolver-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index 4aff64c..5cd835c 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -71,10 +71,6 @@ under the License.
       <artifactId>javax.inject</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-    <dependency>
       <groupId>com.google.inject</groupId>
       <artifactId>guice</artifactId>
       <classifier>no_aop</classifier>

http://git-wip-us.apache.org/repos/asf/maven/blob/866582d2/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
index 3e82eb9..03a0d9b 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java
@@ -23,11 +23,10 @@ import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Parent;
 import org.apache.maven.model.Repository;
@@ -145,14 +144,15 @@ class DefaultModelResolver
 
     private static void removeMatchingRepository( Iterable<RemoteRepository> repositories, final String id )
     {
-        Iterables.removeIf( repositories, new Predicate<RemoteRepository>()
+        Iterator<RemoteRepository> iterator = repositories.iterator();
+        while ( iterator.hasNext() )
         {
-            @Override
-            public boolean apply( RemoteRepository remoteRepository )
+            RemoteRepository remoteRepository = iterator.next();
+            if ( remoteRepository.getId().equals( id ) )
             {
-                return remoteRepository.getId().equals( id );
+                iterator.remove();
             }
-        } );
+        }
     }
 
     @Override


[19/49] maven git commit: [maven-release-plugin] prepare release maven-3.5.2

Posted by hb...@apache.org.
[maven-release-plugin] prepare release maven-3.5.2


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/138edd61
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/138edd61
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/138edd61

Branch: refs/heads/MNG-6255
Commit: 138edd61fd100ec658bfa2d307c43b76940a5d7d
Parents: 4b95ad9
Author: Stephen Connolly <st...@gmail.com>
Authored: Wed Oct 18 08:54:47 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Wed Oct 18 08:54:47 2017 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml              | 2 +-
 maven-artifact/pom.xml            | 2 +-
 maven-builder-support/pom.xml     | 2 +-
 maven-compat/pom.xml              | 2 +-
 maven-core/pom.xml                | 2 +-
 maven-embedder/pom.xml            | 2 +-
 maven-model-builder/pom.xml       | 2 +-
 maven-model/pom.xml               | 2 +-
 maven-plugin-api/pom.xml          | 2 +-
 maven-repository-metadata/pom.xml | 2 +-
 maven-resolver-provider/pom.xml   | 2 +-
 maven-settings-builder/pom.xml    | 2 +-
 maven-settings/pom.xml            | 2 +-
 maven-slf4j-provider/pom.xml      | 2 +-
 pom.xml                           | 4 ++--
 15 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 4d9b78c..ba28fa2 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>apache-maven</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-artifact/pom.xml
----------------------------------------------------------------------
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 8c99f33..3772dd9 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-artifact</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-builder-support/pom.xml
----------------------------------------------------------------------
diff --git a/maven-builder-support/pom.xml b/maven-builder-support/pom.xml
index 308f55d..0b6328e 100644
--- a/maven-builder-support/pom.xml
+++ b/maven-builder-support/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-builder-support</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-compat/pom.xml
----------------------------------------------------------------------
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 1b1cd3c..1935ebf 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-compat</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index a9028c4..8ab5bcc 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-core</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index c252426..6dd1641 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-embedder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-model-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index e86193c..f6ebe27 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-model-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-model/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index da104fd..6897154 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-model</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-plugin-api/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 6477875..57c7ad5 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-plugin-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-repository-metadata/pom.xml
----------------------------------------------------------------------
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index 6395d2d..605363d 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-repository-metadata</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-resolver-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index 1d3505c..f6e1774 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-resolver-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-settings-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index 45a5ffd..0a3393d 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-settings-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-settings/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index 8266761..882a495 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-settings</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/maven-slf4j-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index 4bb0b2a..f756874 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.5.2</version>
   </parent>
 
   <artifactId>maven-slf4j-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/138edd61/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ea119e1..7803da7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
   </parent>
 
   <artifactId>maven</artifactId>
-  <version>3.5.2-SNAPSHOT</version>
+  <version>3.5.2</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven</name>
@@ -98,7 +98,7 @@ under the License.
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
     <url>https://github.com/apache/maven/tree/${project.scm.tag}</url>
-    <tag>master</tag>
+    <tag>maven-3.5.2</tag>
   </scm>
   <issueManagement>
     <system>jira</system>


[07/49] maven git commit: Update Jenkinsfile to use JENKINS-43507 syntax for resolveScm

Posted by hb...@apache.org.
Update Jenkinsfile to use JENKINS-43507 syntax for resolveScm


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/e44c39c2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/e44c39c2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/e44c39c2

Branch: refs/heads/MNG-6255
Commit: e44c39c2eb5afda9efe60b9dd0ffc32c62501c5f
Parents: f047ea1
Author: Stephen Connolly <st...@gmail.com>
Authored: Tue Aug 29 21:47:50 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Tue Aug 29 21:47:50 2017 +0100

----------------------------------------------------------------------
 Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/e44c39c2/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index b6c7e19..004abcb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -49,7 +49,7 @@ node('ubuntu') {
             junit allowEmptyResults: true, testResults:'**/target/*-reports/*.xml'
         }
 
-        tests = resolveScm source: [$class: 'GitSCMSource', credentialsId: '', excludes: '', gitTool: 'Default', id: '_', ignoreOnPushNotifications: false, includes: '*', remote: 'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git'], targets: [BRANCH_NAME, 'master']
+        tests = resolveScm source: [$class: 'GitSCMSource', credentialsId: '', id: '_', remote: 'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait'], [$class: 'GitToolSCMSourceTrait', gitTool: 'Default']]], targets: [BRANCH_NAME, 'master']
     }
 }
 


[29/49] maven git commit: Syntax

Posted by hb...@apache.org.
Syntax


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/3f04e94e
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/3f04e94e
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/3f04e94e

Branch: refs/heads/MNG-6255
Commit: 3f04e94ea45033fa2768f40148b5e06a141e066e
Parents: 35f3586
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Dec 11 13:45:00 2017 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Dec 11 13:45:00 2017 +0000

----------------------------------------------------------------------
 Jenkinsfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/3f04e94e/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 39111e8..9f16f6f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -39,10 +39,10 @@ node(jenkinsEnv.labelForOS(buildOs)) {
             String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
             String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
             withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/.repository", options:[
-                artifactsPublisher(disabled: disablePublishers),
+                artifactsPublisher(disabled: false),
                 junitPublisher(ignoreAttachments: false),
-                findbugsPublisher(disabled: disablePublishers),
-                openTasksPublisher(disabled: disablePublishers),
+                findbugsPublisher(disabled: false),
+                openTasksPublisher(disabled: false),
                 dependenciesFingerprintPublisher(),
                 invokerPublisher(),
                 pipelineGraphPublisher()


[28/49] maven git commit: Start using some of the jenkinsEnv stuff

Posted by hb...@apache.org.
Start using some of the jenkinsEnv stuff


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/35f3586e
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/35f3586e
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/35f3586e

Branch: refs/heads/MNG-6255
Commit: 35f3586eccb1cd7bf3a6585aaa1aeb8f0cd0516b
Parents: 866582d
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Dec 11 13:42:14 2017 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Dec 11 13:42:14 2017 +0000

----------------------------------------------------------------------
 Jenkinsfile | 207 ++++++++++++++++++++++++++++++-------------------------
 1 file changed, 112 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/35f3586e/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 004abcb..39111e8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -19,12 +19,15 @@
 
 properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: env.BRANCH_NAME=='master'?'10':'5'))])
 
+def buildOs = 'linux'
+def buildJdk = '7'
+def buildMvn = '3.5.0'
 def tests
 def CORE_IT_PROFILES='run-its,embedded'
 
 try {
 
-node('ubuntu') {
+node(jenkinsEnv.labelForOS(buildOs)) {
     dir('build') {
         stage('Checkout') {
             checkout scm
@@ -33,130 +36,144 @@ node('ubuntu') {
         def WORK_DIR=pwd()
 
         stage('Build / Unit Test') {
-            def MAVEN_BUILD=tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'
-            echo "Driving build and unit tests using Maven $MAVEN_BUILD"
-            def JAVA7_HOME=tool name: 'JDK 1.7 (latest)', type: 'hudson.model.JDK'
-            echo "Running build and unit tests with Java $JAVA7_HOME"
-
-            withEnv(["PATH+MAVEN=$MAVEN_BUILD/bin","PATH+JDK=$JAVA7_HOME/bin"]) {
-                sh "mvn clean verify -B -U -e -fae -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/.repository"
+            String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
+            String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
+            withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/.repository", options:[
+                artifactsPublisher(disabled: disablePublishers),
+                junitPublisher(ignoreAttachments: false),
+                findbugsPublisher(disabled: disablePublishers),
+                openTasksPublisher(disabled: disablePublishers),
+                dependenciesFingerprintPublisher(),
+                invokerPublisher(),
+                pipelineGraphPublisher()
+            ]) {
+                sh "mvn clean verify -B -U -e -fae -V -maven.test.failure.ignore=true"
             }
-
             dir ('apache-maven/target') {
                 sh "mv apache-maven-*-bin.zip apache-maven-dist.zip"
                 stash includes: 'apache-maven-dist.zip', name: 'dist'
             }
-            junit allowEmptyResults: true, testResults:'**/target/*-reports/*.xml'
         }
 
         tests = resolveScm source: [$class: 'GitSCMSource', credentialsId: '', id: '_', remote: 'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait'], [$class: 'GitToolSCMSourceTrait', gitTool: 'Default']]], targets: [BRANCH_NAME, 'master']
     }
 }
 
-stage 'Integration Test'
-parallel linuxJava7:{
-        node('ubuntu') {
-            def MAVEN_NIX_J7=tool name: 'Maven 3 (latest)', type: 'hudson.tasks.Maven$MavenInstallation'
-            echo "Driving integration tests using Maven $MAVEN_NIX_J7"
-            def JAVA_NIX_J7=tool name: 'JDK 1.7 (latest)', type: 'hudson.model.JDK'
-            echo "Running integration tests with Java $JAVA_NIX_J7"
 
-            dir('test') {
-                def WORK_DIR=pwd()
-                checkout tests
-                sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
-                unstash 'dist'
-                withEnv(["PATH+MAVEN=$MAVEN_NIX_J7/bin","PATH+JDK=$JAVA_NIX_J7/bin"]) {
-                    sh "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+parallel linuxJava7:{
+        node(jenkinsEnv.labelForOS('linux')) {
+            stage ('Linux Java 7') {
+                String jdkName = jenkinsEnv.jdkFromVersion('linux', '7')
+                String mvnName = jenkinsEnv.mvnFromVersion('linux', buildMvn)
+                dir('test') {
+                    def WORK_DIR=pwd()
+                    checkout tests
+                    sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
+                    unstash 'dist'
+                    withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+                        junitPublisher(ignoreAttachments: false)
+                    ]) {
+                        sh "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    }
+                    deleteDir() // clean up after ourselves to reduce disk space
                 }
-                junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml'
-                deleteDir() // clean up after ourselves to reduce disk space
             }
         }
     },linuxJava8: {
-        node('ubuntu') {
-            def MAVEN_NIX_J8=tool name: 'Maven 3 (latest)', type: 'hudson.tasks.Maven$MavenInstallation'
-            echo "Driving integration tests using Maven $MAVEN_NIX_J8"
-            def JAVA_NIX_J8=tool name: 'JDK 1.8 (latest)', type: 'hudson.model.JDK'
-            echo "Running integration tests with Java $JAVA_NIX_J8"
-
-            dir('test') {
-                def WORK_DIR=pwd()
-                checkout tests
-                sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
-                unstash 'dist'
-                withEnv(["PATH+MAVEN=$MAVEN_NIX_J8/bin","PATH+JDK=$JAVA_NIX_J8/bin"]) {
-                    sh "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+        node(jenkinsEnv.labelForOS('linux')) {
+            stage ('Linux Java 8') {
+                String jdkName = jenkinsEnv.jdkFromVersion('linux', '8')
+                String mvnName = jenkinsEnv.mvnFromVersion('linux', buildMvn)
+                dir('test') {
+                    def WORK_DIR=pwd()
+                    checkout tests
+                    sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
+                    unstash 'dist'
+                    withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+                        junitPublisher(ignoreAttachments: false)
+                    ]) {
+                        sh "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    }
+                    deleteDir() // clean up after ourselves to reduce disk space
                 }
-                junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml'
-                deleteDir() // clean up after ourselves to reduce disk space
             }
         }
     }, winJava7: {
-        node('Windows') {
-            def MAVEN_WIN_J7=tool name: 'Maven 3 (latest)', type: 'hudson.tasks.Maven$MavenInstallation'
-            dir(MAVEN_WIN_J7) {
-                MAVEN_WIN_J7=pwd()
-            }
-            echo "Driving integration tests using Maven $MAVEN_WIN_J7"
-            def JAVA_WIN_J7=tool name: 'JDK 1.7 (latest)', type: 'hudson.model.JDK'
-            dir(JAVA_WIN_J7) {
-                JAVA_WIN_J7=pwd()
-            }
-            echo "Running integration tests with Java $JAVA_WIN_J7"
-
-            // need a short path or we hit 256 character limit for paths
-            // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
-            // will not trample each other
-            dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") {
-                def WORK_DIR=pwd()
-                checkout tests
-                bat "if exist it-local-repo rmdir /s /q it-local-repo"
-                bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
-                withEnv(["Path+MAVEN=$MAVEN_WIN_J7\\bin","Path+JDK=$JAVA_WIN_J7\\bin","JAVA_HOME=$JAVA_WIN_J7"]) {
-                    bat "set"
+        node(jenkinsEnv.labelForOS('windows')) {
+            stage ('Windows Java 7') {
+                String jdkName = jenkinsEnv.jdkFromVersion('windows', '7')
+                String mvnName = jenkinsEnv.mvnFromVersion('windows', buildMvn)
+
+                // need a short path or we hit 256 character limit for paths
+                // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
+                // will not trample each other
+                dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") {
+                    def WORK_DIR=pwd()
+                    checkout tests
+                    bat "if exist it-local-repo rmdir /s /q it-local-repo"
+                    bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
                     unstash 'dist'
-                    bat "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+                        junitPublisher(ignoreAttachments: false)
+                    ]) {
+                        bat "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    }
+                    deleteDir() // clean up after ourselves to reduce disk space
                 }
-                junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml'
-                deleteDir() // clean up after ourselves to reduce disk space
             }
         }
     }, winJava8: {
-        node('Windows') {
-            def MAVEN_WIN_J8=tool name: 'Maven 3 (latest)', type: 'hudson.tasks.Maven$MavenInstallation'
-            dir(MAVEN_WIN_J8) {
-                MAVEN_WIN_J8=pwd()
-            }
-            echo "Driving integration tests using Maven $MAVEN_WIN_J8"
-            def JAVA_WIN_J8=tool name: 'JDK 1.8 (latest)', type: 'hudson.model.JDK'
-            dir(JAVA_WIN_J8) {
-                JAVA_WIN_J8=pwd()
-            }
-            echo "Running integration tests with Java $JAVA_WIN_J8"
-
-            // need a short path or we hit 256 character limit for paths
-            // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
-            // will not trample each other
-            dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") {
-                def WORK_DIR=pwd()
-                checkout tests
-                bat "if exist it-local-repo rmdir /s /q it-local-repo"
-                bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
-                withEnv(["Path+MAVEN=$MAVEN_WIN_J8\\bin","Path+JDK=$JAVA_WIN_J8\\bin","JAVA_HOME=$JAVA_WIN_J8"]) {
-                    bat "set"
+        node(jenkinsEnv.labelForOS('windows')) {
+            stage ('Windows Java 8') {
+                String jdkName = jenkinsEnv.jdkFromVersion('windows', '8')
+                String mvnName = jenkinsEnv.mvnFromVersion('windows', buildMvn)
+
+                // need a short path or we hit 256 character limit for paths
+                // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
+                // will not trample each other
+                dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") {
+                    def WORK_DIR=pwd()
+                    checkout tests
+                    bat "if exist it-local-repo rmdir /s /q it-local-repo"
+                    bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
                     unstash 'dist'
-                    bat "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+                        junitPublisher(ignoreAttachments: false)
+                    ]) {
+                        bat "mvn clean install -P$CORE_IT_PROFILES -B -U -V -Dmaven.test.failure.ignore=true -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    }
+                    deleteDir() // clean up after ourselves to reduce disk space
                 }
-                junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml'
-                deleteDir() // clean up after ourselves to reduce disk space
             }
         }
     }
 
-} finally {
-    node('ubuntu') {
-        emailext body: "See ${env.BUILD_URL}", recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'FailingTestSuspectsRecipientProvider'], [$class: 'FirstFailingBuildSuspectsRecipientProvider']], replyTo: 'dev@maven.apache.org', subject: "${env.JOB_NAME} - build ${env.BUILD_DISPLAY_NAME} - ${currentBuild.result}", to: 'notifications@maven.apache.org'
+// JENKINS-34376 seems to make it hard to detect the aborted builds
+} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
+    // this ambiguous condition means a user probably aborted
+    if (e.causes.size() == 0) {
+        currentBuild.result = "ABORTED"
+    } else {
+        currentBuild.result = "FAILURE"
+    }
+    throw e
+} catch (hudson.AbortException e) {
+    // this ambiguous condition means during a shell step, user probably aborted
+    if (e.getMessage().contains('script returned exit code 143')) {
+        currentBuild.result = "ABORTED"
+    } else {
+        currentBuild.result = "FAILURE"
     }
+    throw e
+} catch (InterruptedException e) {
+    currentBuild.result = "ABORTED"
+    throw e
+} catch (Throwable e) {
+    currentBuild.result = "FAILURE"
+    throw e
+} finally {
+    // notify completion
+    stage("Notifications") {
+        jenkinsNotify()      
+    }    
 }
-


[16/49] maven git commit: [MNG-6242] detect Cygwin/Mingw pseudo terminal for Jansi

Posted by hb...@apache.org.
[MNG-6242] detect Cygwin/Mingw pseudo terminal for Jansi

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c19e9dca
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c19e9dca
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c19e9dca

Branch: refs/heads/MNG-6255
Commit: c19e9dcac3d200094c770521b9b1b10df76f26c4
Parents: 4f530c4
Author: Hervé Boutemy <hb...@apache.org>
Authored: Mon Sep 25 22:52:48 2017 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Sun Oct 15 10:16:00 2017 +0200

----------------------------------------------------------------------
 apache-maven/src/bin/mvn | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c19e9dca/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index fa6164b..e3a5848 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -188,6 +188,14 @@ export MAVEN_PROJECTBASEDIR
 MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
 export MAVEN_CMD_LINE_ARGS
 
+# detect cygwin or mingw pseudo-terminal for Jansi
+# workaround for https://github.com/fusesource/jansi-native/issues/11
+if $cygwin || $mingw; then
+  if [ -t 1 ]; then
+    MAVEN_OPTS="-Djansi.passthrough=true $MAVEN_OPTS"
+  fi
+fi
+
 exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \


[22/49] maven git commit: Update DOAP

Posted by hb...@apache.org.
Update DOAP


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5919b745
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5919b745
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5919b745

Branch: refs/heads/MNG-6255
Commit: 5919b7450d2e01f079e930d92df7910af39d489a
Parents: 69c512a
Author: Stephen Connolly <st...@gmail.com>
Authored: Thu Oct 26 09:30:12 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Thu Oct 26 09:30:12 2017 +0100

----------------------------------------------------------------------
 doap_Maven.rdf | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5919b745/doap_Maven.rdf
----------------------------------------------------------------------
diff --git a/doap_Maven.rdf b/doap_Maven.rdf
index 7b671d7..79a9141 100644
--- a/doap_Maven.rdf
+++ b/doap_Maven.rdf
@@ -33,6 +33,17 @@ under the License.
     <release>
       <Version>
         <name>Latest stable release</name>
+        <created>2017-10-24</created>
+        <revision>3.5.2</revision>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.zip</file-release>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz</file-release>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.5.2/source/apache-maven-3.5.2-src.zip</file-release>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.5.2/source/apache-maven-3.5.2-src.tar.gz</file-release>
+      </Version>
+    </release>
+    <release>
+      <Version>
+        <name>Apache Maven 3.5.0</name>
         <created>2017-04-07</created>
         <revision>3.5.0</revision>
         <file-release>http://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.zip</file-release>


[26/49] maven git commit: Merge branch 'MNG-6296'

Posted by hb...@apache.org.
Merge branch 'MNG-6296'


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/909fb7c5
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/909fb7c5
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/909fb7c5

Branch: refs/heads/MNG-6255
Commit: 909fb7c59b87286b6eae36195f65db4776ccf92a
Parents: f5f76c7 b2afafe
Author: rfscholte <rf...@apache.org>
Authored: Tue Nov 21 23:32:27 2017 +0100
Committer: rfscholte <rf...@apache.org>
Committed: Tue Nov 21 23:32:27 2017 +0100

----------------------------------------------------------------------
 maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[30/49] maven git commit: Syntax

Posted by hb...@apache.org.
Syntax


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5411c5a9
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5411c5a9
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5411c5a9

Branch: refs/heads/MNG-6255
Commit: 5411c5a9c4d327d7217ae966be3d1ead807ebfd8
Parents: 3f04e94
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Dec 11 13:48:11 2017 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Dec 11 13:48:11 2017 +0000

----------------------------------------------------------------------
 Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5411c5a9/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 9f16f6f..697e6eb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -47,7 +47,7 @@ node(jenkinsEnv.labelForOS(buildOs)) {
                 invokerPublisher(),
                 pipelineGraphPublisher()
             ]) {
-                sh "mvn clean verify -B -U -e -fae -V -maven.test.failure.ignore=true"
+                sh "mvn clean verify -B -U -e -fae -V -Dmaven.test.failure.ignore=true"
             }
             dir ('apache-maven/target') {
                 sh "mv apache-maven-*-bin.zip apache-maven-dist.zip"


[42/49] maven git commit: [MNG-6312] Update Maven Wagon dependency o Upgrade wagon version to 3.0.0 based on CVE-2015-6748 in shaded jsoup.

Posted by hb...@apache.org.
[MNG-6312] Update Maven Wagon dependency
 o Upgrade wagon version to 3.0.0 based on CVE-2015-6748
   in shaded jsoup.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/2b336ff1
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/2b336ff1
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/2b336ff1

Branch: refs/heads/MNG-6255
Commit: 2b336ff150b12aeae9bd0d2a61f1e8d02504492f
Parents: 58cf490
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sat Jan 6 22:59:32 2018 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sat Jan 13 12:46:18 2018 +0100

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/2b336ff1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index bb87aca..d03a25a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@ under the License.
     <guavaVersion>20.0</guavaVersion>
     <guiceVersion>4.0</guiceVersion>
     <sisuInjectVersion>0.3.3</sisuInjectVersion>
-    <wagonVersion>2.12</wagonVersion>
+    <wagonVersion>3.0.0</wagonVersion>
     <securityDispatcherVersion>1.4</securityDispatcherVersion>
     <cipherVersion>1.7</cipherVersion>
     <modelloVersion>1.9.1</modelloVersion>


[02/49] maven git commit: [MNG-6174] Clean Up Maven Model

Posted by hb...@apache.org.
[MNG-6174] Clean Up Maven Model


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4f2a2dba
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4f2a2dba
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4f2a2dba

Branch: refs/heads/MNG-6255
Commit: 4f2a2dba89251d9045fe9944783509a397491da3
Parents: 8f8c45c
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sun Feb 19 21:17:31 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Wed Aug 2 19:31:49 2017 +0200

----------------------------------------------------------------------
 maven-model/src/main/mdo/maven.mdo | 667 --------------------------------
 1 file changed, 667 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4f2a2dba/maven-model/src/main/mdo/maven.mdo
----------------------------------------------------------------------
diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo
index de800d9..7ba6106 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -83,18 +83,6 @@
         <!-- ====================================================================== -->
 
         <field>
-          <name>pomVersion</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <type>String</type>
-          <description>
-            <![CDATA[
-            Declares to which version of project descriptor this POM conforms.
-            The only valid value is <code>3</code>.
-            ]]>
-          </description>
-        </field>
-        <field>
           <name>modelVersion</name>
           <version>4.0.0+</version>
           <required>true</required>
@@ -107,20 +95,6 @@
         <!-- ====================================================================== -->
 
         <field xdoc.separator="blank">
-          <name>extend</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The location of the parent project, if one exists. Values from the
-            parent project will be the default for this project if they are
-            left unspecified. The path may be absolute, or relative to the
-            current <code>project.xml</code> file. For example,
-            <code>&lt;extend&gt;${basedir}/../project.xml&lt;/extend&gt;</code>.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field xdoc.separator="blank">
           <name>parent</name>
           <version>4.0.0+</version>
           <description>The location of the parent project, if one exists. Values from the parent
@@ -159,25 +133,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>id</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <description>
-            <![CDATA[
-            <b>Deprecated</b>. When used, this sets both the <code>groupId</code>
-            and <code>artifactId</code> elements if they were previously empty.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>currentVersion</name>
-          <description>The current version of the artifact produced by this project.</description>
-          <version>3.0.0</version>
-          <required>true</required>
-          <type>String</type>
-        </field>
-        <field>
           <name>version</name>
           <version>4.0.0+</version>
           <required>true</required>
@@ -185,15 +140,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>versions</name>
-          <version>3.0.0</version>
-          <description>Contains information on previous versions of the project.</description>
-          <association>
-            <type>Version</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
           <name>packaging</name>
           <version>4.0.0+</version>
           <description>
@@ -223,13 +169,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>shortDescription</name>
-          <version>3.0.0</version>
-          <description>A short description of the project. The short description should be limited
-            to a single line.</description>
-          <type>String</type>
-        </field>
-        <field>
           <name>description</name>
           <version>3.0.0+</version>
           <description>A detailed description of the project, used by Maven whenever it needs to
@@ -251,20 +190,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>siteAddress</name>
-          <version>3.0.0</version>
-          <description>The hostname of the web server that hosts the project's web site. This is
-            used when the web site is deployed.</description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>siteDirectory</name>
-          <version>3.0.0</version>
-          <description>The directory on the web server where the public web site for this project
-            resides. This is used when the web site is deployed.</description>
-          <type>String</type>
-        </field>
-        <field>
           <name>inceptionYear</name>
           <version>3.0.0+</version>
           <required>true</required>
@@ -273,20 +198,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>logo</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The URL of the project's logo image.  This can be an URL relative
-            to the base directory of the generated web site,
-            (e.g., <code>/images/project-logo.png</code>) or an absolute URL
-            (e.g., <code>http://my.corp/project-logo.png</code>). This is used
-            when generating the project documentation.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
           <name>organization</name>
           <version>3.0.0+</version>
           <description>This element describes various attributes of the organization to which the
@@ -361,27 +272,6 @@
         <!-- SCM                                                                    -->
         <!-- ====================================================================== -->
 
-        <field xdoc.separator="blank">
-          <name>branches</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            Contains information on SCM branches of the project.
-            ]]>
-          </description>
-          <association>
-            <type>Branch</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>repository</name>
-          <version>3.0.0</version>
-          <description>Specification for the SCM used by the project, such as CVS, Subversion, etc.</description>
-          <association>
-            <type>Repository</type>
-          </association>
-        </field>
         <field xdoc.separator="blank" xml.insertParentFieldsUpTo="modules">
           <name>scm</name>
           <version>4.0.0+</version>
@@ -395,12 +285,6 @@
         <!-- Issue Tracking                                                         -->
         <!-- ====================================================================== -->
 
-        <field xdoc.separator="blank">
-          <name>issueTrackingUrl</name>
-          <version>3.0.0</version>
-          <description>The URL of the project's issue tracking system.</description>
-          <type>String</type>
-        </field>
         <field>
           <name>issueManagement</name>
           <version>4.0.0+</version>
@@ -415,12 +299,6 @@
         <!-- ====================================================================== -->
 
         <field>
-          <name>gumpRepositoryId</name>
-          <version>3.0.0</version>
-          <description>This is the repository identifier in Gump that this project is part of.</description>
-          <type>String</type>
-        </field>
-        <field>
           <name>ciManagement</name>
           <version>4.0.0+</version>
           <description>The project's continuous integration information.</description>
@@ -430,83 +308,6 @@
         </field>
 
         <!-- ====================================================================== -->
-        <!-- Distribution Management                                                -->
-        <!-- ====================================================================== -->
-
-        <field>
-          <name>distributionSite</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The server where the final distributions will be published. This is used when the
-            distributions are deployed. If this isn't defined, the central repository is used instead as
-            determined by <code>maven.repo.central</code> and <code>maven.repo.central.directory</code>.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>distributionDirectory</name>
-          <version>3.0.0</version>
-          <description>The directory on the web server where the final distributions will be
-            published. This is used when the distributions are deployed.</description>
-          <type>String</type>
-        </field>
-
-        <!-- ====================================================================== -->
-        <!-- Specific version 3                                                     -->
-        <!-- ====================================================================== -->
-
-        <field>
-          <name>packageGroups</name>
-          <version>3.0.0</version>
-          <description>Package groups required for complete javadocs.</description>
-          <association>
-            <type>PackageGroup</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>reports</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            This element includes the specification of reports to be
-            included in a Maven-generated site.  These reports will be run
-            when a user executes <code>maven site</code>.  All of the
-            reports will be included in the navigation bar for browsing in
-            the order they are specified.
-            ]]>
-          </description>
-          <association>
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>properties</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            Project properties that will be used by various plugins.
-            The format is <code>&lt;name&gt;value&lt;/name&gt;</code>.
-            ]]>
-          </description>
-          <type>Properties</type>
-          <association xml.mapStyle="inline">
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field xml.tagName="package">
-          <name>packageName</name>
-          <version>3.0.0</version>
-          <type>String</type>
-          <description>The Java package name of the project. This value is used when generating
-            JavaDoc.</description>
-        </field>
-
-        <!-- ====================================================================== -->
         <!-- Build                                                                  -->
         <!-- ====================================================================== -->
 
@@ -537,33 +338,6 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>3.0.0</version>
-          <code>
-            <![CDATA[
-              public void setVersion(String version)
-              {
-                  this.currentVersion = version;
-              }
-
-              public String getVersion()
-              {
-                  return currentVersion;
-              }
-
-              /* We need this because we can't use package as a field name.*/
-              public void setPackage(String packageName)
-              {
-                  this.packageName = packageName;
-              }
-
-              public String getPackage()
-              {
-                  return packageName;
-              }
-            ]]>
-          </code>
-        </codeSegment>
-        <codeSegment>
           <version>4.0.0+</version>
           <code>
             <![CDATA[
@@ -757,21 +531,6 @@
         </field>
       </fields>
     </class>
-    <class>
-      <name>Branch</name>
-      <version>3.0.0</version>
-      <description>Contains information on the SCM branches of the project.</description>
-      <fields>
-        <field>
-          <name>tag</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <description>The branch tag in the version control system (e.g. cvs) used by the project
-            for the source code associated with this branch of the project.</description>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
     <class java.clone="deep">
       <name>PluginContainer</name>
       <version>3.0.0+</version>
@@ -936,14 +695,6 @@
       </description>
       <fields>
         <field>
-          <name>nagEmailAddress</name>
-          <version>3.0.0</version>
-          <description>An address to which notifications regarding the status of builds for this
-            project can be sent. This is intended for use by tools which do unattended builds, for
-            example those providing for continuous integration.</description>
-          <type>String</type>
-        </field>
-        <field>
           <name>sourceDirectory</name>
           <version>3.0.0+</version>
           <required>true</required>
@@ -969,15 +720,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>unitTestSourceDirectory</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <description>This element specifies a directory containing the unit test source of the
-            project. The generated build system will compile these directories when the project is
-            being tested. The path given is relative to the project descriptor.</description>
-          <type>String</type>
-        </field>
-        <field>
           <name>testSourceDirectory</name>
           <version>4.0.0+</version>
           <required>true</required>
@@ -990,52 +732,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>aspectSourceDirectory</name>
-          <version>3.0.0</version>
-          <description>This element specifies a directory containing Aspect sources of the project.
-            The generated build system will compile the Aspects in this directory when the project
-            is built if Aspects have been enabled. The path given is relative to the project
-            descriptor.</description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>integrationUnitTestSourceDirectory</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            This element is <b>deprecated</b> and should no longer be used.
-            Initially it was used by the first Cactus plugin. Now
-            the location of the Cactus test sources is defined
-            through a plugin property. See the Cactus plugin
-            <a href="http://jakarta.apache.org/cactus/integration/maven/properties.html">properties</a>
-            page.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>sourceModifications</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <description>This element describes all of the sourceModifications associated with a
-            project. These modifications are used to exclude or include various source depending on
-            the environment the build is running in.</description>
-          <association>
-            <type>SourceModification</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>unitTest</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <description>This element specifies unit tests associated with the project.</description>
-          <defaultValue>new UnitTest()</defaultValue>
-          <association>
-            <type>UnitTest</type>
-          </association>
-        </field>
-        <field>
           <name>outputDirectory</name>
           <version>4.0.0+</version>
           <description><![CDATA[
@@ -1254,18 +950,6 @@
       </description>
       <fields>
         <field>
-          <name>id</name>
-          <version>3.0.0</version>
-          <required>true</required>
-          <description>
-            <![CDATA[
-            <b>Deprecated</b>. Please use <code>groupId</code> and
-            <code>artifactId</code> together instead.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
           <name>groupId</name>
           <version>3.0.0+</version>
           <required>true</required>
@@ -1301,36 +985,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>url</name>
-          <version>3.0.0</version>
-          <description>This url will be provided to the user if the jar file cannot be downloaded
-            from the central repository.</description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>jar</name>
-          <version>3.0.0</version>
-          <description>Literal name of the artifact in the repository. Used to override the
-            calculated artifact name.</description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>type</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The type of dependency. While it
-            usually represents the extension on the filename of the dependency,
-            that is not always the case.
-            Some examples are <code>jar</code>, <code>war</code>, and <code>plugin</code>.
-            A dependency of type <code>plugin</code> is loaded as a Maven plugin and
-            not added to the project build classpath.
-            ]]>
-          </description>
-          <type>String</type>
-          <defaultValue>jar</defaultValue>
-        </field>
-        <field>
           <name>type</name>
           <version>4.0.0+</version>
           <description>
@@ -1371,23 +1025,6 @@
           <required>false</required>
         </field>
         <field>
-          <name>properties</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            Properties about the dependency. Various plugins allow you to
-            mark dependencies with properties. For example the war plugin looks for a
-            <code>war.bundle</code> property, and if found will include the
-            dependency in <code>WEB-INF/lib</code>.
-            ]]>
-          </description>
-          <type>Properties</type>
-          <association xml.mapStyle="inline">
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
           <name>scope</name>
           <version>4.0.0+</version>
           <description>
@@ -1450,20 +1087,6 @@
       </fields>
       <codeSegments>
         <codeSegment>
-          <version>3.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString()
-    {
-        return groupId + "/" + type + "s:" + artifactId + "-" + version;
-    }
-            ]]>
-          </code>
-        </codeSegment>
-        <codeSegment>
           <version>4.0.0+</version>
           <code>
             <![CDATA[
@@ -1507,111 +1130,6 @@
             ]]>
           </code>
         </codeSegment>
-        <codeSegment>
-          <version>3.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @return the key as <code>id:type</code>
-     */
-    public String getKey()
-    {
-        return getId() + ":" + getType();
-    }
-
-    /**
-     * @return the groupId as artifact directory
-     */
-    public String getArtifactDirectory()
-    {
-        return getGroupId();
-    }
-
-    /**
-     * @return the artifact name as <code>artifactId-version.extension</code> if &lt;jar/&gt; not set
-     */
-    public String getArtifact()
-    {
-        // If the jar name has been explicitly set then use that. This
-        // is when the <jar/> element is explicitly used in the POM.
-        if ( getJar() != null)
-        {
-            return getJar();
-        }
-
-        String artifact;
-
-        if ("ejb-client".equals(getType())) {
-          artifact = getArtifactId() + "-" + getVersion() + "-client." + getExtension();
-        } else {
-          artifact = getArtifactId() + "-" + getVersion() + "." + getExtension();
-        }
-
-        return artifact;
-    }
-
-    public String getTypeDirectory()
-    {
-        String path;
-        if (getType().equals("ejb-client")) {
-            path = "ejbs";
-        } else {
-            path = getType() + "s";
-        }
-
-        return path;
-    }
-
-    public String getExtension()
-    {
-        if ("ejb".equals(getType()) || "ejb-client".equals(getType()) || "plugin".equals(getType()) || "aspect".equals(getType()) || "uberjar".equals(getType())) return "jar";
-        return getType();
-    }
-
-    public boolean isAddedToClasspath()
-    {
-        return ("jar".equals(getType()) || "ejb".equals(getType()) || "ejb-client".equals(getType()) || "sar".equals(getType()));
-    }
-
-    public boolean isPlugin()
-    {
-        return ("plugin".equals(getType()));
-    }
-
-    public String getProperty( String property )
-    {
-        return getProperties().getProperty( property );
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( !( o instanceof Dependency ) )
-        {
-            return false;
-        }
-
-        Dependency d  = (Dependency) o;
-        return getId().equals( d.getId() );
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode()
-    {
-        return getId().hashCode();
-    }
-            ]]>
-          </code>
-        </codeSegment>
       </codeSegments>
     </class>
     <class>
@@ -1887,39 +1405,6 @@
           <description>The URL to the organization's home page.</description>
           <type>String</type>
         </field>
-        <field>
-          <name>logo</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The URL to the organization's logo image.  This can be an URL relative
-            to the base directory of the generated web site,
-            (e.g., <code>/images/org-logo.png</code>) or an absolute URL
-            (e.g., <code>http://my.corp/logo.png</code>).  This value is used
-            when generating the project documentation.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
-    <class>
-      <name>PackageGroup</name>
-      <version>3.0.0</version>
-      <description>A JavaDoc package group.</description>
-      <fields>
-        <field>
-          <name>title</name>
-          <version>3.0.0</version>
-          <description>The title to use for the package group.</description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>packages</name>
-          <version>3.0.0</version>
-          <description>The packages in the group</description>
-          <type>String</type>
-        </field>
       </fields>
     </class>
     <class java.clone="deep">
@@ -2077,50 +1562,6 @@
       </codeSegments>
 
     </class>
-    <class>
-      <name>Repository</name>
-      <version>3.0.0</version>
-      <description>
-        <![CDATA[
-        The <code>&lt;repository&gt;</code> element contains informations required to a repository
-        used by the project.
-        ]]>
-      </description>
-      <fields>
-        <field>
-          <name>connection</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The source control management system URL
-            that describes the repository and how to connect to the
-            repository. For more information, see the
-            <a href="https://maven.apache.org/scm/scm-url-format.html">URL format</a>
-            and <a href="https://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>.
-            This connection is read-only.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>developerConnection</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            Just like <code>connection</code>, but for developers, i.e. this scm connection
-            will not be read only.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>url</name>
-          <version>3.0.0</version>
-          <description>The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.</description>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
     <class java.clone="deep">
       <name>Scm</name>
       <version>4.0.0+</version>
@@ -2299,114 +1740,6 @@
         </codeSegment>
       </codeSegments>
     </class>
-    <class>
-      <name>SourceModification</name>
-      <description>This element describes all of the source modifications associated with a project.
-        These modifications are used to exclude or include various source depending on the
-        environment the build is running in.</description>
-      <version>3.0.0</version>
-      <superClass>FileSet</superClass>
-      <fields>
-        <field>
-          <name>className</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            If the class with this name can <b>not</b> be
-            loaded, then the includes and excludes specified below
-            will be applied to the contents of the <code>sourceDirectory</code>.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>property</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            If the property with this name is <b>not</b> set,
-            then the includes and excludes specified below
-            will be applied to the contents of the <code>sourceDirectory</code>.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
-    <class>
-      <name>UnitTest</name>
-      <version>3.0.0</version>
-      <superClass>PatternSet</superClass>
-      <description>A PatternSet for unit tests.</description>
-      <fields>
-        <field>
-          <name>resources</name>
-          <version>3.0.0</version>
-          <description>The classpath resources to use when executing the unit tests.</description>
-          <association>
-            <type>Resource</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-    <class>
-      <name>Version</name>
-      <version>3.0.0</version>
-      <description>
-        <![CDATA[
-        This element describes each of the previous versions of the
-        project. Each version is described by a <code>version</code>
-        element
-        ]]>
-      </description>
-      <fields>
-        <field>
-          <name>name</name>
-          <version>3.0.0</version>
-          <description>
-            <![CDATA[
-            The external version number under which this release was distributed. Examples include:
-            <code>1.0</code>,
-            <code>1.1-alpha1</code>,
-            <code>1.2-beta</code>,
-            <code>1.3.2</code> etc.
-            ]]>
-          </description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>tag</name>
-          <version>3.0.0</version>
-          <description>The name given in the SCM (e.g. CVS) used by the project for the source code
-            associated with this version of the project.</description>
-          <type>String</type>
-        </field>
-        <field>
-          <name>id</name>
-          <version>3.0.0</version>
-          <description>A unique identifier for a version. This is usually identical to the name.</description>
-          <type>String</type>
-        </field>
-      </fields>
-      <codeSegments>
-        <codeSegment>
-          <version>3.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString()
-    {
-        return getId();
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
-    </class>
-
     <class java.clone="deep">
       <name>RepositoryBase</name>
       <version>4.0.0+</version>


[21/49] maven git commit: Add the serverId to scm-publish so that we do not need to rely on cached svn credentials

Posted by hb...@apache.org.
Add the serverId to scm-publish so that we do not need to rely on cached svn credentials


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/69c512a8
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/69c512a8
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/69c512a8

Branch: refs/heads/MNG-6255
Commit: 69c512a8203030f3fee657673b0416bc2a121eae
Parents: 3d0efa3
Author: Stephen Connolly <st...@gmail.com>
Authored: Wed Oct 18 09:54:02 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Wed Oct 18 09:54:02 2017 +0100

----------------------------------------------------------------------
 pom.xml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/69c512a8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6649634..a572e4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -508,6 +508,9 @@ under the License.
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-scm-publish-plugin</artifactId>
           <version>1.1</version>
+          <configuration>
+            <serverId>apache.releases.https</serverId>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.rat</groupId>


[23/49] maven git commit: logging the module count to let the user identify how many module are still to be executed/processed

Posted by hb...@apache.org.
logging the module count to let the user identify how many module are still to be executed/processed


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4d49d3b0
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4d49d3b0
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4d49d3b0

Branch: refs/heads/MNG-6255
Commit: 4d49d3b05b2e3d3a4530bb27e8cc162ab50baa7c
Parents: 5919b74
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Thu Nov 9 09:30:47 2017 +0100
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Thu Nov 9 09:30:47 2017 +0100

----------------------------------------------------------------------
 .../maven/cli/event/ExecutionEventLogger.java   | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4d49d3b0/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 2a089df..6cab49f 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -23,6 +23,8 @@ import static org.apache.maven.cli.CLIReportingUtils.formatDuration;
 import static org.apache.maven.cli.CLIReportingUtils.formatTimestamp;
 import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
 
+import java.util.List;
+
 import org.apache.commons.lang3.Validate;
 import org.apache.maven.execution.AbstractExecutionListener;
 import org.apache.maven.execution.BuildFailure;
@@ -53,6 +55,9 @@ public class ExecutionEventLogger
     private static final int MAX_PADDED_BUILD_TIME_DURATION_LENGTH = 9;
     private static final int MAX_PROJECT_NAME_LENGTH = 52;
 
+    private int totalProjects;
+    private volatile int currentVisitedProjectCount;
+
     public ExecutionEventLogger()
     {
         logger = LoggerFactory.getLogger( ExecutionEventLogger.class );
@@ -106,10 +111,13 @@ public class ExecutionEventLogger
 
             logger.info( "" );
 
-            for ( MavenProject project : event.getSession().getProjects() )
+            final List<MavenProject> projects = event.getSession().getProjects();
+            for ( MavenProject project : projects )
             {
                 logger.info( project.getName() );
             }
+
+            totalProjects = projects.size();
         }
     }
 
@@ -259,6 +267,16 @@ public class ExecutionEventLogger
             infoMain( "Building " + event.getProject().getName() + " " + event.getProject().getVersion() );
 
             infoLine( '-' );
+
+            if ( totalProjects > 1 )
+            {
+                int number;
+                synchronized ( this )
+                {
+                    number = ++currentVisitedProjectCount;
+                }
+                infoMain( "Module " + number + "/" + totalProjects );
+            } // else what's the point
         }
     }
 


[40/49] maven git commit: [MNG-6308] added unit test for "Building" message

Posted by hb...@apache.org.
[MNG-6308] added unit test for "Building" message

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/98d2e197
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/98d2e197
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/98d2e197

Branch: refs/heads/MNG-6255
Commit: 98d2e197d111d4863d1e420a9f9c1548690bc7e1
Parents: 68a9d79
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat Jan 6 22:07:17 2018 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Sat Jan 6 22:40:29 2018 +0100

----------------------------------------------------------------------
 maven-embedder/pom.xml                          |  4 +
 .../cli/event/ExecutionEventLoggerTest.java     | 78 ++++++++++++++++++++
 2 files changed, 82 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/98d2e197/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index d6576f9..cfc126f 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -139,6 +139,10 @@ under the License.
       <artifactId>commons-lang3</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.fusesource.jansi</groupId>
       <artifactId>jansi</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/maven/blob/98d2e197/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
new file mode 100644
index 0000000..515f9fe
--- /dev/null
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
@@ -0,0 +1,78 @@
+package org.apache.maven.cli.event;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.apache.maven.execution.ExecutionEvent;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.utils.logging.MessageUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.InOrder;
+import org.slf4j.Logger;
+
+public class ExecutionEventLoggerTest
+{
+    private ExecutionEventLogger executionEventLogger;
+
+    @BeforeClass
+    public static void setUp() 
+    {
+        MessageUtils.setColorEnabled( false );
+    }
+
+    @AfterClass
+    public static void tearDown()
+    {
+        MessageUtils.setColorEnabled( true );
+    }
+
+    @Test
+    public void testProjectStarted()
+    {
+        // prepare
+        Logger logger = mock( Logger.class );
+        when( logger.isInfoEnabled() ).thenReturn( true );
+        executionEventLogger = new ExecutionEventLogger( logger );
+
+        ExecutionEvent event = mock( ExecutionEvent.class );
+        MavenProject project = mock( MavenProject.class );
+        when( project.getGroupId() ).thenReturn( "org.apache.maven" );
+        when( project.getArtifactId() ).thenReturn( "maven-embedder" );
+        when( project.getPackaging() ).thenReturn( "jar" );
+        when( project.getName() ).thenReturn( "Apache Maven Embedder" );
+        when( project.getVersion() ).thenReturn( "3.5.4-SNAPSHOT" );
+        when( event.getProject() ).thenReturn( project );
+
+        // execute
+        executionEventLogger.projectStarted( event );
+
+        // verify
+        InOrder inOrder = inOrder( logger );
+        inOrder.verify( logger ).info( "" );
+        inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
+        inOrder.verify( logger ).info( "Building Apache Maven Embedder 3.5.4-SNAPSHOT" );
+        inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
+    }
+}


[24/49] maven git commit: [MNG-6302] display progress at end of "Building" line

Posted by hb...@apache.org.
[MNG-6302] display progress at end of "Building" line

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/f5f76c70
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/f5f76c70
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/f5f76c70

Branch: refs/heads/MNG-6255
Commit: f5f76c70e1828a7e6c6267fc4bc53abc35c19ce7
Parents: 4d49d3b
Author: Hervé Boutemy <hb...@apache.org>
Authored: Wed Nov 15 03:54:15 2017 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Wed Nov 15 03:54:15 2017 +0100

----------------------------------------------------------------------
 .../maven/cli/event/ExecutionEventLogger.java    | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f5f76c70/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 6cab49f..513d56a 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -264,19 +264,28 @@ public class ExecutionEventLogger
             logger.info( "" );
             infoLine( '-' );
 
-            infoMain( "Building " + event.getProject().getName() + " " + event.getProject().getVersion() );
+            String building = "Building " + event.getProject().getName() + " " + event.getProject().getVersion();
 
-            infoLine( '-' );
-
-            if ( totalProjects > 1 )
+            if ( totalProjects <= 1 )
+            {
+                infoMain( building );
+            }
+            else
             {
+                // display progress [i/n]
                 int number;
                 synchronized ( this )
                 {
                     number = ++currentVisitedProjectCount;
                 }
-                infoMain( "Module " + number + "/" + totalProjects );
+                String progress = " [" + number + '/' + totalProjects + ']';
+
+                int pad = LINE_LENGTH - building.length() - progress.length();
+
+                infoMain( building + ( ( pad > 0 ) ? chars( ' ', pad ) : "" ) + progress );
             } // else what's the point
+
+            infoLine( '-' );
         }
     }
 


[36/49] maven git commit: [MNG-6305] Validation of CI friendly version incorrect o Followup removed unused declarations.

Posted by hb...@apache.org.
[MNG-6305] Validation of CI friendly version incorrect
 o Followup removed unused declarations.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/6b83f7e6
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6b83f7e6
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6b83f7e6

Branch: refs/heads/MNG-6255
Commit: 6b83f7e6bb38cf49c43251c0d84bcae61800fd1a
Parents: 2295c17
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sat Dec 30 22:09:02 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sat Dec 30 22:09:02 2017 +0100

----------------------------------------------------------------------
 .../interpolation/AbstractStringBasedModelInterpolator.java    | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6b83f7e6/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
index 09b53e4..ae8a35e 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
@@ -62,12 +62,6 @@ public abstract class AbstractStringBasedModelInterpolator
 
     public static final String REVISION_PROPERTY = "revision";
     
-    public static final String SHA1_PROPERTY_EXPRESSION = "${" + SHA1_PROPERTY + "}";
-
-    public static final String CHANGELIST_PROPERTY_EXPRESSION = "${" + CHANGELIST_PROPERTY + "}";
-
-    public static final String REVISION_PROPERTY_EXPRESSION = "${" + REVISION_PROPERTY + "}";
-
     private static final List<String> PROJECT_PREFIXES = Arrays.asList( "pom.", "project." );
 
     private static final Collection<String> TRANSLATED_PATH_EXPRESSIONS;


[33/49] maven git commit: [MNG-6300] Multi module release creates empty directories in war file instead of jars

Posted by hb...@apache.org.
[MNG-6300] Multi module release creates empty directories in war file instead of jars


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/98af937b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/98af937b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/98af937b

Branch: refs/heads/MNG-6255
Commit: 98af937bc6298e82e489b5f0cd3fb0a1c3d37109
Parents: eee06f7
Author: rfscholte <rf...@apache.org>
Authored: Fri Dec 22 14:25:46 2017 +0100
Committer: rfscholte <rf...@apache.org>
Committed: Fri Dec 22 14:25:46 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/RepositoryUtils.java  |  69 +++++
 .../internal/LifecycleDependencyResolver.java   |  36 ++-
 .../org/apache/maven/plugin/CacheUtils.java     |  68 -----
 .../plugin/DefaultPluginArtifactsCache.java     |  32 +--
 .../plugin/DefaultPluginDescriptorCache.java    |   7 +-
 .../maven/plugin/DefaultPluginRealmCache.java   |  36 ++-
 .../plugin/DefaultProjectArtifactsCache.java    | 256 -------------------
 .../maven/plugin/ProjectArtifactsCache.java     |  90 -------
 .../artifact/DefaultProjectArtifactsCache.java  | 246 ++++++++++++++++++
 .../project/artifact/ProjectArtifactsCache.java |  90 +++++++
 .../AbstractCoreMavenComponentTestCase.java     |  30 ++-
 .../LifecycleDependencyResolverTest.java        |  90 +++++++
 .../lifecycle-dependency-resolver/lib/pom.xml   |  32 +++
 .../lifecycle-dependency-resolver/pom.xml       |  58 +++++
 .../lifecycle-dependency-resolver/war/pom.xml   |  53 ++++
 15 files changed, 723 insertions(+), 470 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
index 52442b7..00f1327 100644
--- a/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
+++ b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java
@@ -22,14 +22,17 @@ package org.apache.maven;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.DefaultArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
+import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.artifact.Artifact;
 import org.eclipse.aether.artifact.ArtifactProperties;
 import org.eclipse.aether.artifact.ArtifactType;
@@ -44,6 +47,8 @@ import org.eclipse.aether.repository.Authentication;
 import org.eclipse.aether.repository.Proxy;
 import org.eclipse.aether.repository.RemoteRepository;
 import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.repository.WorkspaceRepository;
 import org.eclipse.aether.util.repository.AuthenticationBuilder;
 
 /**
@@ -364,4 +369,68 @@ public class RepositoryUtils
         }
         return artifacts;
     }
+
+    public static WorkspaceRepository getWorkspace( RepositorySystemSession session )
+    {
+        WorkspaceReader reader = session.getWorkspaceReader();
+        return ( reader != null ) ? reader.getRepository() : null;
+    }
+
+    public static boolean repositoriesEquals( List<RemoteRepository> r1, List<RemoteRepository> r2 )
+    {
+        if ( r1.size() != r2.size() )
+        {
+            return false;
+        }
+    
+        for ( Iterator<RemoteRepository> it1 = r1.iterator(), it2 = r2.iterator(); it1.hasNext(); )
+        {
+            if ( !repositoryEquals( it1.next(), it2.next() ) )
+            {
+                return false;
+            }
+        }
+    
+        return true;
+    }
+
+    public static int repositoriesHashCode( List<RemoteRepository> repositories )
+    {
+        int result = 17;
+        for ( RemoteRepository repository : repositories )
+        {
+            result = 31 * result + repositoryHashCode( repository );
+        }
+        return result;
+    }
+
+    private static int repositoryHashCode( RemoteRepository repository )
+    {
+        int result = 17;
+        Object obj = repository.getUrl();
+        result = 31 * result + ( obj != null ? obj.hashCode() : 0 );
+        return result;
+    }
+
+    private static boolean policyEquals( RepositoryPolicy p1, RepositoryPolicy p2 )
+    {
+        if ( p1 == p2 )
+        {
+            return true;
+        }
+        // update policy doesn't affect contents
+        return p1.isEnabled() == p2.isEnabled() && Objects.equals( p1.getChecksumPolicy(), p2.getChecksumPolicy() );
+    }
+
+    private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 )
+    {
+        if ( r1 == r2 )
+        {
+            return true;
+        }
+    
+        return Objects.equals( r1.getId(), r2.getId() ) && Objects.equals( r1.getUrl(), r2.getUrl() )
+            && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) )
+            && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) );
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
index 504274f..f7636ef 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
@@ -19,6 +19,8 @@ package org.apache.maven.lifecycle.internal;
  * under the License.
  */
 
+import java.io.File;
+
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -37,13 +39,13 @@ import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.eventspy.internal.EventSpyDispatcher;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.lifecycle.LifecycleExecutionException;
-import org.apache.maven.plugin.ProjectArtifactsCache;
 import org.apache.maven.project.DefaultDependencyResolutionRequest;
 import org.apache.maven.project.DependencyResolutionException;
 import org.apache.maven.project.DependencyResolutionResult;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectDependenciesResolver;
 import org.apache.maven.project.artifact.InvalidDependencyVersionException;
+import org.apache.maven.project.artifact.ProjectArtifactsCache;
 import org.codehaus.plexus.logging.Logger;
 import org.eclipse.aether.graph.Dependency;
 import org.eclipse.aether.graph.DependencyFilter;
@@ -128,7 +130,7 @@ public class LifecycleDependencyResolver
                 }
             }
             
-            Set<Artifact> artifacts;
+            Set<Artifact> resolvedArtifacts;
             ProjectArtifactsCache.Key cacheKey = projectArtifactsCache.createKey( project,  scopesToCollect, 
                 scopesToResolve, aggregating, session.getRepositorySession() );
             ProjectArtifactsCache.CacheRecord recordArtifacts;
@@ -136,15 +138,15 @@ public class LifecycleDependencyResolver
             
             if ( recordArtifacts != null )
             {
-                artifacts = recordArtifacts.artifacts;
+                resolvedArtifacts = recordArtifacts.artifacts;
             }
             else
             {
                 try
                 {
-                    artifacts = getDependencies( project, scopesToCollect, scopesToResolve, session, aggregating, 
-                        projectArtifacts );
-                    recordArtifacts = projectArtifactsCache.put( cacheKey, artifacts );
+                    resolvedArtifacts = getDependencies( project, scopesToCollect, scopesToResolve, session,
+                                                         aggregating, projectArtifacts );
+                    recordArtifacts = projectArtifactsCache.put( cacheKey, resolvedArtifacts );
                 }
                 catch ( LifecycleExecutionException e )
                 {
@@ -155,13 +157,31 @@ public class LifecycleDependencyResolver
             }
             projectArtifactsCache.register( project, cacheKey, recordArtifacts );
 
-            project.setResolvedArtifacts( artifacts );
+            Map<Artifact, File> reactorProjects = new HashMap<>( session.getProjects().size() );
+            for ( MavenProject reactorProject : session.getProjects() )
+            {
+                reactorProjects.put( reactorProject.getArtifact(), reactorProject.getArtifact().getFile() );
+            }
 
             Map<String, Artifact> map = new HashMap<>();
-            for ( Artifact artifact : artifacts )
+            for ( Artifact artifact : resolvedArtifacts )
             {
+                /**
+                 * 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.
+                 * This clearly shows that target/classes should not be abused as artifactFile just for the classpath
+                 */
+                File reactorProjectFile = reactorProjects.get( artifact );
+                if ( reactorProjectFile != null )
+                {
+                    artifact.setFile( reactorProjectFile );
+                }
+
                 map.put( artifact.getDependencyConflictId(), artifact );
             }
+            
+            project.setResolvedArtifacts( resolvedArtifacts );
+            
             for ( Artifact artifact : project.getDependencyArtifacts() )
             {
                 if ( artifact.getFile() == null )

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
index a73e1ef..7196ce9 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
@@ -25,11 +25,6 @@ import java.util.List;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Exclusion;
 import org.apache.maven.model.Plugin;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.repository.RemoteRepository;
-import org.eclipse.aether.repository.RepositoryPolicy;
-import org.eclipse.aether.repository.WorkspaceReader;
-import org.eclipse.aether.repository.WorkspaceRepository;
 
 /**
  * @author Benjamin Bentmann
@@ -47,63 +42,6 @@ class CacheUtils
         return obj != null ? obj.hashCode() : 0;
     }
 
-    public static int repositoriesHashCode( List<RemoteRepository> repositories )
-    {
-        int result = 17;
-        for ( RemoteRepository repository : repositories )
-        {
-            result = 31 * result + repositoryHashCode( repository );
-        }
-        return result;
-    }
-
-    private static int repositoryHashCode( RemoteRepository repository )
-    {
-        int result = 17;
-        result = 31 * result + hash( repository.getUrl() );
-        return result;
-    }
-
-    private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 )
-    {
-        if ( r1 == r2 )
-        {
-            return true;
-        }
-
-        return eq( r1.getId(), r2.getId() ) && eq( r1.getUrl(), r2.getUrl() )
-            && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) )
-            && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) );
-    }
-
-    private static boolean policyEquals( RepositoryPolicy p1, RepositoryPolicy p2 )
-    {
-        if ( p1 == p2 )
-        {
-            return true;
-        }
-        // update policy doesn't affect contents
-        return p1.isEnabled() == p2.isEnabled() && eq( p1.getChecksumPolicy(), p2.getChecksumPolicy() );
-    }
-
-    public static boolean repositoriesEquals( List<RemoteRepository> r1, List<RemoteRepository> r2 )
-    {
-        if ( r1.size() != r2.size() )
-        {
-            return false;
-        }
-
-        for ( Iterator<RemoteRepository> it1 = r1.iterator(), it2 = r2.iterator(); it1.hasNext(); )
-        {
-            if ( !repositoryEquals( it1.next(), it2.next() ) )
-            {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
     public static int pluginHashCode( Plugin plugin )
     {
         int hash = 17;
@@ -202,10 +140,4 @@ class CacheUtils
         return true;
     }
 
-    public static WorkspaceRepository getWorkspace( RepositorySystemSession session )
-    {
-        WorkspaceReader reader = session.getWorkspaceReader();
-        return ( reader != null ) ? reader.getRepository() : null;
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
index 6a08681..b49e25e 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java
@@ -23,9 +23,11 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.commons.lang3.Validate;
+import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
@@ -48,7 +50,6 @@ public class DefaultPluginArtifactsCache
     protected static class CacheKey
         implements Key
     {
-
         private final Plugin plugin;
 
         private final WorkspaceRepository workspace;
@@ -65,7 +66,7 @@ public class DefaultPluginArtifactsCache
                          RepositorySystemSession session )
         {
             this.plugin = plugin.clone();
-            workspace = CacheUtils.getWorkspace( session );
+            workspace = RepositoryUtils.getWorkspace( session );
             this.localRepo = session.getLocalRepository();
             this.repositories = new ArrayList<>( repositories.size() );
             for ( RemoteRepository repository : repositories )
@@ -83,10 +84,10 @@ public class DefaultPluginArtifactsCache
 
             int hash = 17;
             hash = hash * 31 + CacheUtils.pluginHashCode( plugin );
-            hash = hash * 31 + hash( workspace );
-            hash = hash * 31 + hash( localRepo );
-            hash = hash * 31 + CacheUtils.repositoriesHashCode( repositories );
-            hash = hash * 31 + hash( extensionFilter );
+            hash = hash * 31 + Objects.hashCode( workspace );
+            hash = hash * 31 + Objects.hashCode( localRepo );
+            hash = hash * 31 + RepositoryUtils.repositoriesHashCode( repositories );
+            hash = hash * 31 + Objects.hashCode( extensionFilter );
             this.hashCode = hash;
         }
 
@@ -102,11 +103,6 @@ public class DefaultPluginArtifactsCache
             return hashCode;
         }
 
-        private static int hash( Object obj )
-        {
-            return obj != null ? obj.hashCode() : 0;
-        }
-
         @Override
         public boolean equals( Object o )
         {
@@ -122,16 +118,12 @@ public class DefaultPluginArtifactsCache
 
             CacheKey that = (CacheKey) o;
 
-            return CacheUtils.pluginEquals( plugin, that.plugin ) && eq( workspace, that.workspace )
-                && eq( localRepo, that.localRepo ) && CacheUtils.repositoriesEquals( repositories, that.repositories )
-                && eq( filter, that.filter );
+            return CacheUtils.pluginEquals( plugin, that.plugin ) 
+                && Objects.equals( workspace, that.workspace )
+                && Objects.equals( localRepo, that.localRepo ) 
+                && RepositoryUtils.repositoriesEquals( repositories, that.repositories )
+                && Objects.equals( filter, that.filter );
         }
-
-        private static <T> boolean eq( T s1, T s2 )
-        {
-            return s1 != null ? s1.equals( s2 ) : s2 == null;
-        }
-
     }
 
     protected final Map<Key, CacheRecord> cache = new ConcurrentHashMap<>();

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
index 5968332..32228ba 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
@@ -146,7 +147,7 @@ public class DefaultPluginDescriptorCache
             artifactId = plugin.getArtifactId();
             version = plugin.getVersion();
 
-            workspace = CacheUtils.getWorkspace( session );
+            workspace = RepositoryUtils.getWorkspace( session );
             localRepo = session.getLocalRepository();
             this.repositories = new ArrayList<>( repositories.size() );
             for ( RemoteRepository repository : repositories )
@@ -167,7 +168,7 @@ public class DefaultPluginDescriptorCache
             hash = hash * 31 + version.hashCode();
             hash = hash * 31 + hash( workspace );
             hash = hash * 31 + localRepo.hashCode();
-            hash = hash * 31 + CacheUtils.repositoriesHashCode( repositories );
+            hash = hash * 31 + RepositoryUtils.repositoriesHashCode( repositories );
             this.hashCode = hash;
         }
 
@@ -195,7 +196,7 @@ public class DefaultPluginDescriptorCache
             return eq( this.artifactId, that.artifactId ) && eq( this.groupId, that.groupId )
                 && eq( this.version, that.version ) && eq( this.localRepo, that.localRepo )
                 && eq( this.workspace, that.workspace )
-                && CacheUtils.repositoriesEquals( this.repositories, that.repositories );
+                && RepositoryUtils.repositoriesEquals( this.repositories, that.repositories );
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
index 0a6da8d..1c09d9b 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
@@ -23,9 +23,11 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.commons.lang3.Validate;
+import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
@@ -72,7 +74,7 @@ public class DefaultPluginRealmCache
                          RepositorySystemSession session )
         {
             this.plugin = plugin.clone();
-            this.workspace = CacheUtils.getWorkspace( session );
+            this.workspace = RepositoryUtils.getWorkspace( session );
             this.localRepo = session.getLocalRepository();
             this.repositories = new ArrayList<>( repositories.size() );
             for ( RemoteRepository repository : repositories )
@@ -93,12 +95,12 @@ public class DefaultPluginRealmCache
 
             int hash = 17;
             hash = hash * 31 + CacheUtils.pluginHashCode( plugin );
-            hash = hash * 31 + hash( workspace );
-            hash = hash * 31 + hash( localRepo );
-            hash = hash * 31 + CacheUtils.repositoriesHashCode( repositories );
-            hash = hash * 31 + hash( parentRealm );
+            hash = hash * 31 + Objects.hashCode( workspace );
+            hash = hash * 31 + Objects.hashCode( localRepo );
+            hash = hash * 31 + RepositoryUtils.repositoriesHashCode( repositories );
+            hash = hash * 31 + Objects.hashCode( parentRealm );
             hash = hash * 31 + this.foreignImports.hashCode();
-            hash = hash * 31 + hash( dependencyFilter );
+            hash = hash * 31 + Objects.hashCode( dependencyFilter );
             this.hashCode = hash;
         }
 
@@ -114,11 +116,6 @@ public class DefaultPluginRealmCache
             return hashCode;
         }
 
-        private static int hash( Object obj )
-        {
-            return obj != null ? obj.hashCode() : 0;
-        }
-
         @Override
         public boolean equals( Object o )
         {
@@ -134,17 +131,14 @@ public class DefaultPluginRealmCache
 
             CacheKey that = (CacheKey) o;
 
-            return parentRealm == that.parentRealm && CacheUtils.pluginEquals( plugin, that.plugin )
-                && eq( workspace, that.workspace ) && eq( localRepo, that.localRepo )
-                && CacheUtils.repositoriesEquals( this.repositories, that.repositories ) && eq( filter, that.filter )
-                && eq( foreignImports, that.foreignImports );
+            return parentRealm == that.parentRealm 
+                && CacheUtils.pluginEquals( plugin, that.plugin )
+                && Objects.equals( workspace, that.workspace ) 
+                && Objects.equals( localRepo, that.localRepo )
+                && RepositoryUtils.repositoriesEquals( this.repositories, that.repositories ) 
+                && Objects.equals( filter, that.filter )
+                && Objects.equals( foreignImports, that.foreignImports );
         }
-
-        private static <T> boolean eq( T s1, T s2 )
-        {
-            return s1 != null ? s1.equals( s2 ) : s2 == null;
-        }
-
     }
 
     protected final Map<Key, CacheRecord> cache = new ConcurrentHashMap<>();

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/plugin/DefaultProjectArtifactsCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultProjectArtifactsCache.java
deleted file mode 100644
index 1eaa627..0000000
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultProjectArtifactsCache.java
+++ /dev/null
@@ -1,256 +0,0 @@
-package org.apache.maven.plugin;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.lifecycle.LifecycleExecutionException;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.component.annotations.Component;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.repository.LocalRepository;
-import org.eclipse.aether.repository.RemoteRepository;
-import org.eclipse.aether.repository.WorkspaceRepository;
-
-/**
- * @author Igor Fedorenko
- * @author Benjamin Bentmann
- * @author Anton Tanasenko
- */
-@Component( role = ProjectArtifactsCache.class )
-public class DefaultProjectArtifactsCache
-    implements ProjectArtifactsCache
-{
-
-    protected static class CacheKey
-        implements Key
-    {
-
-        private final String groupId;
-        
-        private final String artifactId;
-        
-        private final String version;
-        
-        private final Set<String> dependencyArtifacts;
-
-        private final WorkspaceRepository workspace;
-
-        private final LocalRepository localRepo;
-
-        private final List<RemoteRepository> repositories;
-        
-        private final Set<String> collect;
-        
-        private final Set<String> resolve;
-        
-        private boolean aggregating;
-
-        private final int hashCode;
-
-        public CacheKey( MavenProject project, List<RemoteRepository> repositories,
-            Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating,
-            RepositorySystemSession session )
-        {
-            
-            groupId = project.getGroupId();
-            artifactId = project.getArtifactId();
-            version = project.getVersion();
-            
-            Set<String> deps = new HashSet<>();
-            if ( project.getDependencyArtifacts() != null )
-            {
-              for ( Artifact dep: project.getDependencyArtifacts() )
-              {
-                deps.add( dep.toString() );
-              }
-            }
-            dependencyArtifacts = Collections.unmodifiableSet( deps );
-            
-            workspace = CacheUtils.getWorkspace( session );
-            this.localRepo = session.getLocalRepository();
-            this.repositories = new ArrayList<>( repositories.size() );
-            for ( RemoteRepository repository : repositories )
-            {
-                if ( repository.isRepositoryManager() )
-                {
-                    this.repositories.addAll( repository.getMirroredRepositories() );
-                }
-                else
-                {
-                    this.repositories.add( repository );
-                }
-            }
-            collect = scopesToCollect == null
-                ? Collections.<String>emptySet() 
-                : Collections.unmodifiableSet( new HashSet<>( scopesToCollect ) );
-            resolve = scopesToResolve == null 
-                ? Collections.<String>emptySet() 
-                : Collections.unmodifiableSet( new HashSet<>( scopesToResolve ) );
-            this.aggregating = aggregating;
-
-            int hash = 17;
-            hash = hash * 31 + hash( groupId );
-            hash = hash * 31 + hash( artifactId );
-            hash = hash * 31 + hash( version );
-            hash = hash * 31 + hash( dependencyArtifacts );
-            hash = hash * 31 + hash( workspace );
-            hash = hash * 31 + hash( localRepo );
-            hash = hash * 31 + CacheUtils.repositoriesHashCode( repositories );
-            hash = hash * 31 + hash( collect );
-            hash = hash * 31 + hash( resolve );
-            hash = hash * 31 + hash( aggregating );
-            this.hashCode = hash;
-        }
-
-        @Override
-        public String toString()
-        {
-            return groupId + ":" + artifactId + ":" + version;
-        }
-
-        @Override
-        public int hashCode()
-        {
-            return hashCode;
-        }
-
-        private static int hash( Object obj )
-        {
-            return obj != null ? obj.hashCode() : 0;
-        }
-
-        @Override
-        public boolean equals( Object o )
-        {
-            if ( o == this )
-            {
-                return true;
-            }
-
-            if ( !( o instanceof CacheKey ) )
-            {
-                return false;
-            }
-
-            CacheKey that = (CacheKey) o;
-
-            return eq( groupId, that.groupId ) && eq( artifactId, that.artifactId ) && eq( version, that.version ) 
-                && eq( dependencyArtifacts, that.dependencyArtifacts )
-                && eq( workspace, that.workspace ) && eq( localRepo, that.localRepo ) 
-                && CacheUtils.repositoriesEquals( repositories, that.repositories ) && eq( collect, that.collect ) 
-                && eq( resolve, that.resolve ) && aggregating == that.aggregating;
-        }
-
-        private static <T> boolean eq( T s1, T s2 )
-        {
-            return s1 != null ? s1.equals( s2 ) : s2 == null;
-        }
-
-    }
-
-    protected final Map<Key, CacheRecord> cache = new ConcurrentHashMap<>();
-
-    public Key createKey( MavenProject project, Collection<String> scopesToCollect,
-        Collection<String> scopesToResolve, boolean aggregating, RepositorySystemSession session )
-    {
-        return new CacheKey( project, project.getRemoteProjectRepositories(), scopesToCollect, scopesToResolve, 
-            aggregating, session );
-    }
-
-    public CacheRecord get( Key key )
-        throws LifecycleExecutionException
-    {
-        CacheRecord cacheRecord = cache.get( key );
-
-        if ( cacheRecord != null && cacheRecord.exception != null )
-        {
-            throw cacheRecord.exception;
-        }
-
-        return cacheRecord;
-    }
-
-    public CacheRecord put( Key key, Set<Artifact> projectArtifacts )
-    {
-        Validate.notNull( projectArtifacts, "projectArtifacts cannot be null" );
-
-        assertUniqueKey( key );
-
-        CacheRecord record =
-            new CacheRecord( Collections.unmodifiableSet( new HashSet<>( projectArtifacts ) ) );
-
-        cache.put( key, record );
-
-        return record;
-    }
-
-    protected void assertUniqueKey( Key key )
-    {
-        if ( cache.containsKey( key ) )
-        {
-            throw new IllegalStateException( "Duplicate artifact resolution result for project " + key );
-        }
-    }
-
-    public CacheRecord put( Key key, LifecycleExecutionException exception )
-    {
-        Validate.notNull( exception, "exception cannot be null" );
-
-        assertUniqueKey( key );
-
-        CacheRecord record = new CacheRecord( exception );
-
-        cache.put( key, record );
-
-        return record;
-    }
-
-    public void flush()
-    {
-        cache.clear();
-    }
-
-    protected static int pluginHashCode( Plugin plugin )
-    {
-        return CacheUtils.pluginHashCode( plugin );
-    }
-
-    protected static boolean pluginEquals( Plugin a, Plugin b )
-    {
-        return CacheUtils.pluginEquals( a, b );
-    }
-
-    public void register( MavenProject project, Key cacheKey, CacheRecord record )
-    {
-        // default cache does not track record usage
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/plugin/ProjectArtifactsCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/ProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/ProjectArtifactsCache.java
deleted file mode 100644
index 42a95e5..0000000
--- a/maven-core/src/main/java/org/apache/maven/plugin/ProjectArtifactsCache.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.apache.maven.plugin;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.lifecycle.LifecycleExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.eclipse.aether.RepositorySystemSession;
-/**
- * Caches project artifacts. <strong>Warning:</strong> This is an internal utility interface that is only public for
- * technical reasons, it is not part of the public API. In particular, this interface can be changed or deleted without
- * prior notice.
- *
- * @author Igor Fedorenko
- * @author Benjamin Bentmann
- * @author Anton Tanasenko
- */
-public interface ProjectArtifactsCache
-{
-
-    /**
-     * A cache key.
-     */
-    interface Key
-    {
-        // marker interface for cache keys
-    }
-
-    static class CacheRecord
-    {
-
-        public final Set<Artifact> artifacts;
-
-        public final LifecycleExecutionException exception;
-
-        public CacheRecord( Set<Artifact> artifacts )
-        {
-            this.artifacts = artifacts;
-            this.exception = null;
-        }
-
-        public CacheRecord( LifecycleExecutionException exception )
-        {
-            this.artifacts = null;
-            this.exception = exception;
-        }
-    }
-
-    Key createKey( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, 
-        boolean aggregating, RepositorySystemSession session );
-
-    CacheRecord get( Key key ) throws LifecycleExecutionException;
-
-    CacheRecord put( Key key, Set<Artifact> pluginArtifacts );
-
-    CacheRecord put( Key key, LifecycleExecutionException e );
-
-    void flush();
-
-    /**
-     * Registers the specified cache record for usage with the given project. Integrators can use the information
-     * collected from this method in combination with a custom cache implementation to dispose unused records from the
-     * cache.
-     *
-     * @param project The project that employs the plugin realm, must not be {@code null}.
-     * @param record The cache record being used for the project, must not be {@code null}.
-     */
-    void register( MavenProject project, Key cacheKey, CacheRecord record );
-
-}

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java
new file mode 100644
index 0000000..87d2e44
--- /dev/null
+++ b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java
@@ -0,0 +1,246 @@
+package org.apache.maven.project.artifact;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.commons.lang3.Validate;
+import org.apache.maven.RepositoryUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.lifecycle.LifecycleExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.component.annotations.Component;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepository;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.repository.WorkspaceRepository;
+
+/**
+ * @author Igor Fedorenko
+ * @author Benjamin Bentmann
+ * @author Anton Tanasenko
+ */
+@Component( role = ProjectArtifactsCache.class )
+public class DefaultProjectArtifactsCache
+    implements ProjectArtifactsCache
+{
+
+    protected static class CacheKey
+        implements Key
+    {
+
+        private final String groupId;
+        
+        private final String artifactId;
+        
+        private final String version;
+        
+        private final Set<String> dependencyArtifacts;
+
+        private final WorkspaceRepository workspace;
+
+        private final LocalRepository localRepo;
+
+        private final List<RemoteRepository> repositories;
+        
+        private final Set<String> collect;
+        
+        private final Set<String> resolve;
+        
+        private boolean aggregating;
+
+        private final int hashCode;
+
+        public CacheKey( MavenProject project, List<RemoteRepository> repositories,
+            Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating,
+            RepositorySystemSession session )
+        {
+            
+            groupId = project.getGroupId();
+            artifactId = project.getArtifactId();
+            version = project.getVersion();
+            
+            Set<String> deps = new HashSet<>();
+            if ( project.getDependencyArtifacts() != null )
+            {
+              for ( Artifact dep: project.getDependencyArtifacts() )
+              {
+                deps.add( dep.toString() );
+              }
+            }
+            dependencyArtifacts = Collections.unmodifiableSet( deps );
+            
+            workspace = RepositoryUtils.getWorkspace( session );
+            this.localRepo = session.getLocalRepository();
+            this.repositories = new ArrayList<>( repositories.size() );
+            for ( RemoteRepository repository : repositories )
+            {
+                if ( repository.isRepositoryManager() )
+                {
+                    this.repositories.addAll( repository.getMirroredRepositories() );
+                }
+                else
+                {
+                    this.repositories.add( repository );
+                }
+            }
+            collect = scopesToCollect == null
+                ? Collections.<String>emptySet() 
+                : Collections.unmodifiableSet( new HashSet<>( scopesToCollect ) );
+            resolve = scopesToResolve == null 
+                ? Collections.<String>emptySet() 
+                : Collections.unmodifiableSet( new HashSet<>( scopesToResolve ) );
+            this.aggregating = aggregating;
+
+            int hash = 17;
+            hash = hash * 31 + Objects.hashCode( groupId );
+            hash = hash * 31 + Objects.hashCode( artifactId );
+            hash = hash * 31 + Objects.hashCode( version );
+            hash = hash * 31 + Objects.hashCode( dependencyArtifacts );
+            hash = hash * 31 + Objects.hashCode( workspace );
+            hash = hash * 31 + Objects.hashCode( localRepo );
+            hash = hash * 31 + RepositoryUtils.repositoriesHashCode( repositories );
+            hash = hash * 31 + Objects.hashCode( collect );
+            hash = hash * 31 + Objects.hashCode( resolve );
+            hash = hash * 31 + Objects.hashCode( aggregating );
+            this.hashCode = hash;
+        }
+
+        @Override
+        public String toString()
+        {
+            return groupId + ":" + artifactId + ":" + version;
+        }
+
+        @Override
+        public int hashCode()
+        {
+            return hashCode;
+        }
+
+        @Override
+        public boolean equals( Object o )
+        {
+            if ( o == this )
+            {
+                return true;
+            }
+
+            if ( !( o instanceof CacheKey ) )
+            {
+                return false;
+            }
+
+            CacheKey that = (CacheKey) o;
+
+            return Objects.equals( groupId, that.groupId ) && Objects.equals( artifactId, that.artifactId )
+                && Objects.equals( version, that.version )
+                && Objects.equals( dependencyArtifacts, that.dependencyArtifacts )
+                && Objects.equals( workspace, that.workspace ) 
+                && Objects.equals( localRepo, that.localRepo )
+                && RepositoryUtils.repositoriesEquals( repositories, that.repositories )
+                && Objects.equals( collect, that.collect ) 
+                && Objects.equals( resolve, that.resolve )
+                && aggregating == that.aggregating;
+        }
+    }
+
+    protected final Map<Key, CacheRecord> cache = new ConcurrentHashMap<>();
+
+    @Override
+    public Key createKey( MavenProject project, Collection<String> scopesToCollect,
+        Collection<String> scopesToResolve, boolean aggregating, RepositorySystemSession session )
+    {
+        return new CacheKey( project, project.getRemoteProjectRepositories(), scopesToCollect, scopesToResolve, 
+            aggregating, session );
+    }
+
+    @Override
+    public CacheRecord get( Key key )
+        throws LifecycleExecutionException
+    {
+        CacheRecord cacheRecord = cache.get( key );
+
+        if ( cacheRecord != null && cacheRecord.exception != null )
+        {
+            throw cacheRecord.exception;
+        }
+
+        return cacheRecord;
+    }
+
+    @Override
+    public CacheRecord put( Key key, Set<Artifact> projectArtifacts )
+    {
+        Validate.notNull( projectArtifacts, "projectArtifacts cannot be null" );
+
+        assertUniqueKey( key );
+
+        CacheRecord record =
+            new CacheRecord( Collections.unmodifiableSet( new HashSet<>( projectArtifacts ) ) );
+
+        cache.put( key, record );
+
+        return record;
+    }
+
+    protected void assertUniqueKey( Key key )
+    {
+        if ( cache.containsKey( key ) )
+        {
+            throw new IllegalStateException( "Duplicate artifact resolution result for project " + key );
+        }
+    }
+
+    @Override
+    public CacheRecord put( Key key, LifecycleExecutionException exception )
+    {
+        Validate.notNull( exception, "exception cannot be null" );
+
+        assertUniqueKey( key );
+
+        CacheRecord record = new CacheRecord( exception );
+
+        cache.put( key, record );
+
+        return record;
+    }
+
+    @Override
+    public void flush()
+    {
+        cache.clear();
+    }
+
+    @Override
+    public void register( MavenProject project, Key cacheKey, CacheRecord record )
+    {
+        // default cache does not track record usage
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java
new file mode 100644
index 0000000..ac093e9
--- /dev/null
+++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java
@@ -0,0 +1,90 @@
+package org.apache.maven.project.artifact;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.lifecycle.LifecycleExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.eclipse.aether.RepositorySystemSession;
+/**
+ * Caches project artifacts. <strong>Warning:</strong> This is an internal utility interface that is only public for
+ * technical reasons, it is not part of the public API. In particular, this interface can be changed or deleted without
+ * prior notice.
+ *
+ * @author Igor Fedorenko
+ * @author Benjamin Bentmann
+ * @author Anton Tanasenko
+ */
+public interface ProjectArtifactsCache
+{
+
+    /**
+     * A cache key.
+     */
+    interface Key
+    {
+        // marker interface for cache keys
+    }
+
+    static class CacheRecord
+    {
+
+        public final Set<Artifact> artifacts;
+
+        public final LifecycleExecutionException exception;
+
+        public CacheRecord( Set<Artifact> artifacts )
+        {
+            this.artifacts = artifacts;
+            this.exception = null;
+        }
+
+        public CacheRecord( LifecycleExecutionException exception )
+        {
+            this.artifacts = null;
+            this.exception = exception;
+        }
+    }
+
+    Key createKey( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, 
+        boolean aggregating, RepositorySystemSession session );
+
+    CacheRecord get( Key key ) throws LifecycleExecutionException;
+
+    CacheRecord put( Key key, Set<Artifact> pluginArtifacts );
+
+    CacheRecord put( Key key, LifecycleExecutionException e );
+
+    void flush();
+
+    /**
+     * Registers the specified cache record for usage with the given project. Integrators can use the information
+     * collected from this method in combination with a custom cache implementation to dispose unused records from the
+     * cache.
+     *
+     * @param project The project that employs the plugin realm, must not be {@code null}.
+     * @param record The cache record being used for the project, must not be {@code null}.
+     */
+    void register( MavenProject project, Key cacheKey, CacheRecord record );
+
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
index 157a5ec..315e152 100644
--- a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
+++ b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
@@ -20,6 +20,7 @@ package org.apache.maven;
  */
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Properties;
@@ -128,6 +129,12 @@ public abstract class AbstractCoreMavenComponentTestCase
     }
 
     protected MavenSession createMavenSession( File pom, Properties executionProperties )
+                    throws Exception
+    {
+        return createMavenSession( pom, executionProperties, false );
+    }
+    
+    protected MavenSession createMavenSession( File pom, Properties executionProperties, boolean includeModules )
         throws Exception
     {
         MavenExecutionRequest request = createMavenExecutionRequest( pom );
@@ -138,17 +145,32 @@ public abstract class AbstractCoreMavenComponentTestCase
             .setPluginArtifactRepositories( request.getPluginArtifactRepositories() )
             .setSystemProperties( executionProperties );
 
-        MavenProject project = null;
+        List<MavenProject> projects = new ArrayList<>();
 
         if ( pom != null )
         {
-            project = projectBuilder.build( pom, configuration ).getProject();
+            MavenProject project = projectBuilder.build( pom, configuration ).getProject();
+            
+            projects.add( project );
+            if ( includeModules )
+            {
+                for( String module : project.getModules() )
+                {
+                    File modulePom = new File( pom.getParentFile(), module );
+                    if( modulePom.isDirectory() )
+                    {
+                        modulePom = new File( modulePom, "pom.xml" );
+                    }
+                    projects.add( projectBuilder.build( modulePom, configuration ).getProject() );
+                }
+            }
         }
         else
         {
-            project = createStubMavenProject();
+            MavenProject project = createStubMavenProject();
             project.setRemoteArtifactRepositories( request.getRemoteRepositories() );
             project.setPluginArtifactRepositories( request.getPluginArtifactRepositories() );
+            projects.add( project );
         }
 
         initRepoSession( configuration );
@@ -156,7 +178,7 @@ public abstract class AbstractCoreMavenComponentTestCase
         MavenSession session =
             new MavenSession( getContainer(), configuration.getRepositorySession(), request,
                               new DefaultMavenExecutionResult() );
-        session.setProjects( Arrays.asList( project ) );
+        session.setProjects( projects );
         session.setAllProjects( session.getProjects() );
 
         return session;

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java
new file mode 100644
index 0000000..b38742a
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java
@@ -0,0 +1,90 @@
+package org.apache.maven.lifecycle.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.maven.AbstractCoreMavenComponentTestCase;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.component.annotations.Requirement;
+import org.junit.Test;
+
+public class LifecycleDependencyResolverTest extends AbstractCoreMavenComponentTestCase
+{
+    @Requirement
+    private LifecycleDependencyResolver resolver;
+
+    @Override
+    protected String getProjectsDirectory()
+    {
+        return null;
+    }
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        resolver = lookup( LifecycleDependencyResolver.class );
+    }
+
+    @Test
+    public void testCachedReactorProjectDependencies() throws Exception
+    {
+        MavenSession session = createMavenSession( new File( "src/test/projects/lifecycle-dependency-resolver/pom.xml" ), new Properties(), true );
+        Collection<String> scopesToCollect = null;
+        Collection<String> scopesToResolve = Collections.singletonList( "compile" );
+        boolean aggregating = false;
+
+        Set<Artifact> reactorArtifacts = new HashSet<>( 3 );
+        for ( MavenProject reactorProject : session.getProjects() )
+        {
+            reactorProject.setArtifactFilter( new ArtifactFilter()
+            {
+                @Override
+                public boolean include( Artifact artifact )
+                {
+                    return true;
+                }
+            } );
+            resolver.resolveProjectDependencies( reactorProject, scopesToCollect, scopesToResolve, session, aggregating, reactorArtifacts );
+            reactorArtifacts.add( reactorProject.getArtifact() );
+        }
+
+        MavenProject lib = session.getProjects().get( 1 );
+        MavenProject war = session.getProjects().get( 2 );
+
+        assertEquals( null , war.getArtifactMap().get("org.apache.maven.its.mng6300:mng6300-lib").getFile() );
+
+        lib.getArtifact().setFile( new File( "lib.jar" ) );
+
+        resolver.resolveProjectDependencies( war, scopesToCollect, scopesToResolve, session, aggregating, reactorArtifacts );
+
+        assertEquals( new File( "lib.jar" ) , war.getArtifactMap().get("org.apache.maven.its.mng6300:mng6300-lib").getFile() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/test/projects/lifecycle-dependency-resolver/lib/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/test/projects/lifecycle-dependency-resolver/lib/pom.xml b/maven-core/src/test/projects/lifecycle-dependency-resolver/lib/pom.xml
new file mode 100644
index 0000000..e020408
--- /dev/null
+++ b/maven-core/src/test/projects/lifecycle-dependency-resolver/lib/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng6300</groupId>
+    <artifactId>test</artifactId>
+    <version>1.0</version>
+  </parent>
+  <artifactId>mng6300-lib</artifactId>
+
+</project>

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/test/projects/lifecycle-dependency-resolver/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/test/projects/lifecycle-dependency-resolver/pom.xml b/maven-core/src/test/projects/lifecycle-dependency-resolver/pom.xml
new file mode 100644
index 0000000..8c7cfec
--- /dev/null
+++ b/maven-core/src/test/projects/lifecycle-dependency-resolver/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng6300</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-6300</name>
+  <description>
+    Check that war packages the jar instead of a directory
+  </description>
+  
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <reportSets>
+          <reportSet>
+            <reports>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+  
+  <modules>
+    <module>lib</module>
+    <module>war</module>
+  </modules>
+</project>

http://git-wip-us.apache.org/repos/asf/maven/blob/98af937b/maven-core/src/test/projects/lifecycle-dependency-resolver/war/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/test/projects/lifecycle-dependency-resolver/war/pom.xml b/maven-core/src/test/projects/lifecycle-dependency-resolver/war/pom.xml
new file mode 100644
index 0000000..e168833
--- /dev/null
+++ b/maven-core/src/test/projects/lifecycle-dependency-resolver/war/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng6300</groupId>
+    <artifactId>test</artifactId>
+    <version>1.0</version>
+  </parent>
+  <artifactId>mng6300-war</artifactId>
+  <packaging>war</packaging>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng6300</groupId>
+      <artifactId>mng6300-lib</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+
+</project>


[47/49] maven git commit: [MNG-6340] [Performance]To make System.gc() call configurable in target summary code o Just removed the System.gc() call.

Posted by hb...@apache.org.
[MNG-6340] [Performance]To make System.gc() call configurable in target
summary code
 o Just removed the System.gc() call.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/99e66229
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/99e66229
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/99e66229

Branch: refs/heads/MNG-6255
Commit: 99e66229aca82e12292d0e481d8e71158cc52ca4
Parents: 5988085
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sun Feb 4 11:27:33 2018 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sun Feb 4 11:27:33 2018 +0100

----------------------------------------------------------------------
 .../org/apache/maven/cli/event/ExecutionEventLogger.java     | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/99e66229/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 85760e6..d4171f7 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -233,14 +233,6 @@ public class ExecutionEventLogger
         logger.info( "Total time: " + formatDuration( time ) + wallClock );
 
         logger.info( "Finished at: " + formatTimestamp( finish ) );
-
-        System.gc();
-
-        Runtime r = Runtime.getRuntime();
-
-        long mb = 1024 * 1024;
-
-        logger.info( "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / mb + "M/" + r.totalMemory() / mb + "M" );
     }
 
     @Override


[38/49] maven git commit: [MNG-6332] Cleaned up mvn.cmd Script

Posted by hb...@apache.org.
[MNG-6332] Cleaned up mvn.cmd Script


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/68a9d796
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/68a9d796
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/68a9d796

Branch: refs/heads/MNG-6255
Commit: 68a9d79671a7d385a204300994e06b1a19964bf4
Parents: abd73da
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sat Dec 30 21:14:10 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sat Jan 6 20:27:20 2018 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn.cmd | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/68a9d796/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 7b0b271..823ccf0 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -61,11 +61,9 @@ goto error
 
 :chkMHome
 set "MAVEN_HOME=%~dp0.."
-if not "%MAVEN_HOME%"=="" goto valMHome
+if not "%MAVEN_HOME%"=="" goto stripMHome
 goto error
 
-:valMHome
-
 :stripMHome
 if not "_%MAVEN_HOME:~-1%"=="_\" goto checkMCmd
 set "MAVEN_HOME=%MAVEN_HOME:~0,-1%"


[39/49] maven git commit: [MNG-6308] display groupId:artifactId in Building message header

Posted by hb...@apache.org.
[MNG-6308] display groupId:artifactId in Building message header

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c2e3b3e3
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c2e3b3e3
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c2e3b3e3

Branch: refs/heads/MNG-6255
Commit: c2e3b3e301a96e36670206db0c215f3026937d33
Parents: 98d2e19
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat Jan 6 22:12:08 2018 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Sat Jan 6 22:40:29 2018 +0100

----------------------------------------------------------------------
 .../maven/cli/event/ExecutionEventLogger.java   | 21 ++++++++++++--
 .../cli/event/ExecutionEventLoggerTest.java     | 30 +++++++++++++++++++-
 2 files changed, 48 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c2e3b3e3/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 513d56a..3da9ad3 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -261,9 +261,26 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() )
         {
+            MavenProject project = event.getProject();
+
             logger.info( "" );
-            infoLine( '-' );
 
+            // -------< groupId:artifactId >-------
+            String projectKey = project.getGroupId() + ':' + project.getArtifactId();
+            
+            final String preHeader  = "--< ";
+            final String postHeader = " >--";
+
+            final int headerLen = preHeader.length() + projectKey.length() + postHeader.length();
+
+            String prefix = chars( '-', Math.max( 0, ( LINE_LENGTH - headerLen ) / 2 ) ) + preHeader;
+
+            String suffix = postHeader
+                + chars( '-', Math.max( 0, LINE_LENGTH - headerLen - prefix.length() + preHeader.length() ) );
+
+            logger.info( buffer().strong( prefix ).project( projectKey ).strong( suffix ).toString() );
+
+            // Building Project Name Version    [i/n]
             String building = "Building " + event.getProject().getName() + " " + event.getProject().getVersion();
 
             if ( totalProjects <= 1 )
@@ -283,7 +300,7 @@ public class ExecutionEventLogger
                 int pad = LINE_LENGTH - building.length() - progress.length();
 
                 infoMain( building + ( ( pad > 0 ) ? chars( ' ', pad ) : "" ) + progress );
-            } // else what's the point
+            }
 
             infoLine( '-' );
         }

http://git-wip-us.apache.org/repos/asf/maven/blob/c2e3b3e3/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
index 515f9fe..4c0539d 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
@@ -71,8 +71,36 @@ public class ExecutionEventLoggerTest
         // verify
         InOrder inOrder = inOrder( logger );
         inOrder.verify( logger ).info( "" );
-        inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
+        inOrder.verify( logger ).info( "------------------< org.apache.maven:maven-embedder >-------------------" );
         inOrder.verify( logger ).info( "Building Apache Maven Embedder 3.5.4-SNAPSHOT" );
         inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
     }
+
+    @Test
+    public void testProjectStartedOverflow()
+    {
+        // prepare
+        Logger logger = mock( Logger.class );
+        when( logger.isInfoEnabled() ).thenReturn( true );
+        executionEventLogger = new ExecutionEventLogger( logger );
+
+        ExecutionEvent event = mock( ExecutionEvent.class );
+        MavenProject project = mock( MavenProject.class );
+        when( project.getGroupId() ).thenReturn( "org.apache.maven.plugins.overflow" );
+        when( project.getArtifactId() ).thenReturn( "maven-project-info-reports-plugin" );
+        when( project.getPackaging() ).thenReturn( "maven-plugin" );
+        when( project.getName() ).thenReturn( "Apache Maven Project Info Reports Plugin" );
+        when( project.getVersion() ).thenReturn( "3.0.0-SNAPSHOT" );
+        when( event.getProject() ).thenReturn( project );
+
+        // execute
+        executionEventLogger.projectStarted( event );
+
+        // verify
+        InOrder inOrder = inOrder( logger );
+        inOrder.verify( logger ).info( "" );
+        inOrder.verify( logger ).info( "--< org.apache.maven.plugins.overflow:maven-project-info-reports-plugin >--" );
+        inOrder.verify( logger ).info( "Building Apache Maven Project Info Reports Plugin 3.0.0-SNAPSHOT" );
+        inOrder.verify( logger ).info( "------------------------------------------------------------------------" );
+    }
 }


[31/49] maven git commit: Ensure any forked Maven executions are not spied on by Jenkins

Posted by hb...@apache.org.
Ensure any forked Maven executions are not spied on by Jenkins


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/a670c2ea
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/a670c2ea
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/a670c2ea

Branch: refs/heads/MNG-6255
Commit: a670c2ea1f592563b756b31d650c9a6db553fbdb
Parents: 5411c5a
Author: Stephen Connolly <st...@gmail.com>
Authored: Tue Dec 12 15:29:35 2017 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Tue Dec 12 15:29:35 2017 +0000

----------------------------------------------------------------------
 pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/a670c2ea/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a572e4b..c784d9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -462,6 +462,7 @@ under the License.
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
             <argLine>-Xmx256m</argLine>
+            <environmentVariables>JENKINS_MAVEN_AGENT_DISABLED=true</environmentVariables>
           </configuration>
         </plugin>
         <plugin>


[46/49] maven git commit: [MNG-6342] Emit a WARNING about LATEST/RELEASE in parent

Posted by hb...@apache.org.
[MNG-6342] Emit a WARNING about LATEST/RELEASE in parent


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/59880855
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/59880855
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/59880855

Branch: refs/heads/MNG-6255
Commit: 5988085525a39025a9f3d7cfb0592d42261abaf0
Parents: 6285bb9
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu Jan 18 15:50:36 2018 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Fri Jan 19 23:43:59 2018 +0100

----------------------------------------------------------------------
 .../model/validation/DefaultModelValidator.java |  7 ++++
 .../validation/DefaultModelValidatorTest.java   | 15 ++++++++
 .../raw-model/bad-parent-version-latest.xml     | 37 ++++++++++++++++++++
 .../raw-model/bad-parent-version-release.xml    | 37 ++++++++++++++++++++
 4 files changed, 96 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index 9299b43..f0acb1f 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -105,6 +105,13 @@ public class DefaultModelValidator
                                   + ", the parent element cannot have the same groupId:artifactId as the project.",
                               parent );
             }
+            
+            if ( equals( "LATEST", parent.getVersion() ) || equals( "RELEASE", parent.getVersion() ) )
+            {
+                addViolation( problems, Severity.WARNING, Version.BASE, "parent.version", null,
+                              "is either LATEST or RELEASE (both of them are being deprecated)", parent );
+            }
+            
         }
 
         if ( request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )

http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
index 0bb3bd4..b02e0d9 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
@@ -781,4 +781,19 @@ public class DefaultModelValidatorTest
         assertEquals( "'version' contains an expression but should be a constant.", result.getWarnings().get( 0 ) );
     }
 
+    public void testParentVersionLATEST()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-parent-version-latest.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'parent.version' is either LATEST or RELEASE (both of them are being deprecated)", result.getWarnings().get( 0 ) );
+    }
+
+    public void testParentVersionRELEASE()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-parent-version-release.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'parent.version' is either LATEST or RELEASE (both of them are being deprecated)", result.getWarnings().get( 0 ) );
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml
new file mode 100644
index 0000000..7ed30ad
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml
@@ -0,0 +1,37 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>com.example.group</groupId>
+		<artifactId>com-parent</artifactId>
+		<version>LATEST</version>
+	</parent>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-wrong</artifactId>
+	<version>1.0</version>
+
+	<description>
+        This will test if the validation for the parent version
+        is working correct in case of usage of LATEST
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml
new file mode 100644
index 0000000..65fcc26
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml
@@ -0,0 +1,37 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>com.example.group</groupId>
+		<artifactId>com-parent</artifactId>
+		<version>RELEASE</version>
+	</parent>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-wrong</artifactId>
+	<version>1.0</version>
+
+	<description>
+        This will test if the validation for the parent version
+        is working correct in case of usage of RELEASE
+	</description>
+</project>
\ No newline at end of file


[20/49] maven git commit: [maven-release-plugin] prepare for next development iteration

Posted by hb...@apache.org.
[maven-release-plugin] prepare for next development iteration


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/3d0efa36
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/3d0efa36
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/3d0efa36

Branch: refs/heads/MNG-6255
Commit: 3d0efa36963c217527230228a11ab44050ca1b10
Parents: 138edd6
Author: Stephen Connolly <st...@gmail.com>
Authored: Wed Oct 18 08:55:05 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Wed Oct 18 08:55:05 2017 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml              | 2 +-
 maven-artifact/pom.xml            | 2 +-
 maven-builder-support/pom.xml     | 2 +-
 maven-compat/pom.xml              | 2 +-
 maven-core/pom.xml                | 2 +-
 maven-embedder/pom.xml            | 2 +-
 maven-model-builder/pom.xml       | 2 +-
 maven-model/pom.xml               | 2 +-
 maven-plugin-api/pom.xml          | 2 +-
 maven-repository-metadata/pom.xml | 2 +-
 maven-resolver-provider/pom.xml   | 2 +-
 maven-settings-builder/pom.xml    | 2 +-
 maven-settings/pom.xml            | 2 +-
 maven-slf4j-provider/pom.xml      | 2 +-
 pom.xml                           | 4 ++--
 15 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index ba28fa2..6802a99 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>apache-maven</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-artifact/pom.xml
----------------------------------------------------------------------
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 3772dd9..8a9c404 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-artifact</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-builder-support/pom.xml
----------------------------------------------------------------------
diff --git a/maven-builder-support/pom.xml b/maven-builder-support/pom.xml
index 0b6328e..a09816d 100644
--- a/maven-builder-support/pom.xml
+++ b/maven-builder-support/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-builder-support</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-compat/pom.xml
----------------------------------------------------------------------
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 1935ebf..7ec94e2 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-compat</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 8ab5bcc..7c2cde1 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-core</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 6dd1641..d6576f9 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-embedder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-model-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index f6ebe27..b2ef0e7 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-model-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-model/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index 6897154..594c3ec 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-model</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-plugin-api/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 57c7ad5..fba3a11 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-plugin-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-repository-metadata/pom.xml
----------------------------------------------------------------------
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index 605363d..a0d1244 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-repository-metadata</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-resolver-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index f6e1774..4aff64c 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-resolver-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-settings-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index 0a3393d..7fad387 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-settings-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-settings/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index 882a495..f418886 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-settings</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/maven-slf4j-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index f756874..1d49cd8 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.2</version>
+    <version>3.5.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-slf4j-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/3d0efa36/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7803da7..6649634 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
   </parent>
 
   <artifactId>maven</artifactId>
-  <version>3.5.2</version>
+  <version>3.5.3-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven</name>
@@ -98,7 +98,7 @@ under the License.
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
     <url>https://github.com/apache/maven/tree/${project.scm.tag}</url>
-    <tag>maven-3.5.2</tag>
+    <tag>master</tag>
   </scm>
   <issueManagement>
     <system>jira</system>


[34/49] maven git commit: [MNG-6330] Parents relativePath not verified anymore

Posted by hb...@apache.org.
[MNG-6330] Parents relativePath not verified anymore


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/df5169bd
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/df5169bd
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/df5169bd

Branch: refs/heads/MNG-6255
Commit: df5169bdf9fead590d48e23fb182d7f73f1deb3d
Parents: 98af937
Author: rfscholte <rf...@apache.org>
Authored: Fri Dec 29 10:39:45 2017 +0100
Committer: rfscholte <rf...@apache.org>
Committed: Fri Dec 29 10:39:45 2017 +0100

----------------------------------------------------------------------
 .../org/apache/maven/model/building/DefaultModelBuilder.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/df5169bd/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index 463bf1c..c3dd043 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -845,8 +845,8 @@ public class DefaultModelBuilder
                 {
                     ModelSource expectedParentSource = getParentPomFile( childModel, childSource );
 
-                    if ( expectedParentSource instanceof ModelSource2
-                        && !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) )
+                    if ( expectedParentSource == null || ( expectedParentSource instanceof ModelSource2
+                        && !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) ) )
                     {
                         parentData = readParentExternally( childModel, request, problems );
                     }


[03/49] maven git commit: [MNG-6148] Can't package and assemble with JDK9/Jigsaw

Posted by hb...@apache.org.
[MNG-6148] Can't package and assemble with JDK9/Jigsaw


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/842db371
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/842db371
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/842db371

Branch: refs/heads/MNG-6255
Commit: 842db371f0fcaf4e930b99395fb6a8bb442684d6
Parents: 4f2a2db
Author: rfscholte <rf...@apache.org>
Authored: Tue Aug 15 21:42:42 2017 +0200
Committer: rfscholte <rf...@apache.org>
Committed: Tue Aug 15 21:42:42 2017 +0200

----------------------------------------------------------------------
 pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/842db371/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 78c375f..8ce59ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -657,6 +657,7 @@ under the License.
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-javadoc-plugin</artifactId>
+            <version>3.0.0-M1</version>
             <configuration>
               <!-- TODO Remove when we upgrade to maven-parent 31 -->
               <locale>en</locale>


[13/49] maven git commit: [MNG-6275] Defang the tests when their core assumption is invalid.

Posted by hb...@apache.org.
[MNG-6275] Defang the tests when their core assumption is invalid.

- The tests assume that the JRE has a ScriptEngineFactory
- Not all JREs have a ScriptEngineFactory (I'm looking at Azul's Zulu Open JDK 7 builds)
- Ideally we'd skip these tests using Assume.assumeThat(...) but PlexusTestCase doesn't support
  AssumptionViolatedException for marking tests as skipped.

Issue identified during testing of the 3.5.1 release candidate


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/542a7a89
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/542a7a89
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/542a7a89

Branch: refs/heads/MNG-6255
Commit: 542a7a89156263b34d1472e9d9c1a2795afccd2d
Parents: 312eb53
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Sep 11 10:25:11 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Sep 11 10:25:11 2017 +0100

----------------------------------------------------------------------
 .../classrealm/DefaultClassRealmManagerTest.java    | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/542a7a89/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
index 726199f..6d074b9 100644
--- a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
+++ b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
@@ -34,6 +34,7 @@ import org.junit.Test;
 public class DefaultClassRealmManagerTest extends PlexusTestCase
 {
     private ClassRealmManager classRealmManager;
+    private boolean haveScriptEngineFactory;
 
     @Override
     protected void setUp()
@@ -41,6 +42,11 @@ public class DefaultClassRealmManagerTest extends PlexusTestCase
     {
         super.setUp();
         this.classRealmManager = lookup( ClassRealmManager.class );
+        ClassLoader testRealm = getClass().getClassLoader();
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, testRealm );
+        // TODO switch to Assume.assumeTrue( sef.iterator().hasNext() ) when PlexusTestCase
+        // supports assumptions. Not every Java 7 JRE has a ScriptEngineFactory.
+        this.haveScriptEngineFactory = sef.iterator().hasNext();
     }
 
     @Override
@@ -59,7 +65,7 @@ public class DefaultClassRealmManagerTest extends PlexusTestCase
         
         ClassRealm pluginRealm = classRealmManager.createPluginRealm( plugin, parent, null, null, null );
         ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, pluginRealm );
-        assertTrue( sef.iterator().hasNext() );
+        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
     }
 
     @Test
@@ -70,7 +76,7 @@ public class DefaultClassRealmManagerTest extends PlexusTestCase
         
         ClassRealm extensionRealm = classRealmManager.createExtensionRealm( extension, null );
         ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, extensionRealm );
-        assertTrue( sef.iterator().hasNext() );
+        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
     }
 
     @Test
@@ -80,7 +86,7 @@ public class DefaultClassRealmManagerTest extends PlexusTestCase
         
         ClassRealm projectRealm = classRealmManager.createProjectRealm( model, null );
         ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, projectRealm );
-        assertTrue( sef.iterator().hasNext() );
+        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
     }
 
     @Test
@@ -88,7 +94,7 @@ public class DefaultClassRealmManagerTest extends PlexusTestCase
     {
         ClassRealm mavenApiRealm = classRealmManager.getMavenApiRealm();
         ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, mavenApiRealm );
-        assertTrue( sef.iterator().hasNext() );
+        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
     }
 
     @Test
@@ -96,6 +102,6 @@ public class DefaultClassRealmManagerTest extends PlexusTestCase
     {
         ClassRealm coreRealm = classRealmManager.getCoreRealm();
         ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, coreRealm );
-        assertTrue( sef.iterator().hasNext() );
+        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
     }
 }


[25/49] maven git commit: Parse properties before configuring the logging settings

Posted by hb...@apache.org.
Parse properties before configuring the logging settings


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/b2afafe5
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/b2afafe5
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/b2afafe5

Branch: refs/heads/MNG-6255
Commit: b2afafe5a252d9f86b3e43cce8a06dc9cdc7a6d7
Parents: 5919b74
Author: Robin Müller <co...@users.noreply.github.com>
Authored: Thu Oct 26 09:41:20 2017 +0200
Committer: rfscholte <rf...@apache.org>
Committed: Fri Nov 17 16:41:38 2017 +0100

----------------------------------------------------------------------
 maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b2afafe5/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 3474fab..977f174 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -277,9 +277,9 @@ public class MavenCli
         {
             initialize( cliRequest );
             cli( cliRequest );
+            properties( cliRequest );
             logging( cliRequest );
             version( cliRequest );
-            properties( cliRequest );
             localContainer = container( cliRequest );
             commands( cliRequest );
             configure( cliRequest );


[15/49] maven git commit: [MNG-6196] updated slf4j to 1.7.25

Posted by hb...@apache.org.
[MNG-6196] updated slf4j to 1.7.25

[SLF4J-394] use new slf4j methods done for us
[SLF4J-395] use slf4j-simple System.out cache

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/eb2db7b2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/eb2db7b2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/eb2db7b2

Branch: refs/heads/MNG-6255
Commit: eb2db7b28664dbaac6a59a2189c70d92e455dcea
Parents: 542a7a8
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat Mar 4 02:59:42 2017 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Tue Sep 26 00:19:57 2017 +0200

----------------------------------------------------------------------
 .../src/conf/logging/simplelogger.properties       |  1 +
 .../java/org/slf4j/impl/MavenSimpleLogger.java     |  6 +++++-
 .../src/main/script/patch-slf4j-simple.groovy      | 17 -----------------
 pom.xml                                            |  2 +-
 4 files changed, 7 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/eb2db7b2/apache-maven/src/conf/logging/simplelogger.properties
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/logging/simplelogger.properties b/apache-maven/src/conf/logging/simplelogger.properties
index 8dea717..64b331b 100644
--- a/apache-maven/src/conf/logging/simplelogger.properties
+++ b/apache-maven/src/conf/logging/simplelogger.properties
@@ -20,6 +20,7 @@ org.slf4j.simpleLogger.showDateTime=false
 org.slf4j.simpleLogger.showThreadName=false
 org.slf4j.simpleLogger.showLogName=false
 org.slf4j.simpleLogger.logFile=System.out
+org.slf4j.simpleLogger.cacheOutputStream=true
 org.slf4j.simpleLogger.levelInBrackets=true
 org.slf4j.simpleLogger.log.Sisu=info
 org.slf4j.simpleLogger.warnLevelString=WARNING

http://git-wip-us.apache.org/repos/asf/maven/blob/eb2db7b2/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java
index 17f1f48..3c1ca4f 100644
--- a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java
+++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java
@@ -56,8 +56,12 @@ public class MavenSimpleLogger
     }
 
     @Override
-    protected void renderThrowable( Throwable t, PrintStream stream )
+    protected void writeThrowable( Throwable t, PrintStream stream )
     {
+        if ( t == null )
+        {
+            return;
+        }
         stream.print( buffer().failure( t.getClass().getName() ) );
         if ( t.getMessage() != null )
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/eb2db7b2/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
index bba8646..9865625 100644
--- a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
+++ b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
@@ -34,20 +34,3 @@ if ( content.contains( 'MavenSimpleLoggerFactory' ) )
 println '    patching StaticLoggerBinder.java';
 content = content.replaceAll( 'SimpleLoggerFactory', 'MavenSimpleLoggerFactory' );
 file.write( content );
-
-
-println '    patching SimpleLogger.java';
-file = new File( dir, 'SimpleLogger.java' );
-content = file.text;
-content = content.replaceAll( 'private static final int LOG_LEVEL_', 'protected static final int LOG_LEVEL_' );
-content = content.replaceAll( 't.printStackTrace(TARGET_STREAM)', 'renderThrowable(t, TARGET_STREAM);' );
-
-index = content.indexOf( 'switch (level) {' );
-end = content.indexOf( '}', index ) + 1;
-content = content.substring( 0, index ) + 'buf.append(renderLevel(level));' + content.substring( end );
-
-content = content.substring( 0, content.lastIndexOf( '}' ) );
-content += '  protected void renderThrowable(Throwable t, PrintStream stream) {}\n';
-content += '  protected String renderLevel(int level) { return ""; }\n}\n';
-
-file.write( content );

http://git-wip-us.apache.org/repos/asf/maven/blob/eb2db7b2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4a79956..ea119e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@ under the License.
     <modelloVersion>1.9.1</modelloVersion>
     <jxpathVersion>1.3</jxpathVersion>
     <resolverVersion>1.1.0</resolverVersion>
-    <slf4jVersion>1.7.22</slf4jVersion>
+    <slf4jVersion>1.7.25</slf4jVersion>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
     <!-- Control the name of the distribution and information output by mvn -->
     <distributionId>apache-maven</distributionId>


[14/49] maven git commit: [MNG-6196] removed remaining Monkey patching, not really necessary

Posted by hb...@apache.org.
[MNG-6196] removed remaining Monkey patching, not really necessary

done after Emmanuel Bourg #118 PR idea

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4f530c4f
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4f530c4f
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4f530c4f

Branch: refs/heads/MNG-6255
Commit: 4f530c4f006b8d22da90d968a1d32797280804b9
Parents: eb2db7b
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sun May 21 19:02:46 2017 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Tue Sep 26 00:19:57 2017 +0200

----------------------------------------------------------------------
 maven-slf4j-provider/pom.xml                    | 20 +----
 .../java/org/slf4j/impl/StaticLoggerBinder.java | 89 ++++++++++++++++++++
 .../src/main/script/patch-slf4j-simple.groovy   | 36 --------
 3 files changed, 91 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4f530c4f/maven-slf4j-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index 68912f5..4bb0b2a 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -32,7 +32,7 @@ under the License.
 
   <name>Maven SLF4J Simple Provider</name>
   <description>
-    Maven SLF4J provider based on SLF4J's simple provider, monkey-patched to support Maven styled colors
+    Maven SLF4J provider based on SLF4J's simple provider, extended to support Maven styled colors
     for levels and stacktraces rendering.
   </description>
 
@@ -63,6 +63,7 @@ under the License.
               <overWrite>false</overWrite>
               <outputDirectory>${project.build.directory}/generated-sources/slf4j-simple</outputDirectory>
               <includes>org/slf4j/impl/*.java</includes>
+              <excludes>org/slf4j/impl/StaticLoggerBinder*</excludes>
             </artifactItem>
           </artifactItems>
         </configuration>
@@ -94,23 +95,6 @@ under the License.
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.gmaven</groupId>
-        <artifactId>groovy-maven-plugin</artifactId>
-        <version>2.0</version>
-        <executions>
-          <execution>
-            <id>patch-slf4j-simple</id>
-            <phase>process-sources</phase>
-            <goals>
-              <goal>execute</goal>
-            </goals>
-            <configuration>
-              <source>${project.basedir}/src/main/script/patch-slf4j-simple.groovy</source>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/4f530c4f/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
new file mode 100644
index 0000000..ba01d83
--- /dev/null
+++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -0,0 +1,89 @@
+package org.slf4j.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.slf4j.ILoggerFactory;
+import org.slf4j.spi.LoggerFactoryBinder;
+
+/**
+ * SLF4J LoggerFactoryBinder implementation using MavenSimpleLogger.
+ * This class is part of the required classes used to specify an
+ * SLF4J logger provider implementation.
+ *
+ * @since 3.5.1
+ */
+public final class StaticLoggerBinder
+    implements LoggerFactoryBinder
+{
+    /**
+     * Declare the version of the SLF4J API this implementation is compiled
+     * against. The value of this field is usually modified with each release.
+     */
+    // to avoid constant folding by the compiler, this field must *not* be final
+    @SuppressWarnings( { "checkstyle:staticvariablename", "checkstyle:visibilitymodifier" } )
+    public static String REQUESTED_API_VERSION = "1.7.25"; // !final
+
+    private static final String LOGGER_FACTORY_CLASS_STR = MavenSimpleLoggerFactory.class.getName();
+
+    /**
+     * The unique instance of this class.
+     */
+    private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
+
+    /**
+     * The ILoggerFactory instance returned by the {@link #getLoggerFactory}
+     * method should always be the same object
+     */
+    private final ILoggerFactory loggerFactory;
+
+    /**
+     * Private constructor to prevent instantiation
+     */
+    private StaticLoggerBinder()
+    {
+        loggerFactory = new MavenSimpleLoggerFactory();
+    }
+
+    /**
+     * Returns the singleton of this class.
+     */
+    public static StaticLoggerBinder getSingleton()
+    {
+        return SINGLETON;
+    }
+
+    /**
+     * Returns the factory.
+     */
+    @Override
+    public ILoggerFactory getLoggerFactory()
+    {
+        return loggerFactory;
+    }
+
+    /**
+     * Returns the class name.
+     */
+    @Override
+    public String getLoggerFactoryClassStr()
+    {
+        return LOGGER_FACTORY_CLASS_STR;
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/4f530c4f/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
deleted file mode 100644
index 9865625..0000000
--- a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
+++ /dev/null
@@ -1,36 +0,0 @@
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-dir = new File( basedir, 'target/generated-sources/slf4j-simple/org/slf4j/impl' );
-
-file = new File( dir, 'StaticLoggerBinder.java' );
-content = file.text;
-
-// check if already patched
-if ( content.contains( 'MavenSimpleLoggerFactory' ) )
-{
-  println '    slf4j-simple already patched';
-  return;
-}
-
-
-println '    patching StaticLoggerBinder.java';
-content = content.replaceAll( 'SimpleLoggerFactory', 'MavenSimpleLoggerFactory' );
-file.write( content );


[32/49] maven git commit: Ensure any forked Maven executions are not spied on by Jenkins

Posted by hb...@apache.org.
Ensure any forked Maven executions are not spied on by Jenkins


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/eee06f7d
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/eee06f7d
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/eee06f7d

Branch: refs/heads/MNG-6255
Commit: eee06f7d7c736cbc1668dc7eae5dc21fd4b1075f
Parents: a670c2e
Author: Stephen Connolly <st...@gmail.com>
Authored: Wed Dec 13 00:45:00 2017 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Wed Dec 13 00:45:00 2017 +0000

----------------------------------------------------------------------
 pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/eee06f7d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c784d9d..8f31bf1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -462,7 +462,9 @@ under the License.
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
             <argLine>-Xmx256m</argLine>
-            <environmentVariables>JENKINS_MAVEN_AGENT_DISABLED=true</environmentVariables>
+            <environmentVariables>
+              <JENKINS_MAVEN_AGENT_DISABLED>true</JENKINS_MAVEN_AGENT_DISABLED>
+            </environmentVariables>
           </configuration>
         </plugin>
         <plugin>


[37/49] maven git commit: [MNG-6331] Remove maven-bundle-pugin from build pluginManagement

Posted by hb...@apache.org.
[MNG-6331] Remove maven-bundle-pugin from build pluginManagement


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/abd73da3
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/abd73da3
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/abd73da3

Branch: refs/heads/MNG-6255
Commit: abd73da3a492ee544c6102840fc012409a4ac83d
Parents: 6b83f7e
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sat Dec 30 20:14:05 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sat Jan 6 19:14:50 2018 +0100

----------------------------------------------------------------------
 pom.xml | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/abd73da3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8f31bf1..bb87aca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -491,11 +491,6 @@ under the License.
           </executions>
         </plugin>
         <plugin>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>maven-bundle-plugin</artifactId>
-          <version>1.0.0</version>
-        </plugin>
-        <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>buildnumber-maven-plugin</artifactId>
           <version>1.4</version>


[43/49] maven git commit: [MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Posted by hb...@apache.org.
[MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Adding exportedPackage to find class:
javax.annotation.security.RolesAllowed

First maven commit :) Works but might be deeper issue

Signed-off-by: Karl Heinz Marbaise <kh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c311e0d8
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c311e0d8
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c311e0d8

Branch: refs/heads/MNG-6255
Commit: c311e0d812eadd782a59b7f8e939becf7c1da74b
Parents: 2b336ff
Author: Bengt Söderberg <be...@purplescout.se>
Authored: Mon Nov 27 19:19:48 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Wed Jan 17 19:16:02 2018 +0100

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c311e0d8/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index c5f40b5..6329aaa 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -100,6 +100,7 @@ under the License.
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</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


[48/49] maven git commit: [MNG-5992] Upgrade default version of maven-release-plugin to 2.5.3

Posted by hb...@apache.org.
[MNG-5992] Upgrade default version of maven-release-plugin to 2.5.3

avoids exposing Git password during release
this fixes #152

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/085ee9f2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/085ee9f2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/085ee9f2

Branch: refs/heads/MNG-6255
Commit: 085ee9f27508f29ff5cbe418eff0eabc98ad1a95
Parents: 99e6622
Author: Hervé Boutemy <hb...@apache.org>
Authored: Wed Feb 7 22:06:37 2018 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Thu Feb 8 08:02:04 2018 +0100

----------------------------------------------------------------------
 .../src/main/resources/org/apache/maven/model/pom-4.0.0.xml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/085ee9f2/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
index 91492a9..8c26f71 100644
--- a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
+++ b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
@@ -86,7 +86,7 @@ under the License.
         </plugin>
         <plugin>
           <artifactId>maven-release-plugin</artifactId>
-          <version>2.3.2</version>
+          <version>2.5.3</version>
         </plugin>
       </plugins>
     </pluginManagement>


[05/49] maven git commit: [MNG-6220] Add CLI options to control color output Introduce -Dstyle.color=[always|never|auto]

Posted by hb...@apache.org.
[MNG-6220] Add CLI options to control color output
Introduce -Dstyle.color=[always|never|auto]


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/785bad69
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/785bad69
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/785bad69

Branch: refs/heads/MNG-6255
Commit: 785bad693c60ad60d7b307af8fab9e9234ff57bd
Parents: f1ed659
Author: rfscholte <rf...@apache.org>
Authored: Tue Aug 15 21:48:57 2017 +0200
Committer: rfscholte <rf...@apache.org>
Committed: Tue Aug 15 21:48:57 2017 +0200

----------------------------------------------------------------------
 maven-embedder/pom.xml                          |  5 ++
 .../java/org/apache/maven/cli/MavenCli.java     | 28 +++++--
 .../java/org/apache/maven/cli/MavenCliTest.java | 86 ++++++++++++++++++--
 3 files changed, 107 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/785bad69/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 7bd2650..4b3d097 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -138,6 +138,11 @@ under the License.
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.fusesource.jansi</groupId>
+      <artifactId>jansi</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/maven/blob/785bad69/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 641a2a9..3474fab 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -144,6 +144,8 @@ public class MavenCli
 
     private static final String MVN_MAVEN_CONFIG = ".mvn/maven.config";
 
+    public static final String STYLE_COLOR_PROPERTY = "style.color";
+
     private ClassWorld classWorld;
 
     private LoggerManager plexusLoggerManager;
@@ -472,8 +474,9 @@ public class MavenCli
     /**
      * configure logging
      */
-    private void logging( CliRequest cliRequest )
+    void logging( CliRequest cliRequest )
     {
+        // LOG LEVEL
         cliRequest.debug = cliRequest.commandLine.hasOption( CLIManager.DEBUG );
         cliRequest.quiet = !cliRequest.debug && cliRequest.commandLine.hasOption( CLIManager.QUIET );
         cliRequest.showErrors = cliRequest.debug || cliRequest.commandLine.hasOption( CLIManager.ERRORS );
@@ -494,18 +497,33 @@ public class MavenCli
         // else fall back to default log level specified in conf
         // see https://issues.apache.org/jira/browse/MNG-2570
 
-        if ( cliRequest.commandLine.hasOption( CLIManager.BATCH_MODE ) )
+        // LOG COLOR
+        String styleColor = cliRequest.getUserProperties().getProperty( STYLE_COLOR_PROPERTY, "auto" );
+        if ( "always".equals( styleColor ) )
+        {
+            MessageUtils.setColorEnabled( true );
+        }
+        else if ( "never".equals( styleColor ) )
         {
             MessageUtils.setColorEnabled( false );
         }
-
+        else if ( !"auto".equals( styleColor ) )
+        {
+            throw new IllegalArgumentException( "Invalid color configuration option [" + styleColor
+                + "]. Supported values are (auto|always|never)." );
+        }
+        else if ( cliRequest.commandLine.hasOption( CLIManager.BATCH_MODE )
+            || cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
+        {
+            MessageUtils.setColorEnabled( false );
+        }
+        
+        // LOG STREAMS
         if ( cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
         {
             File logFile = new File( cliRequest.commandLine.getOptionValue( CLIManager.LOG_FILE ) );
             logFile = resolveFile( logFile, cliRequest.workingDirectory );
 
-            MessageUtils.setColorEnabled( false );
-
             // redirect stdout and stderr to file
             try
             {

http://git-wip-us.apache.org/repos/asf/maven/blob/785bad69/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
index 9b480ea..433c949 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
@@ -19,26 +19,35 @@ package org.apache.maven.cli;
  * under the License.
  */
 
-import junit.framework.TestCase;
-import org.apache.commons.cli.ParseException;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
 
 import java.io.File;
 
+import org.apache.commons.cli.ParseException;
+import org.apache.maven.shared.utils.logging.MessageUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
 public class MavenCliTest
-    extends TestCase
 {
     private MavenCli cli;
 
     private String origBasedir;
 
-    protected void setUp()
+    @Before
+    public void setUp()
     {
         cli = new MavenCli();
         origBasedir = System.getProperty( MavenCli.MULTIMODULE_PROJECT_DIRECTORY );
     }
 
-    @Override
-    protected void tearDown()
+    @After
+    public void tearDown()
         throws Exception
     {
         if ( origBasedir != null )
@@ -49,9 +58,9 @@ public class MavenCliTest
         {
             System.getProperties().remove( MavenCli.MULTIMODULE_PROJECT_DIRECTORY );
         }
-        super.tearDown();
     }
 
+    @Test
     public void testCalculateDegreeOfConcurrencyWithCoreMultiplier()
     {
         int cores = Runtime.getRuntime().availableProcessors();
@@ -71,6 +80,7 @@ public class MavenCliTest
         }
     }
 
+    @Test
     public void testMavenConfig()
         throws Exception
     {
@@ -90,6 +100,7 @@ public class MavenCliTest
         assertEquals( "foobar", request.commandLine.getOptionValue( "builder" ) );
     }
 
+    @Test
     public void testMavenConfigInvalid()
         throws Exception
     {
@@ -120,6 +131,7 @@ public class MavenCliTest
      *
      * @throws Exception in case of failure.
      */
+    @Test
     public void testMVNConfigurationThreadCanBeOverwrittenViaCommandLine()
         throws Exception
     {
@@ -145,6 +157,7 @@ public class MavenCliTest
      *
      * @throws Exception
      */
+    @Test
     public void testMVNConfigurationDefinedPropertiesCanBeOverwrittenViaCommandLine()
         throws Exception
     {
@@ -172,6 +185,7 @@ public class MavenCliTest
      *
      * @throws Exception
      */
+    @Test
     public void testMVNConfigurationCLIRepeatedPropertiesLastWins()
         throws Exception
     {
@@ -199,6 +213,7 @@ public class MavenCliTest
      *
      * @throws Exception
      */
+    @Test
     public void testMVNConfigurationFunkyArguments()
         throws Exception
     {
@@ -221,4 +236,61 @@ public class MavenCliTest
 
         assertEquals( "-Dpom.xml", request.getCommandLine().getOptionValue( CLIManager.ALTERNATE_POM_FILE ) );
     }
+
+    @Test
+    public void testStyleColors()
+        throws Exception
+    {
+        assumeTrue( "ANSI not supported", MessageUtils.isColorEnabled() );
+        CliRequest request;
+
+        MessageUtils.setColorEnabled( true );
+        request = new CliRequest( new String[] { "-B" }, null );
+        cli.cli( request );
+        cli.properties( request );
+        cli.logging( request );
+        assertFalse( MessageUtils.isColorEnabled() );
+
+        MessageUtils.setColorEnabled( true );
+        request = new CliRequest( new String[] { "-l", "target/temp/mvn.log" }, null );
+        cli.cli( request );
+        cli.properties( request );
+        cli.logging( request );
+        assertFalse( MessageUtils.isColorEnabled() );
+
+        MessageUtils.setColorEnabled( false );
+        request = new CliRequest( new String[] { "-Dstyle.color=always" }, null );
+        cli.cli( request );
+        cli.properties( request );
+        cli.logging( request );
+        assertTrue( MessageUtils.isColorEnabled() );
+
+        MessageUtils.setColorEnabled( true );
+        request = new CliRequest( new String[] { "-Dstyle.color=never" }, null );
+        cli.cli( request );
+        cli.properties( request );
+        cli.logging( request );
+        assertFalse( MessageUtils.isColorEnabled() );
+
+        MessageUtils.setColorEnabled( false );
+        request = new CliRequest( new String[] { "-Dstyle.color=always", "-B", "-l", "target/temp/mvn.log" }, null );
+        cli.cli( request );
+        cli.properties( request );
+        cli.logging( request );
+        assertTrue( MessageUtils.isColorEnabled() );
+
+        try
+        {
+            MessageUtils.setColorEnabled( false );
+            request = new CliRequest( new String[] { "-Dstyle.color=maybe", "-B", "-l", "target/temp/mvn.log" }, null );
+            cli.cli( request );
+            cli.properties( request );
+            cli.logging( request );
+            fail( "maybe is not a valid option" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            // noop
+        }
+    }
 }


[11/49] maven git commit: [maven-release-plugin] prepare release maven-3.5.1

Posted by hb...@apache.org.
[maven-release-plugin] prepare release maven-3.5.1


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/094e4e31
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/094e4e31
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/094e4e31

Branch: refs/heads/MNG-6255
Commit: 094e4e31a5af55bb17be87675da41d9aeca062f3
Parents: 27a2bda
Author: Stephen Connolly <st...@gmail.com>
Authored: Sun Sep 10 12:51:26 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Sun Sep 10 12:51:26 2017 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml              | 2 +-
 maven-artifact/pom.xml            | 2 +-
 maven-builder-support/pom.xml     | 2 +-
 maven-compat/pom.xml              | 2 +-
 maven-core/pom.xml                | 2 +-
 maven-embedder/pom.xml            | 2 +-
 maven-model-builder/pom.xml       | 2 +-
 maven-model/pom.xml               | 2 +-
 maven-plugin-api/pom.xml          | 2 +-
 maven-repository-metadata/pom.xml | 2 +-
 maven-resolver-provider/pom.xml   | 2 +-
 maven-settings-builder/pom.xml    | 2 +-
 maven-settings/pom.xml            | 2 +-
 maven-slf4j-provider/pom.xml      | 2 +-
 pom.xml                           | 4 ++--
 15 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index b286f74..eb97543 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>apache-maven</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-artifact/pom.xml
----------------------------------------------------------------------
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index b13482b..8a978a8 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-artifact</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-builder-support/pom.xml
----------------------------------------------------------------------
diff --git a/maven-builder-support/pom.xml b/maven-builder-support/pom.xml
index 9557731..02682ab 100644
--- a/maven-builder-support/pom.xml
+++ b/maven-builder-support/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-builder-support</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-compat/pom.xml
----------------------------------------------------------------------
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index b3cf039..9d3542e 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-compat</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 6cd8d85..78a7dc6 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-core</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 4b3d097..b759470 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-embedder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-model-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index eb86824..d44ff50 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-model-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-model/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index 581e927..a321d35 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-model</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-plugin-api/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 271404f..9e81210 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-plugin-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-repository-metadata/pom.xml
----------------------------------------------------------------------
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index dcc6a22..18c23bf 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-repository-metadata</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-resolver-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index 53e67e5..c78fde1 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-resolver-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-settings-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index 904b085..dd60239 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-settings-builder</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-settings/pom.xml
----------------------------------------------------------------------
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index eb4ad22..cd00975 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-settings</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/maven-slf4j-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index 315b9a7..e7fdf96 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.5.1-SNAPSHOT</version>
+    <version>3.5.1</version>
   </parent>
 
   <artifactId>maven-slf4j-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/maven/blob/094e4e31/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 761edbf..2c97f6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
   </parent>
 
   <artifactId>maven</artifactId>
-  <version>3.5.1-SNAPSHOT</version>
+  <version>3.5.1</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven</name>
@@ -98,7 +98,7 @@ under the License.
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection>
     <url>https://github.com/apache/maven/tree/${project.scm.tag}</url>
-    <tag>master</tag>
+    <tag>maven-3.5.1</tag>
   </scm>
   <issueManagement>
     <system>jira</system>


[08/49] maven git commit: Revert "Squashed commit of the following:"

Posted by hb...@apache.org.
Revert "Squashed commit of the following:"

This reverts commit f047ea143766fd22ae42040e6805bef287f3cc3e.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/170c1ed8
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/170c1ed8
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/170c1ed8

Branch: refs/heads/MNG-6255
Commit: 170c1ed82cbe124da1736da64af20d660dc3162e
Parents: e44c39c
Author: rfscholte <rf...@apache.org>
Authored: Wed Aug 30 11:12:20 2017 +0200
Committer: rfscholte <rf...@apache.org>
Committed: Wed Aug 30 11:12:20 2017 +0200

----------------------------------------------------------------------
 .../classrealm/DefaultClassRealmManager.java    |   2 +-
 .../DefaultClassRealmManagerTest.java           | 101 -------------------
 2 files changed, 1 insertion(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/170c1ed8/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index d517924..6ce1925 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -120,7 +120,7 @@ public class DefaultClassRealmManager
             {
                 try
                 {
-                    ClassRealm classRealm = world.newRealm( realmId, ClassLoader.getSystemClassLoader() );
+                    ClassRealm classRealm = world.newRealm( realmId, null );
 
                     if ( logger.isDebugEnabled() )
                     {

http://git-wip-us.apache.org/repos/asf/maven/blob/170c1ed8/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
deleted file mode 100644
index 726199f..0000000
--- a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.maven.classrealm;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ServiceLoader;
-
-import javax.script.ScriptEngineFactory;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Plugin;
-import org.codehaus.plexus.ContainerConfiguration;
-import org.codehaus.plexus.PlexusConstants;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.junit.Test;
-
-public class DefaultClassRealmManagerTest extends PlexusTestCase
-{
-    private ClassRealmManager classRealmManager;
-
-    @Override
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
-        this.classRealmManager = lookup( ClassRealmManager.class );
-    }
-
-    @Override
-    protected void customizeContainerConfiguration( ContainerConfiguration configuration )
-    {
-        configuration.setClassPathScanning( PlexusConstants.SCANNING_INDEX );
-    }
-
-    @Test
-    public void testMNG6275_pluginRealmDefaultParentClassLoader()
-    {
-        Plugin plugin = new Plugin();
-        plugin.setVersion( "VERSION" );
-        
-        ClassLoader parent = null;
-        
-        ClassRealm pluginRealm = classRealmManager.createPluginRealm( plugin, parent, null, null, null );
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, pluginRealm );
-        assertTrue( sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_extensionRealmDefaultParentClassLoader()
-    {
-        Plugin extension = new Plugin();
-        extension.setVersion( "VERSION" );
-        
-        ClassRealm extensionRealm = classRealmManager.createExtensionRealm( extension, null );
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, extensionRealm );
-        assertTrue( sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_projectRealmDefaultParentClassLoader()
-    {
-        Model model = new Model();
-        
-        ClassRealm projectRealm = classRealmManager.createProjectRealm( model, null );
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, projectRealm );
-        assertTrue( sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_mavenApiRealmDefaultParentClassLoader()
-    {
-        ClassRealm mavenApiRealm = classRealmManager.getMavenApiRealm();
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, mavenApiRealm );
-        assertTrue( sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_coreRealmDefaultParentClassLoader()
-    {
-        ClassRealm coreRealm = classRealmManager.getCoreRealm();
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, coreRealm );
-        assertTrue( sef.iterator().hasNext() );
-    }
-}


[04/49] maven git commit: [MNG-6127] Fix plugin execution configuration interference

Posted by hb...@apache.org.
[MNG-6127] Fix plugin execution configuration interference

Signed-off-by: rfscholte <rf...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/f1ed6592
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/f1ed6592
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/f1ed6592

Branch: refs/heads/MNG-6255
Commit: f1ed6592b1c701834d1377fade6cdb382a63bbf4
Parents: 842db37
Author: Mario Krizmanic <ma...@gmail.com>
Authored: Tue Aug 15 21:46:29 2017 +0200
Committer: rfscholte <rf...@apache.org>
Committed: Tue Aug 15 21:46:29 2017 +0200

----------------------------------------------------------------------
 .../internal/DefaultLifecyclePluginAnalyzer.java          | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f1ed6592/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
index aec785f..14653b7 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
@@ -31,6 +31,7 @@ import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -190,8 +191,13 @@ public class DefaultLifecyclePluginAnalyzer
                 execution.setPhase( phase );
                 execution.setPriority( i - mojos.size() );
                 execution.getGoals().add( gs.goal );
-                execution.setConfiguration( mojo.getConfiguration() );
-                
+
+                Xpp3Dom lifecycleConfiguration = mojo.getConfiguration();
+                if ( lifecycleConfiguration != null )
+                {
+                    execution.setConfiguration( new Xpp3Dom( lifecycleConfiguration ) );
+                }
+
                 plugin.setDependencies( mojo.getDependencies() );
                 plugin.getExecutions().add( execution );
             }


[49/49] maven git commit: [MNG-6255] Maven script cannot parse jvm.config with CRLF

Posted by hb...@apache.org.
[MNG-6255] Maven script cannot parse jvm.config with CRLF

Both \r and \n should also be replaced with a space to deal with CRLF line endings properly


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/b918b0b1
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/b918b0b1
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/b918b0b1

Branch: refs/heads/MNG-6255
Commit: b918b0b128b242bc1d8812132ddb9c73f0bb14f3
Parents: 085ee9f
Author: Andrew Donald Kennedy <an...@gmail.com>
Authored: Mon Jul 10 16:58:33 2017 +0100
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Thu Feb 8 23:52:25 2018 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b918b0b1/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index e3a5848..65be711 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -167,7 +167,7 @@ find_file_argument_basedir() {
 # concatenates all lines of a file
 concat_lines() {
   if [ -f "$1" ]; then
-    echo "`tr -s '\n' ' ' < "$1"`"
+    echo "`tr -s '\r\n' '  ' < "$1"`"
   fi
 }
 


[06/49] maven git commit: Squashed commit of the following:

Posted by hb...@apache.org.
Squashed commit of the following:

commit c829bdcfc275b207e23fc568b3c16d98195675be
Author: rfscholte <rf...@apache.org>
Date:   Thu Aug 24 10:54:08 2017 +0200

    [MNG-6275] ServiceLoaderFactory can't find implementations via ClassRealm


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/f047ea14
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/f047ea14
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/f047ea14

Branch: refs/heads/MNG-6255
Commit: f047ea143766fd22ae42040e6805bef287f3cc3e
Parents: 785bad6
Author: rfscholte <rf...@apache.org>
Authored: Thu Aug 24 11:33:01 2017 +0200
Committer: rfscholte <rf...@apache.org>
Committed: Thu Aug 24 11:33:01 2017 +0200

----------------------------------------------------------------------
 .../classrealm/DefaultClassRealmManager.java    |   2 +-
 .../DefaultClassRealmManagerTest.java           | 101 +++++++++++++++++++
 2 files changed, 102 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f047ea14/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index 6ce1925..d517924 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -120,7 +120,7 @@ public class DefaultClassRealmManager
             {
                 try
                 {
-                    ClassRealm classRealm = world.newRealm( realmId, null );
+                    ClassRealm classRealm = world.newRealm( realmId, ClassLoader.getSystemClassLoader() );
 
                     if ( logger.isDebugEnabled() )
                     {

http://git-wip-us.apache.org/repos/asf/maven/blob/f047ea14/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
new file mode 100644
index 0000000..726199f
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
@@ -0,0 +1,101 @@
+package org.apache.maven.classrealm;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.ServiceLoader;
+
+import javax.script.ScriptEngineFactory;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
+import org.junit.Test;
+
+public class DefaultClassRealmManagerTest extends PlexusTestCase
+{
+    private ClassRealmManager classRealmManager;
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        this.classRealmManager = lookup( ClassRealmManager.class );
+    }
+
+    @Override
+    protected void customizeContainerConfiguration( ContainerConfiguration configuration )
+    {
+        configuration.setClassPathScanning( PlexusConstants.SCANNING_INDEX );
+    }
+
+    @Test
+    public void testMNG6275_pluginRealmDefaultParentClassLoader()
+    {
+        Plugin plugin = new Plugin();
+        plugin.setVersion( "VERSION" );
+        
+        ClassLoader parent = null;
+        
+        ClassRealm pluginRealm = classRealmManager.createPluginRealm( plugin, parent, null, null, null );
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, pluginRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_extensionRealmDefaultParentClassLoader()
+    {
+        Plugin extension = new Plugin();
+        extension.setVersion( "VERSION" );
+        
+        ClassRealm extensionRealm = classRealmManager.createExtensionRealm( extension, null );
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, extensionRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_projectRealmDefaultParentClassLoader()
+    {
+        Model model = new Model();
+        
+        ClassRealm projectRealm = classRealmManager.createProjectRealm( model, null );
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, projectRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_mavenApiRealmDefaultParentClassLoader()
+    {
+        ClassRealm mavenApiRealm = classRealmManager.getMavenApiRealm();
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, mavenApiRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+
+    @Test
+    public void testMNG6275_coreRealmDefaultParentClassLoader()
+    {
+        ClassRealm coreRealm = classRealmManager.getCoreRealm();
+        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, coreRealm );
+        assertTrue( sef.iterator().hasNext() );
+    }
+}


[44/49] maven git commit: Revert "[MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed"

Posted by hb...@apache.org.
Revert "[MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed"

This reverts commit c311e0d812eadd782a59b7f8e939becf7c1da74b.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/42918c37
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/42918c37
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/42918c37

Branch: refs/heads/MNG-6255
Commit: 42918c37c55e9ff83358ced305bc1f0b711b83d0
Parents: c311e0d
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu Jan 18 20:18:32 2018 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Thu Jan 18 20:18:32 2018 +0100

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/42918c37/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index 6329aaa..c5f40b5 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -100,7 +100,6 @@ under the License.
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</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


[45/49] maven git commit: [MNG-6298] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Posted by hb...@apache.org.
[MNG-6298] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Adding exportedPackage to find class:
javax.annotation.security.RolesAllowed

First maven commit :) Works but might be deeper issue

Signed-off-by: Karl Heinz Marbaise <kh...@apache.org>
Now with correct issue reference.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/6285bb96
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6285bb96
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6285bb96

Branch: refs/heads/MNG-6255
Commit: 6285bb96c5104a9eabd4e35131aec917b4f9e048
Parents: 42918c3
Author: Bengt Söderberg <be...@purplescout.se>
Authored: Mon Nov 27 19:19:48 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Fri Jan 19 19:40:50 2018 +0100

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6285bb96/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index c5f40b5..6329aaa 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -100,6 +100,7 @@ under the License.
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</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


[18/49] maven git commit: Revert "MNG-6209 better executeMojo thread context classloader"

Posted by hb...@apache.org.
Revert "MNG-6209 better executeMojo thread context classloader"

This reverts commit ec629f7d511eb910b4e80112a9fbe85ed8786f10.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4b95ad9f
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4b95ad9f
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4b95ad9f

Branch: refs/heads/MNG-6255
Commit: 4b95ad9fce6dfe7eec2be88f5837e96c7fbd7292
Parents: cae779e
Author: Stephen Connolly <st...@gmail.com>
Authored: Tue Oct 17 19:18:43 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Tue Oct 17 19:18:43 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/plugin/DefaultBuildPluginManager.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4b95ad9f/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
index 3af1125..b4f7a4d 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
@@ -106,11 +106,8 @@ public class DefaultBuildPluginManager
             throw new PluginExecutionException( mojoExecution, project, e );
         }
 
-        // use project realm as thread context classloader to enable components from all extensions=true plugins
-        ClassRealm tccl = mojoExecution.getPlugin().isExtensions() ? project.getClassRealm() : pluginRealm;
-
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader( tccl );
+        Thread.currentThread().setContextClassLoader( pluginRealm );
 
         MavenSession oldSession = legacySupport.getSession();
 


[09/49] maven git commit: [MNG-6216] ArrayIndexOutOfBoundsException when parsing POM o Upgraded to new release of plexus-utils which contains the fix for #22 in plexus-utils.

Posted by hb...@apache.org.
[MNG-6216] ArrayIndexOutOfBoundsException when parsing POM
 o Upgraded to new release of plexus-utils which contains
   the fix for #22 in plexus-utils.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c9a288d8
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c9a288d8
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c9a288d8

Branch: refs/heads/MNG-6255
Commit: c9a288d8b1090fa957d6caccc12f0bf13bb5e267
Parents: 170c1ed
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu Aug 3 20:12:25 2017 +0200
Committer: Stephen Connolly <st...@gmail.com>
Committed: Thu Aug 31 10:21:35 2017 +0100

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c9a288d8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8ce59ed..761edbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,7 @@ under the License.
     <mockitoVersion>1.10.19</mockitoVersion>
     <plexusVersion>1.7.1</plexusVersion>
     <plexusInterpolationVersion>1.24</plexusInterpolationVersion>
-    <plexusUtilsVersion>3.0.24</plexusUtilsVersion>
+    <plexusUtilsVersion>3.1.0</plexusUtilsVersion>
     <guavaVersion>20.0</guavaVersion>
     <guiceVersion>4.0</guiceVersion>
     <sisuInjectVersion>0.3.3</sisuInjectVersion>


[17/49] maven git commit: Revert "[MNG-6275] Maven Embedder compatible fix"

Posted by hb...@apache.org.
Revert "[MNG-6275] Maven Embedder compatible fix"

This reverts commit 27a2bda3f4a8f5385c4cab360ed7365d3d3d3c09.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/cae779e4
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/cae779e4
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/cae779e4

Branch: refs/heads/MNG-6255
Commit: cae779e4fbc6565a581f2c6adf9fb15348005603
Parents: c19e9dc
Author: Stephen Connolly <st...@gmail.com>
Authored: Tue Oct 17 19:17:17 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Tue Oct 17 19:17:17 2017 +0100

----------------------------------------------------------------------
 .../classrealm/DefaultClassRealmManager.java    |   2 +-
 .../DefaultClassRealmManagerTest.java           | 107 -------------------
 2 files changed, 1 insertion(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/cae779e4/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index 013ab23..6ce1925 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -120,7 +120,7 @@ public class DefaultClassRealmManager
             {
                 try
                 {
-                    ClassRealm classRealm = world.newRealm( realmId, PARENT_CLASSLOADER );
+                    ClassRealm classRealm = world.newRealm( realmId, null );
 
                     if ( logger.isDebugEnabled() )
                     {

http://git-wip-us.apache.org/repos/asf/maven/blob/cae779e4/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
deleted file mode 100644
index 6d074b9..0000000
--- a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.apache.maven.classrealm;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ServiceLoader;
-
-import javax.script.ScriptEngineFactory;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Plugin;
-import org.codehaus.plexus.ContainerConfiguration;
-import org.codehaus.plexus.PlexusConstants;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.junit.Test;
-
-public class DefaultClassRealmManagerTest extends PlexusTestCase
-{
-    private ClassRealmManager classRealmManager;
-    private boolean haveScriptEngineFactory;
-
-    @Override
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
-        this.classRealmManager = lookup( ClassRealmManager.class );
-        ClassLoader testRealm = getClass().getClassLoader();
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, testRealm );
-        // TODO switch to Assume.assumeTrue( sef.iterator().hasNext() ) when PlexusTestCase
-        // supports assumptions. Not every Java 7 JRE has a ScriptEngineFactory.
-        this.haveScriptEngineFactory = sef.iterator().hasNext();
-    }
-
-    @Override
-    protected void customizeContainerConfiguration( ContainerConfiguration configuration )
-    {
-        configuration.setClassPathScanning( PlexusConstants.SCANNING_INDEX );
-    }
-
-    @Test
-    public void testMNG6275_pluginRealmDefaultParentClassLoader()
-    {
-        Plugin plugin = new Plugin();
-        plugin.setVersion( "VERSION" );
-        
-        ClassLoader parent = null;
-        
-        ClassRealm pluginRealm = classRealmManager.createPluginRealm( plugin, parent, null, null, null );
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, pluginRealm );
-        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_extensionRealmDefaultParentClassLoader()
-    {
-        Plugin extension = new Plugin();
-        extension.setVersion( "VERSION" );
-        
-        ClassRealm extensionRealm = classRealmManager.createExtensionRealm( extension, null );
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, extensionRealm );
-        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_projectRealmDefaultParentClassLoader()
-    {
-        Model model = new Model();
-        
-        ClassRealm projectRealm = classRealmManager.createProjectRealm( model, null );
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, projectRealm );
-        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_mavenApiRealmDefaultParentClassLoader()
-    {
-        ClassRealm mavenApiRealm = classRealmManager.getMavenApiRealm();
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, mavenApiRealm );
-        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
-    }
-
-    @Test
-    public void testMNG6275_coreRealmDefaultParentClassLoader()
-    {
-        ClassRealm coreRealm = classRealmManager.getCoreRealm();
-        ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, coreRealm );
-        assertEquals( haveScriptEngineFactory, sef.iterator().hasNext() );
-    }
-}