You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2017/01/31 03:01:04 UTC

[01/50] maven git commit: [MNG-5954] Remove outdated maven-embedder/src/main/resources/META-INF/MANIFEST.MF [Forced Update!]

Repository: maven
Updated Branches:
  refs/heads/MNG-5359 b20e9201c -> 72c605138 (forced update)


[MNG-5954] Remove outdated maven-embedder/src/main/resources/META-INF/MANIFEST.MF


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

Branch: refs/heads/MNG-5359
Commit: deefd9342b13f1fec786ddb00ff3b39299e6e11a
Parents: 355f4df
Author: Michael Osipov <mi...@apache.org>
Authored: Tue Dec 29 00:11:29 2015 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 22 21:37:57 2017 +0100

----------------------------------------------------------------------
 maven-embedder/src/main/resources/META-INF/MANIFEST.MF | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/deefd934/maven-embedder/src/main/resources/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/resources/META-INF/MANIFEST.MF b/maven-embedder/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 57576ed..0000000
--- a/maven-embedder/src/main/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Maven 2.x Embedder Plug-in
-Bundle-Vendor: maven.org
-Bundle-SymbolicName: org.maven.ide.embedder
-Bundle-Version: ${bundleVersion}
-Bundle-ClassPath: .


[26/50] maven git commit: [MNG-5931] Fixing documentation Removing references to ejb3-lifecycle and par-lifecycle cause they have been removed with Maven 3.3.9.

Posted by sc...@apache.org.
[MNG-5931] Fixing documentation
Removing references to ejb3-lifecycle and par-lifecycle
cause they have been removed with Maven 3.3.9.


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

Branch: refs/heads/MNG-5359
Commit: f20a5d940bf055ea49c5cc1ecbdba07a3a27fbe6
Parents: c794c2a
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Wed Nov 18 03:48:06 2015 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Wed Jan 25 21:30:02 2017 +0100

----------------------------------------------------------------------
 maven-core/src/site/apt/default-bindings.apt.vm | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f20a5d94/maven-core/src/site/apt/default-bindings.apt.vm
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/default-bindings.apt.vm b/maven-core/src/site/apt/default-bindings.apt.vm
index 02d6c4a..50c4654 100644
--- a/maven-core/src/site/apt/default-bindings.apt.vm
+++ b/maven-core/src/site/apt/default-bindings.apt.vm
@@ -42,10 +42,6 @@ Plugin Bindings for <<<default>>> Lifecycle Reference
 
 %{snippet|id=ejb-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Plugin bindings for <<<ejb3>>> packaging
-
-%{snippet|id=ejb3-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
-
 * Plugin bindings for <<<maven-plugin>>> packaging
 
 %{snippet|id=maven-plugin-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
@@ -62,6 +58,3 @@ Plugin Bindings for <<<default>>> Lifecycle Reference
 
 %{snippet|id=rar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Plugin bindings for <<<par>>> packaging
-
-%{snippet|id=par-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}


[37/50] maven git commit: [MNG-6092] warn if prerequisites.maven is used for non-plugin projects

Posted by sc...@apache.org.
[MNG-6092] warn if prerequisites.maven is used for non-plugin projects


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

Branch: refs/heads/MNG-5359
Commit: 4604c49ee442fef48c0d3efe35fb85d2f0784131
Parents: 017dcaf
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sat Oct 1 16:29:32 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sun Jan 29 21:16:35 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/DefaultMaven.java     | 62 +++++++++++++-------
 1 file changed, 41 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4604c49e/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index da17830..15b946e 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -42,6 +42,7 @@ import org.apache.maven.graph.GraphBuilder;
 import org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory;
 import org.apache.maven.lifecycle.internal.ExecutionEventCatapult;
 import org.apache.maven.lifecycle.internal.LifecycleStarter;
+import org.apache.maven.model.Prerequisites;
 import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.model.building.Result;
 import org.apache.maven.plugin.LegacySupport;
@@ -111,7 +112,7 @@ public class DefaultMaven
         }
         catch ( RuntimeException e )
         {
-            //TODO Hack to make the cycle detection the same for the new graph builder
+            // TODO Hack to make the cycle detection the same for the new graph builder
             if ( e.getCause() instanceof ProjectCycleException )
             {
                 result = addExceptionToResult( new DefaultMavenExecutionResult(), e.getCause() );
@@ -160,7 +161,7 @@ public class DefaultMaven
     //
     @SuppressWarnings( "checkstyle:methodlength" )
     private MavenExecutionResult doExecute( MavenExecutionRequest request )
-    {        
+    {
         request.setStartTime( new Date() );
 
         MavenExecutionResult result = new DefaultMavenExecutionResult();
@@ -203,11 +204,12 @@ public class DefaultMaven
     {
         try
         {
-            for ( AbstractMavenLifecycleParticipant listener : getLifecycleParticipants( Collections
-                .<MavenProject>emptyList() ) )
+            // CHECKSTYLE_OFF: LineLength
+            for ( AbstractMavenLifecycleParticipant listener : getLifecycleParticipants( Collections.<MavenProject>emptyList() ) )
             {
                 listener.afterSessionStart( session );
             }
+            // CHECKSTYLE_ON: LineLength
         }
         catch ( MavenExecutionException e )
         {
@@ -217,12 +219,11 @@ public class DefaultMaven
         eventCatapult.fire( ExecutionEvent.Type.ProjectDiscoveryStarted, session, null );
 
         Result<? extends ProjectDependencyGraph> graphResult = buildGraph( session, result );
-        
+
         if ( graphResult.hasErrors() )
         {
-            return addExceptionToResult( result,
-                                         Iterables.toArray( graphResult.getProblems(), ModelProblem.class )[0]
-                                             .getException() );
+            return addExceptionToResult( result, Iterables.toArray( graphResult.getProblems(),
+                                                                    ModelProblem.class )[0].getException() );
         }
 
         try
@@ -283,14 +284,13 @@ public class DefaultMaven
         // Note that participants may affect the topological order of the projects but it is
         // not expected that a participant will add or remove projects from the session.
         //
-        
+
         graphResult = buildGraph( session, result );
-        
+
         if ( graphResult.hasErrors() )
         {
-            return addExceptionToResult( result,
-                                         Iterables.toArray( graphResult.getProblems(), ModelProblem.class )[0]
-                                             .getException() );
+            return addExceptionToResult( result, Iterables.toArray( graphResult.getProblems(),
+                                                                    ModelProblem.class )[0].getException() );
         }
 
         try
@@ -304,6 +304,8 @@ public class DefaultMaven
 
             result.setProject( session.getTopLevelProject() );
 
+            validatePrerequisitesForNonMavenPluginProjects( session.getProjects() );
+
             lifecycleStarter.execute( session );
 
             validateActivatedProfiles( session.getProjects(), request.getActiveProfiles() );
@@ -346,7 +348,7 @@ public class DefaultMaven
             Thread.currentThread().setContextClassLoader( originalClassLoader );
         }
     }
-    
+
     public RepositorySystemSession newRepositorySession( MavenExecutionRequest request )
     {
         return repositorySessionFactory.newRepositorySession( request );
@@ -369,8 +371,7 @@ public class DefaultMaven
 
     private Collection<AbstractMavenLifecycleParticipant> getLifecycleParticipants( Collection<MavenProject> projects )
     {
-        Collection<AbstractMavenLifecycleParticipant> lifecycleListeners =
-            new LinkedHashSet<>();
+        Collection<AbstractMavenLifecycleParticipant> lifecycleListeners = new LinkedHashSet<>();
 
         ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
         try
@@ -425,6 +426,25 @@ public class DefaultMaven
         return result;
     }
 
+    private void validatePrerequisitesForNonMavenPluginProjects( List<MavenProject> projects )
+    {
+        for ( MavenProject mavenProject : projects )
+        {
+            if ( !"maven-plugin".equals( mavenProject.getPackaging() ) )
+            {
+                Prerequisites prerequisites = mavenProject.getPrerequisites();
+                if ( prerequisites != null && prerequisites.getMaven() != null )
+                {
+                    logger.warn( "The project " + mavenProject.getId() + " uses prerequisites"
+                        + " which is only intended for maven-plugin projects "
+                        + "but not for non maven-plugin projects. "
+                        + "For such purposes you should use the maven-enforcer-plugin. "
+                        + "See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html" );
+                }
+            }
+        }
+    }
+
     private void validateActivatedProfiles( List<MavenProject> projects, List<String> activeProfileIds )
     {
         Collection<String> notActivatedProfileIds = new LinkedHashSet<>( activeProfileIds );
@@ -486,7 +506,7 @@ public class DefaultMaven
         return index;
     }
 
-    private Result<? extends ProjectDependencyGraph> buildGraph( MavenSession session, MavenExecutionResult result ) 
+    private Result<? extends ProjectDependencyGraph> buildGraph( MavenSession session, MavenExecutionResult result )
     {
         Result<? extends ProjectDependencyGraph> graphResult = graphBuilder.build( session );
         for ( ModelProblem problem : graphResult.getProblems() )
@@ -506,12 +526,12 @@ public class DefaultMaven
             ProjectDependencyGraph projectDependencyGraph = graphResult.get();
             session.setProjects( projectDependencyGraph.getSortedProjects() );
             session.setAllProjects( projectDependencyGraph.getSortedProjects() );
-            session.setProjectDependencyGraph( projectDependencyGraph );                
+            session.setProjectDependencyGraph( projectDependencyGraph );
         }
-        
-        return graphResult;        
+
+        return graphResult;
     }
-    
+
     @Deprecated
     // 5 January 2014
     protected Logger getLogger()


[08/50] maven git commit: Jenkins file notification email title improvement

Posted by sc...@apache.org.
Jenkins file notification email title improvement

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

Branch: refs/heads/MNG-5359
Commit: 21d1bfb5a08ecf67a10b88a6fdbda98e7361376b
Parents: 94bc4de
Author: Herv� Boutemy <hb...@apache.org>
Authored: Mon Jan 23 23:11:22 2017 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 18:40:07 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/21d1bfb5/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 07ce2e6..5b82d78 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -131,7 +131,7 @@ parallel linuxJava7:{
     }
 } finally {
     node('ubuntu') {
-        emailext body: "See ${env.BUILD_URL}", recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'FailingTestSuspectsRecipientProvider'], [$class: 'FirstFailingBuildSuspectsRecipientProvider']], replyTo: 'dev@maven.apache.org', subject: "Maven Jenkinsfile finished with ${currentBuild.result}", to: 'notifications@maven.apache.org'
+        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'
     }
 }
 


[04/50] maven git commit: [MNG-6138] Remove obsolete message_*.properties form maven-core

Posted by sc...@apache.org.
[MNG-6138] Remove obsolete message_*.properties form maven-core


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

Branch: refs/heads/MNG-5359
Commit: 8373c79a47ce4f12e549ae817a9c5f9eae950fb8
Parents: c516ef7
Author: Michael Osipov <mi...@apache.org>
Authored: Thu Dec 22 22:39:00 2016 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 22 21:37:57 2017 +0100

----------------------------------------------------------------------
 .../apache/maven/messages/messages.properties   | 34 --------------------
 .../maven/messages/messages_de.properties       | 34 --------------------
 .../maven/messages/messages_el.properties       | 33 -------------------
 .../maven/messages/messages_en.properties       | 23 -------------
 .../maven/messages/messages_es.properties       | 33 -------------------
 .../maven/messages/messages_fr.properties       | 33 -------------------
 .../maven/messages/messages_ja.properties       | 34 --------------------
 .../maven/messages/messages_ko.properties       | 34 --------------------
 .../maven/messages/messages_nl.properties       | 33 -------------------
 .../maven/messages/messages_no.properties       | 33 -------------------
 .../maven/messages/messages_pl.properties       | 33 -------------------
 .../maven/messages/messages_zh_CN.properties    | 34 --------------------
 12 files changed, 391 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages.properties
deleted file mode 100644
index d576d7a..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages.properties
+++ /dev/null
@@ -1,34 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=WARNING: Failed to download {0}.
-remote.repository.disabled.warning=The use of the remote repository has been disabled.
-directory.nonexistant.warning=Directory {0} does not exist. Attempting to create.
-not.directory.warning={0} is not a directory.
-not.writable.warning={0} is not writable.
-cannot.create.directory.warning=Unable to create directory {0}
-maven.repo.local.unset.warning=maven.repo.local is not set.
-single.unsatisfied.dependency.error=The build cannot continue because of the following unsatisfied dependency:
-multiple.unsatisfied.dependency.error=The build cannot continue because of the following unsatisfied dependencies:
-offline.snapshot.warning=You are working offline so the build will continue, but {0} may be out of date!
-download.message=Attempting to download {0}.
-plugin.loading.error=The plugin {0} could not be loaded.
-empty.descriptor.error=The file {0} you specified has zero length.
-checksum.verification.error=The follow artifact is corrupt: {0}.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_de.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_de.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_de.properties
deleted file mode 100644
index d5c7dad..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_de.properties
+++ /dev/null
@@ -1,34 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=WARNUNG: Herunterladen von {0} fehlgeschlagen.
-remote.repository.disabled.warning=Verwendung entfernter Repositories deaktiviert.
-directory.nonexistant.warning=Verzeichnis {0} existiert nicht, es wird erstellt.
-not.directory.warning={0} ist kein Verzeichnis.
-not.writable.warning=Kann {0} nicht schreiben.
-cannot.create.directory.warning=Kann Verzeichnis {0} nicht erstellen.
-maven.repo.local.unset.warning=maven.repo.local ist nicht gesetzt.
-single.unsatisfied.dependency.error=Der Vorgang wurde aufgrund der folgenden nicht erf\u00FCllten Abh\u00E4ngigkeit abgebrochen:
-multiple.unsatisfied.dependency.error=Der Vorgang wurde aufgrund der folgenden nicht erf\u00FCllten Abh\u00E4ngigkeiten abgebrochen:
-offline.snapshot.warning={0} ist unter Umst\u00E4nden veraltet. Da Sie offline arbeiten, wird der Vorgang fortgesetzt.
-download.message=Versuche {0} herunterzuladen.
-plugin.loading.error=Kann Plugin {0} nicht laden.
-empty.descriptor.error=Datei {0} ist leer.
-checksum.verification.error=Artefakt {0} ist defekt.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_el.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_el.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_el.properties
deleted file mode 100644
index 40a239e..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_el.properties
+++ /dev/null
@@ -1,33 +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.
-
-# --------------------------------------------------------------------------
-# \u00c5\u00eb\u00e5\u00e3\u00ea\u00f4\u00de\u00f2 \u00d3\u00f7\u00e5\u00e4\u00df\u00ef\u00f5
-# --------------------------------------------------------------------------
-failed.download.warning=\u00d0\u00f1\u00ef\u00f3\u00f9\u00f7\u00de! \u00c1\u00e4\u00fd\u00ed\u00e1\u00f4\u00f9\u00ed \u00e7 \u00ec\u00e5\u00f4\u00e1\u00f6\u00ef\u00f1\u00dc \u00f4\u00ef\u00f5 {0}!
-remote.repository.disabled.warning=\u00c7 \u00f7\u00f1\u00de\u00f3\u00e7 \u00e1\u00f0\u00ef\u00ec\u00e1\u00ea\u00f1\u00f5\u00f3\u00ec\u00dd\u00ed\u00f9\u00ed \u00e1\u00f0\u00ef\u00e8\u00e7\u00ea\u00fe\u00ed \u00dd\u00f7\u00e5\u00e9 \u00e1\u00f0\u00e5\u00ed\u00e5\u00f1\u00e3\u00ef\u00f0\u00ef\u00e9\u00e7\u00e8\u00e5\u00df..
-directory.nonexistant.warning=\u00cf \u00ea\u00e1\u00f4\u00dc\u00eb\u00ef\u00e3\u00ef\u00f2 {0} \u00e4\u00e5\u00ed \u00f5\u00f0\u00dc\u00f1\u00f7\u00e5\u00e9! \u00c4\u00ef\u00ea\u00e9\u00ec\u00dc\u00e6\u00f9 \u00e4\u00e7\u00ec\u00e9\u00ef\u00fd\u00f1\u00e3\u00e7\u00f3\u00e7...
-not.directory.warning={0} \u00e4\u00e5\u00ed \u00e5\u00df\u00ed\u00e1\u00e9 \u00ea\u00e1\u00f4\u00dc\u00eb\u00ef\u00e3\u00ef\u00f2!
-not.writable.warning=\u00c1\u00e4\u00fd\u00ed\u00e1\u00f4\u00f9\u00ed \u00e7 \u00e4\u00e9\u00e5\u00e3\u00e3\u00f1\u00e1\u00f6\u00de \u00f3\u00f4\u00ef {0}!
-cannot.create.directory.warning=\u00c1\u00e4\u00fd\u00ed\u00e1\u00f4\u00f9\u00ed \u00e7 \u00e4\u00e7\u00ec\u00e9\u00ef\u00f5\u00f1\u00e3\u00e5\u00df\u00e1 \u00f4\u00ef\u00fd \u00ea\u00e1\u00f4\u00e1\u00eb\u00fc\u00e3\u00ef\u00f5 {0}!
-maven.repo.local.unset.warning=maven.repo.local \u00e4\u00e5\u00ed \u00dd\u00f7\u00e5\u00e9 \u00ef\u00f1\u00e9\u00f3\u00f4\u00e5\u00df.
-single.unsatisfied.dependency.error= \u00c7 \u00e4\u00e9\u00e1\u00e4\u00e9\u00ea\u00e1\u00f3\u00df\u00e1 \u00e4\u00e5\u00ed \u00ec\u00f0\u00ef\u00f1\u00e5\u00df \u00ed\u00e1 \u00f3\u00f5\u00ed\u00e5\u00f7\u00e9\u00f3\u00f4\u00e5\u00df! \u00cb\u00e5\u00df\u00f0\u00e5\u00e9 \u00e7 \u00e1\u00ea\u00fc\u00eb\u00ef\u00f5\u00e8\u00e7 \u00e5\u00ee\u00dc\u00f1\u00f4\u00e7\u00f3\u00e5\u00e9:
-multiple.unsatisfied.dependency.error=\u00c7 \u00e4\u00e9\u00e1\u00e4\u00e9\u00ea\u00e1\u00f3\u00df\u00e1 \u00e4\u00e5\u00ed \u00ec\u00f0\u00ef\u00f1\u00e5\u00df \u00ed\u00e1 \u00f3\u00f5\u00ed\u00e5\u00f7\u00e9\u00f3\u00f4\u00e5\u00df! \u00cb\u00e5\u00df\u00f0\u00ef\u00f5\u00ed \u00e7 \u00e1\u00ea\u00fc\u00eb\u00ef\u00f5\u00e8\u00e5\u00f2 \u00e5\u00ee\u00e1\u00f1\u00f4\u00de\u00f3\u00e5\u00e9\u00f2:
-offline.snapshot.warning=\u00c5\u00f1\u00e3\u00dc\u00e6\u00e5\u00f3\u00e1\u00e9 \u00e1\u00f0\u00ef\u00f3\u00f5\u00ed\u00e4\u00e5\u00e4\u00ef\u00ec\u00dd\u00ed\u00ef\u00f2! \u00c7 \u00e4\u00e9\u00e1\u00e4\u00e9\u00ea\u00e1\u00f3\u00df\u00e1 \u00e8\u00e1 \u00f3\u00f5\u00ed\u00e5\u00f7\u00df\u00f3\u00e5\u00e9 \u00e1\u00eb\u00eb\u00dc \u00e5\u00df\u00ed\u00e1\u00e9 \u00e4\u00f5\u00ed\u00e1\u00f4\u00fe\u00ed  {0} \u00ed\u00e1 \u00ec\u00e7\u00ed \u00e5\u00df\u00ed\u00e1\u00e9 \u00e5\u00ed\u00e7\u00ec\u00e5\u00f1\u00f9\u00ec\u00dd\u00ed\u00ef!
-download.message=\u00d0\u00f1\u00f9\u00f3\u00f0\u00e1\u00e8\u00fe \u00ed\u00e1 \u00ec\u00e5\u00f4\u00e1\u00f6\u00dd\u00f1\u00f9 {0}.
-plugin.loading.error=\u00c1\u00e4\u00fd\u00ed\u00e1\u00f4\u00f9\u00ed \u00ed\u00e1 \u00f6\u00ef\u00f1\u00f4\u00f9\u00e8\u00e5\u00df \u00f4\u00ef plugin {0}!
-empty.descriptor.error=\u00d4\u00ef \u00e1\u00f1\u00f7\u00e5\u00df\u00ef {0} \u00f0\u00ef\u00fd \u00ea\u00e1\u00e8\u00ef\u00f1\u00df\u00f3\u00e1\u00f4\u00e5 \u00dd\u00f7\u00e5\u00e9 \u00ec\u00dd\u00e3\u00e5\u00e8\u00ef\u00f2 \u00ec\u00e7\u00e4\u00dd\u00ed.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_en.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_en.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_en.properties
deleted file mode 100644
index aaf95bf..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_en.properties
+++ /dev/null
@@ -1,23 +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.
-
-# NOTE:
-# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
-# must be provided nevertheless such that a request for locale "en" will not erroneously pick up the bundle for the
-# JVM's default locale (which need not be "en"). See the method javadoc about
-#   ResourceBundle.getBundle(String, Locale, ClassLoader)
-# for a full description of the lookup strategy.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_es.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_es.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_es.properties
deleted file mode 100644
index d54395e..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_es.properties
+++ /dev/null
@@ -1,33 +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.
-
-# --------------------------------------------------------------------------
-# Verificador de Proyecto
-# --------------------------------------------------------------------------
-failed.download.warning=\u00a1ATENCION!: \u00a1Imposible descargar {0}!
-remote.repository.disabled.warning=El uso de repositorios remotos est\u00e1 desactivado..
-directory.nonexistant.warning=\u00a1El directorio {0} no existe! Intentando crear...
-not.directory.warning=\u00a1{0} no es un directorio!
-not.writable.warning=\u00a1Imposible escribir en {0}!
-cannot.create.directory.warning=\u00a1Imposible crear el directorio {0}!
-maven.repo.local.unset.warning=\u00a1maven.repo.local no est\u00e1 definido!
-single.unsatisfied.dependency.error=\u00a1El proceso no puede seguir! Falta la siguiente dependencia:
-multiple.unsatisfied.dependency.error=\u00a1El proceso no puede seguir! Faltan las siguientes dependencias:
-offline.snapshot.warning=\u00a1Est\u00e1s trabajando fuera de linea! \u00a1El proceso seguir\u00e1, pero es posible que {0} no est\u00e9 actualizado!
-download.message=Intentando descargar {0}.
-plugin.loading.error=\u00a1No se ha podido cargar el plugin {0}!
-empty.descriptor.error=El fichero especificado, {0} , tiene longitud cero.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_fr.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_fr.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_fr.properties
deleted file mode 100644
index 06eb48f..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_fr.properties
+++ /dev/null
@@ -1,33 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=ATTENTION: Impossible de t\u00e9l\u00e9charger {0}.
-remote.repository.disabled.warning=L'utilisation du d\u00e9p\u00f4t distant est d\u00e9sactiv\u00e9e.
-directory.nonexistant.warning=Le r\u00e9pertoire {0} n'existe pas. Tentative de cr\u00e9ation.
-not.directory.warning={0} n'est pas un r\u00e9pertoire.
-not.writable.warning=Impossible d'\u00e9crire sur {0}.
-cannot.create.directory.warning=Impossible de cr\u00e9er le r\u00e9pertoire {0}.
-maven.repo.local.unset.warning=maven.repo.local n'est pas d\u00e9fini.
-single.unsatisfied.dependency.error=Le processus ne peut continuer \u00e0 cause de la d\u00e9pendance manquante suivante:
-multiple.unsatisfied.dependency.error=Le processus ne peut continuer \u00e0 cause des d\u00e9pendances manquantes suivantes:
-offline.snapshot.warning=Vous travaillez hors-connexion, alors le processus va continuer, mais {0} peut ne pas \u00eatre \u00e0 jour!
-download.message=Tentative de t\u00e9l\u00e9chargement de {0}.
-plugin.loading.error=Impossible de charger le plugin {0}.
-empty.descriptor.error=Le fichier {0} que vous avez sp\u00e9cifi\u00e9 est vide.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_ja.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_ja.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_ja.properties
deleted file mode 100644
index e1b6566..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_ja.properties
+++ /dev/null
@@ -1,34 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=WARNING: {0} \u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f.
-remote.repository.disabled.warning=\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u7121\u52b9\u3067\u3059.
-directory.nonexistant.warning=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u304c\u5b58\u5728\u3057\u307e\u305b\u3093. \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059.
-not.directory.warning={0} \u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u306f\u3042\u308a\u307e\u305b\u3093.
-not.writable.warning={0} \u306f\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u3067\u306f\u3042\u308a\u307e\u305b\u3093.
-cannot.create.directory.warning=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093.
-maven.repo.local.unset.warning=maven.repo.local \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093.
-single.unsatisfied.dependency.error=\u4ee5\u4e0b\u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u6e80\u305f\u3055\u308c\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u30d3\u30eb\u30c9\u3092\u7d9a\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093:
-multiple.unsatisfied.dependency.error=\u4ee5\u4e0b\u306e\u3044\u304f\u3064\u304b\u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u6e80\u305f\u3055\u308c\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u30d3\u30eb\u30c9\u3092\u7d9a\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093:
-offline.snapshot.warning=\u30aa\u30d5\u30e9\u30a4\u30f3\u30e2\u30fc\u30c9\u3067\u30d3\u30eb\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059. {0} \u306f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5229\u7528\u3055\u308c\u307e\u3059.
-download.message={0} \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059.
-plugin.loading.error=\u30d7\u30e9\u30b0\u30a4\u30f3 {0} \u3092\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093.
-empty.descriptor.error=\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb {0} \u306f\u7a7a\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3059.
-checksum.verification.error=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8 {0} \u304c\u4e0d\u6b63\u3067\u3059.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_ko.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_ko.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_ko.properties
deleted file mode 100644
index b3f1efa..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_ko.properties
+++ /dev/null
@@ -1,34 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-cannot.create.directory.warning = \uB514\uB809\uD130\uB9AC {0} \uC744/\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-checksum.verification.error = \uB2E4\uC74C\uC758 \uC544\uB9AC\uD329\uD2B8(artifact)\uC5D0\uC11C \uC5D0\uB7EC\uAC00 \uBC1C\uC0DD\uD569\uB2C8\uB2E4: {0}
-directory.nonexistant.warning = \uB514\uB809\uD130\uB9AC {0} \uC774/\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0DD\uC131\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4.
-download.message = {0} \uC744/\uB97C \uB2E4\uC6B4\uB85C\uB4DC \uD569\uB2C8\uB2E4.
-empty.descriptor.error = \uD30C\uC77C {0} \uC758 \uAE38\uC774\uAC00 0\uC785\uB2C8\uB2E4.
-failed.download.warning = \uACBD\uACE0: {0} \uC744/\uB97C \uB2E4\uC6B4\uB85C\uB4DC \uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.
-maven.repo.local.unset.warning = maven.repo.local \uC774 \uC124\uC815\uB418\uC5B4\uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-multiple.unsatisfied.dependency.error = \uB2E4\uC74C\uC758 \uC758\uC874\uC131\uB4E4\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uBABB\uD588\uAE30 \uB54C\uBB38\uC5D0, \uBE4C\uB4DC\uB97C \uACC4\uC18D \uC9C4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-not.directory.warning = {0} \uC740/\uB294 \uB514\uB809\uD130\uB9AC\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-not.writable.warning  = {0} \uC740/\uB294 \uC4F0\uAE30\uB97C \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-offline.snapshot.warning = \uC624\uD504\uB77C\uC778\uC73C\uB85C \uC791\uC5C5\uD558\uACE0 \uC788\uAE30 \uB54C\uBB38\uC5D0 \uBE4C\uB4DC\uB294 \uACC4\uC18D \uC9C4\uD589\uD558\uC9C0\uB9CC, {0} \uC740/\uB294 \uCD5C\uC2E0 \uBC84\uC804\uC774 \uC544\uB2D0 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4!
-plugin.loading.error = \uD50C\uB7EC\uADF8\uC778 {0} \uC744/\uB97C \uC77D\uC5B4\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-remote.repository.disabled.warning = \uC6D0\uACA9 \uC800\uC7A5\uC18C \uC0AC\uC6A9\uC744 \uD5C8\uAC00\uD558\uC9C0 \uC54A\uC740(disabled) \uC0C1\uD0DC\uC785\uB2C8\uB2E4.
-single.unsatisfied.dependency.error = \uB2E4\uC74C\uC758 \uC758\uC874\uC131\uB4E4\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uBABB\uD588\uAE30 \uB54C\uBB38\uC5D0, \uBE4C\uB4DC\uB97C \uACC4\uC18D \uC9C4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_nl.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_nl.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_nl.properties
deleted file mode 100644
index 0e22d6c..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_nl.properties
+++ /dev/null
@@ -1,33 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=WAARSCHUWING: Kan {0} niet downloaden.
-remote.repository.disabled.warning=Het gebruik van de remote repository is uitgezet.
-directory.nonexistant.warning=Directory {0} bestaat niet. Probeer hem aan te maken.
-not.directory.warning={0} is geen  directory.
-not.writable.warning={0} is niet schrijfbaar.
-cannot.create.directory.warning=Kan {0} directory niet aanmaken
-maven.repo.local.unset.warning=maven.repo.local is niet ingesteld.
-single.unsatisfied.dependency.error=Het bouwen kan niet doorgaan, omdat de volgende afhankelijkheid niet achterhaald kan worden:
-multiple.unsatisfied.dependency.error=Het bouwen kan niet doorgaan, omdat de volgende afhankelijkheden niet achterhaald kunnen worden:
-offline.snapshot.warning=Je werkt offline, dus het bouwen gaat verder, maar {0} kan eventueel niet up-to-date zijn!
-download.message=Probeer {0} te downloaden.
-plugin.loading.error=De {0} plugin kan niet worden geladen.
-empty.descriptor.error=The {0} file you specified has zero length.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_no.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_no.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_no.properties
deleted file mode 100644
index af320f6..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_no.properties
+++ /dev/null
@@ -1,33 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=ADVARSEL: Mislykket nedlasting av {0}.
-remote.repository.disabled.warning=Bruk av fjernlager er deaktivert.
-directory.nonexistant.warning=Mappen {0} finnes ikke. Fors\u00f8ker \u00e5 opprette.
-not.directory.warning={0} er ikke en mappe.
-not.writable.warning=Kan ikke skirve til {0}.
-cannot.create.directory.warning=Kan ikke opprette mappen {0}.
-maven.repo.local.unset.warning=maven.repo.local er ikke definert.
-single.unsatisfied.dependency.error=Byggeprosessen kan ikke fortsette p\u00e5 grunn av f\u00f8lgende mislykkede avhengighet:
-multiple.unsatisfied.dependency.error=The build cannot continue because of the following unsatisfied dependencies:
-offline.snapshot.warning=Du arbeider frakoblet. Byggeprosessen vil fortsette, men {0} kan bli utdatert!
-download.message=Fors\u00f8ker \u00e5 laste ned {0}.
-plugin.loading.error=Plugin {0} kunne ikke lastes.
-empty.descriptor.error=The {0} file you specified has zero length.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_pl.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_pl.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_pl.properties
deleted file mode 100644
index 36a292b..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_pl.properties
+++ /dev/null
@@ -1,33 +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.
-
-# --------------------------------------------------------------------------
-# Project Verifier
-# --------------------------------------------------------------------------
-failed.download.warning=UWAGA: Nie uda\u0142o si\u0119 sci\u0105gn\u0105\u0107 {0}.
-remote.repository.disabled.warning=Korzystanie ze zdalnego repozytorium jest wy\u0142\u0105czone.
-directory.nonexistant.warning=Katalog {0} nie istnieje. Pr\u00f3buj\u0119 utworzy\u0107.
-not.directory.warning={0} nie jest katalogiem.
-not.writable.warning=Nie mo\u017cesz zapisa\u0107 {0}.
-cannot.create.directory.warning=Nie mo\u017cesz utworzy\u0107 katalogu {0}.
-maven.repo.local.unset.warning=maven.repo.local nie jest zdefiniowane.
-single.unsatisfied.dependency.error=Budownaie przerwane z powodu nast\u0119puj\u0105cej niespe\u0142nionej zale\u017cno\u015bci:
-multiple.unsatisfied.dependency.error=Budownaie przerwane z powodu nast\u0119puj\u0105cych niespe\u0142nionych zale\u017cno\u015bci:
-offline.snapshot.warning=Pracujesz w trybie offline, wi\u0119c budowanie b\u0119dzie kontunuowane, cho\u0107 {0} mo\u017ce by\u0107 nieaktualny!
-download.message=Pr\u00f3buj\u0119 \u015bci\u0105gn\u0105\u0107 {0}.
-plugin.loading.error=Nie uda\u0142o si\u0119 za\u0142adowa\u0107 pluginu {0}.
-empty.descriptor.error=The {0} file you specified has zero length.

http://git-wip-us.apache.org/repos/asf/maven/blob/8373c79a/maven-core/src/main/resources/org/apache/maven/messages/messages_zh_CN.properties
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/org/apache/maven/messages/messages_zh_CN.properties b/maven-core/src/main/resources/org/apache/maven/messages/messages_zh_CN.properties
deleted file mode 100644
index 9369518..0000000
--- a/maven-core/src/main/resources/org/apache/maven/messages/messages_zh_CN.properties
+++ /dev/null
@@ -1,34 +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.
-
-# --------------------------------------------------------------------------
-# \u9879\u76ee\u9a8c\u8bc1
-# --------------------------------------------------------------------------
-failed.download.warning=\u8b66\u544a\uff1a {0} \u4e0b\u8f7d\u5931\u8d25\u3002
-remote.repository.disabled.warning=\u7981\u6b62\u4f7f\u7528\u8fdc\u7a0b\u8d44\u6e90\u4ed3\u5e93\u3002
-directory.nonexistant.warning=\u76ee\u5f55 {0} \u4e0d\u5b58\u5728\u3002 \u5c1d\u8bd5\u65b0\u5efa\u4e2d\u2026\u2026
-not.directory.warning={0} \u4e0d\u662f\u76ee\u5f55\u3002
-not.writable.warning={0} \u53ea\u8bfb\u3002
-cannot.create.directory.warning=\u521b\u5efa\u76ee\u5f55 {0} \u5931\u8d25\u3002
-maven.repo.local.unset.warning=\u6ca1\u6709\u8bbe\u7f6e maven.repo.local \u5c5e\u6027\u3002
-single.unsatisfied.dependency.error=\u7531\u4e8e\u4ee5\u4e0b\u7684\u4f9d\u8d56\u7f3a\u5c11\uff0c\u521b\u5efa\u4e0d\u80fd\u8fdb\u884c\uff1a
-multiple.unsatisfied.dependency.error=\u7531\u4e8e\u4ee5\u4e0b\u7684\u4f9d\u8d56\u7f3a\u5c11\uff0c\u521b\u5efa\u4e0d\u80fd\u8fdb\u884c\uff1a
-offline.snapshot.warning=\u79bb\u7ebf\u65f6\u521b\u5efa\uff0c\u53ef\u80fd  {0} \u8fc7\u671f\uff01
-download.message=\u5c1d\u8bd5\u4e0b\u8f7d {0}\u2026\u2026
-plugin.loading.error=\u88c5\u5165 plugin {0} \u5931\u8d25\u3002
-empty.descriptor.error=\u6587\u4ef6 {0} \u7684\u957f\u5ea6\u4e3a0\u3002
-checksum.verification.error=\u4ee5\u4e0b\u8d44\u6e90\u5df2\u88ab\u7834\u574f\uff1a{0}\u3002


[36/50] maven git commit: [MNG-5993] Confusing error message in case of missing/empty artifactId/groupId and version in pluginManagement

Posted by sc...@apache.org.
[MNG-5993] Confusing error message in case of missing/empty
 artifactId/groupId and version in pluginManagement


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

Branch: refs/heads/MNG-5359
Commit: 017dcaf22a2cc1c6361dc64a02d1bdbdb799b95e
Parents: 065281c
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Fri Apr 1 22:53:37 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sun Jan 29 21:12:49 2017 +0100

----------------------------------------------------------------------
 .../internal/LifecyclePluginResolver.java       |  12 +-
 .../internal/DefaultPluginVersionResolver.java  |   6 +-
 .../model/validation/DefaultModelValidator.java | 170 +++++++++++--------
 .../validation/DefaultModelValidatorTest.java   |  73 ++++++--
 .../missing-artifactId-pluginManagement.xml     |  39 +++++
 .../raw-model/missing-ga-pluginManagement.xml   |  39 +++++
 .../missing-groupId-pluginManagement.xml        |  39 +++++
 .../missing-plugin-version-pluginManagement.xml |  40 +++++
 8 files changed, 321 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
index 956e717..f02552a 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java
@@ -19,6 +19,9 @@ package org.apache.maven.lifecycle.internal;
  * under the License.
  */
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginManagement;
@@ -30,9 +33,6 @@ import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * @since 3.0
  * @author Benjamin Bentmann
@@ -46,7 +46,6 @@ public class LifecyclePluginResolver
     @Requirement
     private PluginVersionResolver pluginVersionResolver;
 
-
     public LifecyclePluginResolver( PluginVersionResolver pluginVersionResolver )
     {
         this.pluginVersionResolver = pluginVersionResolver;
@@ -65,9 +64,8 @@ public class LifecyclePluginResolver
         {
             if ( plugin.getVersion() == null )
             {
-                PluginVersionRequest request =
-                    new DefaultPluginVersionRequest( plugin, session.getRepositorySession(),
-                                                     project.getRemotePluginRepositories() );
+                PluginVersionRequest request = new DefaultPluginVersionRequest( plugin, session.getRepositorySession(),
+                                                                                project.getRemotePluginRepositories() );
                 plugin.setVersion( pluginVersionResolver.resolve( request ).getVersion() );
             }
             versions.put( plugin.getKey(), plugin.getVersion() );

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
index f11ee95..82e32fb 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
@@ -87,8 +87,6 @@ public class DefaultPluginVersionResolver
     public PluginVersionResult resolve( PluginVersionRequest request )
         throws PluginVersionResolutionException
     {
-        logger.debug( "Resolving plugin version for " + request.getGroupId() + ":" + request.getArtifactId() );
-
         PluginVersionResult result = resolveFromProject( request );
 
         if ( result == null )
@@ -103,8 +101,8 @@ public class DefaultPluginVersionResolver
         }
         else if ( logger.isDebugEnabled() )
         {
-            logger.debug( "Resolved plugin version for " + request.getGroupId() + ":" + request.getArtifactId()
-                + " to " + result.getVersion() + " from POM " + request.getPom() );
+            logger.debug( "Resolved plugin version for " + request.getGroupId() + ":" + request.getArtifactId() + " to "
+                + result.getVersion() + " from POM " + request.getPom() );
         }
 
         return result;

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/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 1d3a0f6..cea2a74 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
@@ -83,17 +83,18 @@ public class DefaultModelValidator
             validateStringNotEmpty( "parent.groupId", problems, Severity.FATAL, Version.BASE, parent.getGroupId(),
                                     parent );
 
-            validateStringNotEmpty( "parent.artifactId", problems, Severity.FATAL, Version.BASE,
-                                    parent.getArtifactId(), parent );
+            validateStringNotEmpty( "parent.artifactId", problems, Severity.FATAL, Version.BASE, parent.getArtifactId(),
+                                    parent );
 
             validateStringNotEmpty( "parent.version", problems, Severity.FATAL, Version.BASE, parent.getVersion(),
                                     parent );
 
-            if ( equals( parent.getGroupId(), m.getGroupId() )
-                && equals( parent.getArtifactId(), m.getArtifactId() ) )
+            if ( equals( parent.getGroupId(), m.getGroupId() ) && equals( parent.getArtifactId(), m.getArtifactId() ) )
             {
-                addViolation( problems, Severity.FATAL, Version.BASE, "parent.artifactId", null, "must be changed"
-                    + ", the parent element cannot have the same groupId:artifactId as the project.", parent );
+                addViolation( problems, Severity.FATAL, Version.BASE, "parent.artifactId", null,
+                              "must be changed"
+                                  + ", the parent element cannot have the same groupId:artifactId as the project.",
+                              parent );
             }
         }
 
@@ -101,6 +102,14 @@ public class DefaultModelValidator
         {
             Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
+            // [MNG-6074] Maven should produce an error if no model version has been set in a POM file used to build an
+            // effective model.
+            //
+            // As of 3.4, the model version is mandatory even in raw models. The XML element still is optional in the
+            // XML schema and this will not change anytime soon. We do not want to build effective models based on
+            // models without a version starting with 3.4.
+            validateStringNotEmpty( "modelVersion", problems, Severity.ERROR, Version.V20, m.getModelVersion(), m );
+
             validateEnum( "modelVersion", problems, Severity.ERROR, Version.V20, m.getModelVersion(), null, m,
                           "4.0.0" );
 
@@ -157,23 +166,23 @@ public class DefaultModelValidator
                                   "must be unique but found duplicate profile with id " + profile.getId(), profile );
                 }
 
-                validate30RawProfileActivation( problems, profile.getActivation(), profile.getId(), prefix
-                    + ".activation", request );
+                validate30RawProfileActivation( problems, profile.getActivation(), profile.getId(),
+                                                prefix + ".activation", request );
 
                 validate20RawDependencies( problems, profile.getDependencies(), prefix + ".dependencies.dependency",
-                                         request );
+                                           request );
 
                 if ( profile.getDependencyManagement() != null )
                 {
-                    validate20RawDependencies( problems, profile.getDependencyManagement().getDependencies(), prefix
-                        + ".dependencyManagement.dependencies.dependency", request );
+                    validate20RawDependencies( problems, profile.getDependencyManagement().getDependencies(),
+                                               prefix + ".dependencyManagement.dependencies.dependency", request );
                 }
 
                 validateRawRepositories( problems, profile.getRepositories(), prefix + ".repositories.repository",
-                                      request );
+                                         request );
 
-                validateRawRepositories( problems, profile.getPluginRepositories(), prefix
-                    + ".pluginRepositories.pluginRepository", request );
+                validateRawRepositories( problems, profile.getPluginRepositories(),
+                                         prefix + ".pluginRepositories.pluginRepository", request );
 
                 BuildBase buildBase = profile.getBuild();
                 if ( buildBase != null )
@@ -184,7 +193,7 @@ public class DefaultModelValidator
                     if ( mngt != null )
                     {
                         validate20RawPlugins( problems, mngt.getPlugins(), prefix + ".pluginManagement.plugins.plugin",
-                                            request );
+                                              request );
                     }
                 }
             }
@@ -223,11 +232,8 @@ public class DefaultModelValidator
 
             if ( path.contains( "${project.basedir}" ) )
             {
-                addViolation( problems,
-                              Severity.WARNING,
-                              Version.V30,
-                              prefix + ( missing ? ".file.missing" : ".file.exists" ),
-                              null,
+                addViolation( problems, Severity.WARNING, Version.V30,
+                              prefix + ( missing ? ".file.missing" : ".file.exists" ), null,
                               "Failed to interpolate file location " + path + " for profile " + sourceHint
                                   + ": ${project.basedir} expression not supported during profile activation, "
                                   + "use ${basedir} instead",
@@ -235,15 +241,9 @@ public class DefaultModelValidator
             }
             else if ( hasProjectExpression( path ) )
             {
-                addViolation( problems,
-                              Severity.WARNING,
-                              Version.V30,
-                              prefix + ( missing ? ".file.missing" : ".file.exists" ),
-                              null,
-                              "Failed to interpolate file location "
-                                  + path
-                                  + " for profile "
-                                  + sourceHint
+                addViolation( problems, Severity.WARNING, Version.V30,
+                              prefix + ( missing ? ".file.missing" : ".file.exists" ), null,
+                              "Failed to interpolate file location " + path + " for profile " + sourceHint
                                   + ": ${project.*} expressions are not supported during profile activation",
                               file.getLocation( missing ? "missing" : "exists" ) );
             }
@@ -251,7 +251,7 @@ public class DefaultModelValidator
     }
 
     private void validate20RawPlugins( ModelProblemCollector problems, List<Plugin> plugins, String prefix,
-                                     ModelBuildingRequest request )
+                                       ModelBuildingRequest request )
     {
         Severity errOn31 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );
 
@@ -259,6 +259,27 @@ public class DefaultModelValidator
 
         for ( Plugin plugin : plugins )
         {
+            if ( plugin.getGroupId() == null
+                || ( plugin.getGroupId() != null && plugin.getGroupId().trim().isEmpty() ) )
+            {
+                addViolation( problems, Severity.FATAL, Version.V20, prefix + ".(groupId:artifactId)", null,
+                              "groupId of a plugin must be defined. ", plugin );
+            }
+
+            if ( plugin.getArtifactId() == null
+                || ( plugin.getArtifactId() != null && plugin.getArtifactId().trim().isEmpty() ) )
+            {
+                addViolation( problems, Severity.FATAL, Version.V20, prefix + ".(groupId:artifactId)", null,
+                              "artifactId of a plugin must be defined. ", plugin );
+            }
+
+            // This will catch cases like <version></version> or <version/>
+            if ( plugin.getVersion() != null && plugin.getVersion().trim().isEmpty() )
+            {
+                addViolation( problems, Severity.FATAL, Version.V20, prefix + ".(groupId:artifactId)", null,
+                              "version of a plugin must be defined. ", plugin );
+            }
+
             String key = plugin.getKey();
 
             Plugin existing = index.get( key );
@@ -279,9 +300,9 @@ public class DefaultModelValidator
             {
                 if ( !executionIds.add( exec.getId() ) )
                 {
-                    addViolation( problems, Severity.ERROR, Version.V20, prefix + "[" + plugin.getKey()
-                        + "].executions.execution.id", null, "must be unique but found duplicate execution with id "
-                        + exec.getId(), exec );
+                    addViolation( problems, Severity.ERROR, Version.V20,
+                                  prefix + "[" + plugin.getKey() + "].executions.execution.id", null,
+                                  "must be unique but found duplicate execution with id " + exec.getId(), exec );
                 }
             }
         }
@@ -302,9 +323,8 @@ public class DefaultModelValidator
         {
             if ( !"pom".equals( m.getPackaging() ) )
             {
-                addViolation( problems, Severity.ERROR, Version.BASE, "packaging", null,
-                              "with value '" + m.getPackaging() + "' is invalid. Aggregator projects "
-                                  + "require 'pom' as packaging.", m );
+                addViolation( problems, Severity.ERROR, Version.BASE, "packaging", null, "with value '"
+                    + m.getPackaging() + "' is invalid. Aggregator projects " + "require 'pom' as packaging.", m );
             }
 
             for ( int i = 0, n = m.getModules().size(); i < n; i++ )
@@ -364,8 +384,8 @@ public class DefaultModelValidator
                     validate20PluginVersion( "build.plugins.plugin.version", problems, p.getVersion(), p.getKey(), p,
                                              request );
 
-                    validateBoolean( "build.plugins.plugin.inherited", problems, errOn30, Version.V20,
-                                     p.getInherited(), p.getKey(), p );
+                    validateBoolean( "build.plugins.plugin.inherited", problems, errOn30, Version.V20, p.getInherited(),
+                                     p.getKey(), p );
 
                     validateBoolean( "build.plugins.plugin.extensions", problems, errOn30, Version.V20,
                                      p.getExtensions(), p.getKey(), p );
@@ -414,7 +434,7 @@ public class DefaultModelValidator
                 validate20EffectiveRepository( problems, distMgmt.getRepository(), "distributionManagement.repository",
                                                request );
                 validate20EffectiveRepository( problems, distMgmt.getSnapshotRepository(),
-                                    "distributionManagement.snapshotRepository", request );
+                                               "distributionManagement.snapshotRepository", request );
             }
         }
     }
@@ -458,7 +478,8 @@ public class DefaultModelValidator
                     {
                         addViolation( problems, Severity.WARNING, Version.V20, prefix + ".systemPath", key,
                                       "should not point at files within the project directory, " + sysPath
-                                          + " will be unresolvable by dependent projects", dependency );
+                                          + " will be unresolvable by dependent projects",
+                                      dependency );
                     }
                 }
             }
@@ -470,15 +491,13 @@ public class DefaultModelValidator
                 String msg;
                 if ( equals( existing.getVersion(), dependency.getVersion() ) )
                 {
-                    msg =
-                        "duplicate declaration of version "
-                            + StringUtils.defaultString( dependency.getVersion(), "(?)" );
+                    msg = "duplicate declaration of version "
+                        + StringUtils.defaultString( dependency.getVersion(), "(?)" );
                 }
                 else
                 {
-                    msg =
-                        "version " + StringUtils.defaultString( existing.getVersion(), "(?)" ) + " vs "
-                            + StringUtils.defaultString( dependency.getVersion(), "(?)" );
+                    msg = "version " + StringUtils.defaultString( existing.getVersion(), "(?)" ) + " vs "
+                        + StringUtils.defaultString( dependency.getVersion(), "(?)" );
                 }
 
                 addViolation( problems, errOn31, Version.V20, prefix + ".(groupId:artifactId:type:classifier)", null,
@@ -513,8 +532,8 @@ public class DefaultModelValidator
                                      d.getManagementKey(), d );
 
                     /*
-                     * TODO: Extensions like Flex Mojos use custom scopes like "merged", "internal", "external", etc.
-                     * In order to don't break backward-compat with those, only warn but don't error out.
+                     * TODO: Extensions like Flex Mojos use custom scopes like "merged", "internal", "external", etc. In
+                     * order to don't break backward-compat with those, only warn but don't error out.
                      */
                     validateEnum( prefix + "scope", problems, Severity.WARNING, Version.V20, d.getScope(),
                                   d.getManagementKey(), d, "provided", "compile", "runtime", "test", "system" );
@@ -591,8 +610,8 @@ public class DefaultModelValidator
                     {
                         msg += ". Please verify that you run Maven using a JDK and not just a JRE.";
                     }
-                    addViolation( problems, Severity.WARNING, Version.BASE, prefix + "systemPath",
-                                  d.getManagementKey(), msg, d );
+                    addViolation( problems, Severity.WARNING, Version.BASE, prefix + "systemPath", d.getManagementKey(),
+                                  msg, d );
                 }
             }
         }
@@ -628,7 +647,7 @@ public class DefaultModelValidator
     }
 
     /**
-     * @since 3.2.4 
+     * @since 3.2.4
      */
     protected void validateDependencyVersion( ModelProblemCollector problems, Dependency d, String prefix )
     {
@@ -637,7 +656,7 @@ public class DefaultModelValidator
     }
 
     private void validateRawRepositories( ModelProblemCollector problems, List<Repository> repositories, String prefix,
-                                       ModelBuildingRequest request )
+                                          ModelBuildingRequest request )
     {
         Map<String, Repository> index = new HashMap<>();
 
@@ -657,9 +676,8 @@ public class DefaultModelValidator
             {
                 Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
-                addViolation( problems, errOn30, Version.V20, prefix + ".id", null,
-                              "must be unique: " + repository.getId() + " -> " + existing.getUrl() + " vs "
-                                  + repository.getUrl(), repository );
+                addViolation( problems, errOn30, Version.V20, prefix + ".id", null, "must be unique: "
+                    + repository.getId() + " -> " + existing.getUrl() + " vs " + repository.getUrl(), repository );
             }
             else
             {
@@ -669,7 +687,7 @@ public class DefaultModelValidator
     }
 
     private void validate20EffectiveRepository( ModelProblemCollector problems, Repository repository, String prefix,
-                                     ModelBuildingRequest request )
+                                                ModelBuildingRequest request )
     {
         if ( repository != null )
         {
@@ -680,9 +698,10 @@ public class DefaultModelValidator
 
             if ( "local".equals( repository.getId() ) )
             {
-                addViolation( problems, errOn31, Version.V20, prefix + ".id", null, "must not be 'local'"
-                    + ", this identifier is reserved for the local repository"
-                    + ", using it for other repositories will corrupt your repository metadata.", repository );
+                addViolation( problems, errOn31, Version.V20, prefix + ".id", null,
+                              "must not be 'local'" + ", this identifier is reserved for the local repository"
+                                  + ", using it for other repositories will corrupt your repository metadata.",
+                              repository );
             }
 
             if ( "legacy".equals( repository.getLayout() ) )
@@ -694,7 +713,7 @@ public class DefaultModelValidator
     }
 
     private void validate20RawResources( ModelProblemCollector problems, List<Resource> resources, String prefix,
-                                    ModelBuildingRequest request )
+                                         ModelBuildingRequest request )
     {
         Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
 
@@ -730,8 +749,8 @@ public class DefaultModelValidator
             boolean match = ID_REGEX.matcher( id ).matches();
             if ( !match )
             {
-                addViolation( problems, severity, version, fieldName, sourceHint, "with value '" + id
-                    + "' does not match a valid id pattern.", tracker );
+                addViolation( problems, severity, version, fieldName, sourceHint,
+                              "with value '" + id + "' does not match a valid id pattern.", tracker );
             }
             return match;
         }
@@ -750,14 +769,13 @@ public class DefaultModelValidator
             boolean match = ID_WITH_WILDCARDS_REGEX.matcher( id ).matches();
             if ( !match )
             {
-                addViolation( problems, severity, version, fieldName, sourceHint, "with value '" + id
-                    + "' does not match a valid id pattern.", tracker );
+                addViolation( problems, severity, version, fieldName, sourceHint,
+                              "with value '" + id + "' does not match a valid id pattern.", tracker );
             }
             return match;
         }
     }
 
-
     private boolean validateStringNoExpression( String fieldName, ModelProblemCollector problems, Severity severity,
                                                 Version version, String string, InputLocationTracker tracker )
     {
@@ -876,8 +894,8 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, version, fieldName, sourceHint, "must be 'true' or 'false' but is '" + string
-            + "'.", tracker );
+        addViolation( problems, severity, version, fieldName, sourceHint,
+                      "must be 'true' or 'false' but is '" + string + "'.", tracker );
 
         return false;
     }
@@ -898,8 +916,8 @@ public class DefaultModelValidator
             return true;
         }
 
-        addViolation( problems, severity, version, fieldName, sourceHint, "must be one of " + values + " but is '"
-            + string + "'.", tracker );
+        addViolation( problems, severity, version, fieldName, sourceHint,
+                      "must be one of " + values + " but is '" + string + "'.", tracker );
 
         return false;
     }
@@ -916,7 +934,8 @@ public class DefaultModelValidator
                 {
                     addViolation( problems, severity, version, fieldName, sourceHint,
                                   "must not contain any of these characters " + banned + " but found "
-                                      + string.charAt( i ), tracker );
+                                      + string.charAt( i ),
+                                  tracker );
                     return false;
                 }
             }
@@ -983,8 +1002,8 @@ public class DefaultModelValidator
 
         if ( string.length() <= 0 || "RELEASE".equals( string ) || "LATEST".equals( string ) )
         {
-            addViolation( problems, errOn30, Version.V20, fieldName, sourceHint, "must be a valid version but is '"
-                + string + "'.", tracker );
+            addViolation( problems, errOn30, Version.V20, fieldName, sourceHint,
+                          "must be a valid version but is '" + string + "'.", tracker );
             return false;
         }
 
@@ -1005,8 +1024,11 @@ public class DefaultModelValidator
 
         buffer.append( ' ' ).append( message );
 
-        problems.add( new ModelProblemCollectorRequest( severity, version )
-            .setMessage( buffer.toString() ).setLocation( getLocation( fieldName, tracker ) ) );
+        // CHECKSTYLE_OFF: LineLength
+        problems.add( new ModelProblemCollectorRequest( severity,
+                                                        version ).setMessage( buffer.toString() ).setLocation( getLocation( fieldName,
+                                                                                                                            tracker ) ) );
+        // CHECKSTYLE_ON: LineLength
     }
 
     private static InputLocation getLocation( String fieldName, InputLocationTracker tracker )

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/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 dde532d..8525476 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
@@ -163,7 +163,8 @@ public class DefaultModelValidatorTest
 
         assertEquals( "'groupId' with value 'o/a/m' does not match a valid id pattern.", result.getErrors().get( 0 ) );
 
-        assertEquals( "'artifactId' with value 'm$-do$' does not match a valid id pattern.", result.getErrors().get( 1 ) );
+        assertEquals( "'artifactId' with value 'm$-do$' does not match a valid id pattern.",
+                      result.getErrors().get( 1 ) );
     }
 
     public void testMissingType()
@@ -203,8 +204,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).contains(
-            "'dependencies.dependency.artifactId' for groupId:null:jar is missing" ) );
+        assertTrue( result.getErrors().get( 0 ).contains( "'dependencies.dependency.artifactId' for groupId:null:jar is missing" ) );
     }
 
     public void testMissingDependencyGroupId()
@@ -214,8 +214,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).contains(
-            "'dependencies.dependency.groupId' for null:artifactId:jar is missing" ) );
+        assertTrue( result.getErrors().get( 0 ).contains( "'dependencies.dependency.groupId' for null:artifactId:jar is missing" ) );
     }
 
     public void testMissingDependencyVersion()
@@ -225,8 +224,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).contains(
-            "'dependencies.dependency.version' for groupId:artifactId:jar is missing" ) );
+        assertTrue( result.getErrors().get( 0 ).contains( "'dependencies.dependency.version' for groupId:artifactId:jar is missing" ) );
     }
 
     public void testMissingDependencyManagementArtifactId()
@@ -236,8 +234,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).contains(
-            "'dependencyManagement.dependencies.dependency.artifactId' for groupId:null:jar is missing" ) );
+        assertTrue( result.getErrors().get( 0 ).contains( "'dependencyManagement.dependencies.dependency.artifactId' for groupId:null:jar is missing" ) );
     }
 
     public void testMissingDependencyManagementGroupId()
@@ -247,8 +244,7 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 1, 0 );
 
-        assertTrue( result.getErrors().get( 0 ).contains(
-            "'dependencyManagement.dependencies.dependency.groupId' for null:artifactId:jar is missing" ) );
+        assertTrue( result.getErrors().get( 0 ).contains( "'dependencyManagement.dependencies.dependency.groupId' for null:artifactId:jar is missing" ) );
     }
 
     public void testMissingAll()
@@ -555,7 +551,8 @@ public class DefaultModelValidatorTest
     public void testBadDependencyExclusionId()
         throws Exception
     {
-        SimpleProblemCollector result = validateEffective( "bad-dependency-exclusion-id.xml", ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 );
+        SimpleProblemCollector result =
+            validateEffective( "bad-dependency-exclusion-id.xml", ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 );
 
         assertViolations( result, 0, 0, 2 );
 
@@ -620,6 +617,57 @@ public class DefaultModelValidatorTest
             + "should not point at files within the project directory" );
     }
 
+    public void testInvalidVersionInPluginManagement()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/missing-plugin-version-pluginManagement.xml" );
+
+        assertViolations( result, 1, 0, 0 );
+
+        assertEquals( "'build.pluginManagement.plugins.plugin.(groupId:artifactId)' version of a plugin must be defined. ",
+                      result.getFatals().get( 0 ) );
+
+    }
+
+    public void testInvalidGroupIdInPluginManagement()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/missing-groupId-pluginManagement.xml" );
+
+        assertViolations( result, 1, 0, 0 );
+
+        assertEquals( "'build.pluginManagement.plugins.plugin.(groupId:artifactId)' groupId of a plugin must be defined. ",
+                      result.getFatals().get( 0 ) );
+
+    }
+
+    public void testInvalidArtifactIdInPluginManagement()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/missing-artifactId-pluginManagement.xml" );
+
+        assertViolations( result, 1, 0, 0 );
+
+        assertEquals( "'build.pluginManagement.plugins.plugin.(groupId:artifactId)' artifactId of a plugin must be defined. ",
+                      result.getFatals().get( 0 ) );
+
+    }
+
+    public void testInvalidGroupAndArtifactIdInPluginManagement()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/missing-ga-pluginManagement.xml" );
+
+        assertViolations( result, 2, 0, 0 );
+
+        assertEquals( "'build.pluginManagement.plugins.plugin.(groupId:artifactId)' groupId of a plugin must be defined. ",
+                      result.getFatals().get( 0 ) );
+
+        assertEquals( "'build.pluginManagement.plugins.plugin.(groupId:artifactId)' artifactId of a plugin must be defined. ",
+                      result.getFatals().get( 1 ) );
+
+    }
+
     public void testMissingReportPluginVersion()
         throws Exception
     {
@@ -627,4 +675,5 @@ public class DefaultModelValidatorTest
 
         assertViolations( result, 0, 0, 0 );
     }
+
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-artifactId-pluginManagement.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-artifactId-pluginManagement.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-artifactId-pluginManagement.xml
new file mode 100644
index 0000000..194abf8
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-artifactId-pluginManagement.xml
@@ -0,0 +1,39 @@
+<!--
+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>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>the.groupId.Of.This.Plugin</groupId>
+          <artifactId/>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-ga-pluginManagement.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-ga-pluginManagement.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-ga-pluginManagement.xml
new file mode 100644
index 0000000..4058dd6
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-ga-pluginManagement.xml
@@ -0,0 +1,39 @@
+<!--
+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>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId></groupId>
+          <artifactId/>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-groupId-pluginManagement.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-groupId-pluginManagement.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-groupId-pluginManagement.xml
new file mode 100644
index 0000000..f3f23e6
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-groupId-pluginManagement.xml
@@ -0,0 +1,39 @@
+<!--
+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>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId></groupId>
+          <artifactId>this-is-the-artifact</artifactId>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/017dcaf2/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-plugin-version-pluginManagement.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-plugin-version-pluginManagement.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-plugin-version-pluginManagement.xml
new file mode 100644
index 0000000..94b1777
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/missing-plugin-version-pluginManagement.xml
@@ -0,0 +1,40 @@
+<!--
+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>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>the.group.id</groupId>
+          <artifactId>the.artifact</artifactId>
+          <version/>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
\ No newline at end of file


[25/50] maven git commit: [MNG-5946] Fix links etc. in README.txt which is part of the delivery - Changed consistently to https cause all links are available via https. - Fixed link to shutdown codehaus jira - Fixed link to git repository.

Posted by sc...@apache.org.
[MNG-5946] Fix links etc. in README.txt which is part of the delivery
- Changed consistently to https cause all links are available via https.
- Fixed link to shutdown codehaus jira
- Fixed link to git repository.


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

Branch: refs/heads/MNG-5359
Commit: c794c2a393855ad4d247783876613f1bb289e77f
Parents: a99a789
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Fri Dec 11 19:52:38 2015 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Wed Jan 25 21:15:39 2017 +0100

----------------------------------------------------------------------
 apache-maven/README.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c794c2a3/apache-maven/README.txt
----------------------------------------------------------------------
diff --git a/apache-maven/README.txt b/apache-maven/README.txt
index 6a1bafd..935aa67 100644
--- a/apache-maven/README.txt
+++ b/apache-maven/README.txt
@@ -69,11 +69,11 @@
   Maven URLS
   ----------
 
-  Home Page:          http://maven.apache.org/
-  Downloads:          http://maven.apache.org/download.html
-  Release Notes:      http://maven.apache.org/release-notes.html
-  Mailing Lists:      http://maven.apache.org/mail-lists.html
-  Source Code:        https://git-wip-us.apache.org/repos/asf/maven.git/apache-maven
-  Issue Tracking:     http://jira.codehaus.org/browse/MNG
+  Home Page:          https://maven.apache.org/
+  Downloads:          https://maven.apache.org/download.html
+  Release Notes:      https://maven.apache.org/docs/history.html
+  Mailing Lists:      https://maven.apache.org/mail-lists.html
+  Source Code:        https://git-wip-us.apache.org/repos/asf/maven.git
+  Issue Tracking:     https://issues.apache.org/jira/browse/MNG
   Wiki:               https://cwiki.apache.org/confluence/display/MAVEN/
-  Available Plugins:  http://maven.apache.org/plugins/index.html
+  Available Plugins:  https://maven.apache.org/plugins/index.html


[34/50] maven git commit: [MNG-6163] Introduce CLASSWORLDS_JAR in shell startup scripts

Posted by sc...@apache.org.
[MNG-6163] Introduce CLASSWORLDS_JAR in shell startup scripts

This commit was previously for MNG-5538 and closes #27.


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

Branch: refs/heads/MNG-5359
Commit: 4337d18af65df8d3221bdd1e393f13c5f4db9054
Parents: b928546
Author: Arlo Louis O'Keeffe <ma...@gmail.com>
Authored: Wed Oct 29 09:07:45 2014 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 29 16:00:35 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/4337d18a/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index f3acb73..567e469 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -182,6 +182,7 @@ if [ -z "$JAVA_HOME" ] ; then
   echo "Warning: JAVA_HOME environment variable is not set."
 fi
 
+CLASSWORLDS_JAR=`echo "${M2_HOME}"/boot/plexus-classworlds-*.jar`
 CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
 # For Cygwin, switch paths to Windows format before running java
@@ -192,6 +193,8 @@ if $cygwin; then
     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
     CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$CLASSWORLDS_JAR" ] &&
+    CLASSWORLDS_JAR=`cygpath --path --windows "$CLASSWORLDS_JAR"`
 fi
 
 # traverses directory structure from process work directory to filesystem root
@@ -238,7 +241,7 @@ export MAVEN_CMD_LINE_ARGS
 exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \
-  -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
+  -classpath "${CLASSWORLDS_JAR}" \
   "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
   "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
   "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/ext" \


[12/50] maven git commit: added standard license and download links

Posted by sc...@apache.org.
added standard license and download links

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

Branch: refs/heads/MNG-5359
Commit: 733eedc4fb16b0ed0d9cf792dd644e659b738cd9
Parents: 21d1bfb
Author: Herv� Boutemy <hb...@apache.org>
Authored: Tue Jan 24 19:22:28 2017 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 19:22:28 2017 +0100

----------------------------------------------------------------------
 src/site/site.xml | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/733eedc4/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index bcc6103..86d5ecb 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -49,6 +49,8 @@ under the License.
       <item name="JavaDocs" href="apidocs/index.html"/>
       <item name="Source Xref" href="xref/index.html"/>
       <!--item name="FAQ" href="faq.html"/-->
+      <item name="License" href="http://www.apache.org/licenses/"/>
+      <item name="Download" href="/download.html"/>
     </menu>
 
     <menu name="Descriptors Reference">


[24/50] maven git commit: o Updated to remove errors reported by Checkstyle.

Posted by sc...@apache.org.
o Updated to remove errors reported by Checkstyle.

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

Branch: refs/heads/MNG-5359
Commit: a99a78984c1f20394abf6e76b6167b9e61e6163c
Parents: 311fc62
Author: Christian Schulte <sc...@apache.org>
Authored: Tue Jun 14 21:26:56 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 08:09:30 2017 +0100

----------------------------------------------------------------------
 .../UnknownRepositoryLayoutException.java       |  2 +-
 .../DefaultArtifactRepositoryFactory.java       |  4 +-
 .../repository/layout/FlatRepositoryLayout.java |  6 +-
 .../artifact/resolver/ArtifactResolver.java     | 62 +++++++-------
 .../resolver/DefaultArtifactResolver.java       | 12 ++-
 .../profiles/activation/ProfileActivator.java   |  4 +-
 .../org/apache/maven/project/ProjectUtils.java  | 15 ++--
 .../AbstractStringBasedModelInterpolator.java   | 22 +++--
 .../StringSearchModelInterpolator.java          | 14 ++--
 .../project/path/DefaultPathTranslator.java     | 10 +--
 .../repository/MetadataResolutionResult.java    |  8 +-
 .../repository/legacy/DefaultWagonManager.java  | 85 +++++++++++++-------
 .../legacy/LegacyRepositorySystem.java          | 31 ++++---
 .../maven/repository/legacy/WagonManager.java   |  6 +-
 .../repository/ArtifactRepositoryFactory.java   |  6 +-
 .../DefaultLegacyArtifactCollector.java         | 84 +++++++++++--------
 .../resolver/LegacyArtifactCollector.java       |  9 ++-
 .../repository/metadata/MetadataGraph.java      |  3 +-
 .../repository/metadata/MetadataGraphEdge.java  |  3 +-
 .../MetadataGraphTransformationException.java   |  4 +-
 .../usability/plugin/ExpressionDocumenter.java  | 18 +++--
 21 files changed, 236 insertions(+), 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java b/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java
index 5abe110..e23bea9 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java
@@ -23,7 +23,7 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
 
 /**
  * Exception which is meant to occur when a layout specified for a particular
- * repository doesn't have a corresponding {@link ArtifactRepositoryLayout}
+ * repository doesn't have a corresponding {@link org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout}
  * component in the current container.
  *
  * @author jdcasey

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
index 658dbda..0f69835 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
@@ -81,7 +81,9 @@ public class DefaultArtifactRepositoryFactory
                                                         ArtifactRepositoryPolicy snapshots,
                                                         ArtifactRepositoryPolicy releases )
     {
-        return injectSession( factory.createArtifactRepository( id, url, repositoryLayout, snapshots, releases ), true );
+        return injectSession( factory.createArtifactRepository( id, url, repositoryLayout, snapshots, releases ),
+                              true );
+
     }
 
     public void setGlobalUpdatePolicy( String updatePolicy )

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java
index 8553a31..58143e0 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java
@@ -25,15 +25,11 @@ import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.codehaus.plexus.component.annotations.Component;
 
-/**
- * The code in this class is taken from DefaultRepositorylayout, located at:
- * http://svn.apache.org/viewvc/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/DefaultRepositoryLayout.java
- *
- */
 @Component( role = ArtifactRepositoryLayout.class, hint = "flat" )
 public class FlatRepositoryLayout
     implements ArtifactRepositoryLayout
 {
+
     private static final char ARTIFACT_SEPARATOR = '-';
 
     private static final char GROUP_SEPARATOR = '.';

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
index 7b5faa1..d36ebde 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
@@ -39,61 +39,60 @@ public interface ArtifactResolver
     ArtifactResolutionResult resolve( ArtifactResolutionRequest request );
 
     // The rest is deprecated
-
     // USED BY MAVEN ASSEMBLY PLUGIN 2.2-beta-2
     @Deprecated
     String ROLE = ArtifactResolver.class.getName();
 
     // USED BY SUREFIRE, DEPENDENCY PLUGIN
     @Deprecated
-    ArtifactResolutionResult resolveTransitively( 
-    		Set<Artifact> artifacts, Artifact originatingArtifact,
-            ArtifactRepository localRepository,
-            List<ArtifactRepository> remoteRepositories,
-            ArtifactMetadataSource source, ArtifactFilter filter )
+    ArtifactResolutionResult resolveTransitively(
+        Set<Artifact> artifacts, Artifact originatingArtifact,
+        ArtifactRepository localRepository,
+        List<ArtifactRepository> remoteRepositories,
+        ArtifactMetadataSource source, ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     // USED BY MAVEN ASSEMBLY PLUGIN
     @Deprecated
-    ArtifactResolutionResult resolveTransitively( 
-    		Set<Artifact> artifacts, Artifact originatingArtifact,
-            Map<String,Artifact> managedVersions, ArtifactRepository localRepository,
-            List<ArtifactRepository> remoteRepositories,
-            ArtifactMetadataSource source )
+    ArtifactResolutionResult resolveTransitively(
+        Set<Artifact> artifacts, Artifact originatingArtifact,
+        Map<String, Artifact> managedVersions, ArtifactRepository localRepository,
+        List<ArtifactRepository> remoteRepositories,
+        ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     // USED BY MAVEN ASSEMBLY PLUGIN
     @Deprecated
-    ArtifactResolutionResult resolveTransitively( 
-    		Set<Artifact> artifacts, Artifact originatingArtifact,
-            Map<String,Artifact> managedVersions, ArtifactRepository localRepository,
-            List<ArtifactRepository> remoteRepositories,
-            ArtifactMetadataSource source, ArtifactFilter filter )
+    ArtifactResolutionResult resolveTransitively(
+        Set<Artifact> artifacts, Artifact originatingArtifact,
+        Map<String, Artifact> managedVersions, ArtifactRepository localRepository,
+        List<ArtifactRepository> remoteRepositories,
+        ArtifactMetadataSource source, ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     // USED BY INVOKER PLUGIN
     @Deprecated
-    ArtifactResolutionResult resolveTransitively( 
-    		Set<Artifact> artifacts, Artifact originatingArtifact,
-            List<ArtifactRepository> remoteRepositories,
-            ArtifactRepository localRepository, ArtifactMetadataSource source )
+    ArtifactResolutionResult resolveTransitively(
+        Set<Artifact> artifacts, Artifact originatingArtifact,
+        List<ArtifactRepository> remoteRepositories,
+        ArtifactRepository localRepository, ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     @Deprecated
-    ArtifactResolutionResult resolveTransitively( 
-    		Set<Artifact> artifacts, Artifact originatingArtifact,
-            Map<String,Artifact> managedVersions, ArtifactRepository localRepository,
-            List<ArtifactRepository> remoteRepositories,
-            ArtifactMetadataSource source, ArtifactFilter filter,
-            List<ResolutionListener> listeners )
+    ArtifactResolutionResult resolveTransitively(
+        Set<Artifact> artifacts, Artifact originatingArtifact,
+        Map<String, Artifact> managedVersions, ArtifactRepository localRepository,
+        List<ArtifactRepository> remoteRepositories,
+        ArtifactMetadataSource source, ArtifactFilter filter,
+        List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     @Deprecated
-    ArtifactResolutionResult resolveTransitively( 
-    		Set<Artifact> artifacts, Artifact originatingArtifact,
-            List<ArtifactRepository> remoteRepositories,
-            ArtifactRepository localRepository, ArtifactMetadataSource source,
-            List<ResolutionListener> listeners )
+    ArtifactResolutionResult resolveTransitively(
+        Set<Artifact> artifacts, Artifact originatingArtifact,
+        List<ArtifactRepository> remoteRepositories,
+        ArtifactRepository localRepository, ArtifactMetadataSource source,
+        List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     // USED BY REMOTE RESOURCES PLUGIN, DEPENDENCY PLUGIN, SHADE PLUGIN
@@ -112,4 +111,5 @@ public interface ArtifactResolver
     void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
                         ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException;
+
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index 5e281c1..6a5f330 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -332,10 +332,16 @@ public class DefaultArtifactResolver
                                                              throws ArtifactResolutionException,
                                                              ArtifactNotFoundException
     {
-        ArtifactResolutionRequest request =
-            new ArtifactResolutionRequest().setArtifact( originatingArtifact ).setResolveRoot( false )
+        ArtifactResolutionRequest request = new ArtifactResolutionRequest().
+            setArtifact( originatingArtifact ).
+            setResolveRoot( false ).
             // This is required by the surefire plugin
-            .setArtifactDependencies( artifacts ).setManagedVersionMap( managedVersions ).setLocalRepository( localRepository ).setRemoteRepositories( remoteRepositories ).setCollectionFilter( filter ).setListeners( listeners );
+            setArtifactDependencies( artifacts ).
+            setManagedVersionMap( managedVersions ).
+            setLocalRepository( localRepository ).
+            setRemoteRepositories( remoteRepositories ).
+            setCollectionFilter( filter ).
+            setListeners( listeners );
 
         injectSession2( request, legacySupport.getSession() );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
index d0a9ecb..2688785 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
@@ -24,10 +24,12 @@ import org.apache.maven.model.Profile;
 @Deprecated
 public interface ProfileActivator
 {
-    final String ROLE = ProfileActivator.class.getName();
+
+    String ROLE = ProfileActivator.class.getName();
 
     boolean canDetermineActivation( Profile profile );
 
     boolean isActive( Profile profile )
         throws ProfileActivationException;
+
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
index d15a892..72ea6d1 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
@@ -45,9 +45,8 @@ public final class ProjectUtils
     {
     }
 
-    public static List<ArtifactRepository> buildArtifactRepositories( List<Repository> repositories,
-                                                                      ArtifactRepositoryFactory artifactRepositoryFactory,
-                                                                      PlexusContainer c )
+    public static List<ArtifactRepository> buildArtifactRepositories(
+        List<Repository> repositories, ArtifactRepositoryFactory artifactRepositoryFactory, PlexusContainer c )
         throws InvalidRepositoryException
     {
 
@@ -61,17 +60,15 @@ public final class ProjectUtils
         return remoteRepositories;
     }
 
-    public static ArtifactRepository buildDeploymentArtifactRepository( DeploymentRepository repo,
-                                                                        ArtifactRepositoryFactory artifactRepositoryFactory,
-                                                                        PlexusContainer c )
+    public static ArtifactRepository buildDeploymentArtifactRepository(
+        DeploymentRepository repo, ArtifactRepositoryFactory artifactRepositoryFactory, PlexusContainer c )
         throws InvalidRepositoryException
     {
         return buildArtifactRepository( repo, artifactRepositoryFactory, c );
     }
 
-    public static ArtifactRepository buildArtifactRepository( Repository repo,
-                                                              ArtifactRepositoryFactory artifactRepositoryFactory,
-                                                              PlexusContainer c )
+    public static ArtifactRepository buildArtifactRepository(
+        Repository repo, ArtifactRepositoryFactory artifactRepositoryFactory, PlexusContainer c )
         throws InvalidRepositoryException
     {
         RepositorySystem repositorySystem = rs( c );

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
index 568196c..c40b164 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
@@ -65,6 +65,7 @@ public abstract class AbstractStringBasedModelInterpolator
     extends AbstractLogEnabled
     implements ModelInterpolator, Initializable
 {
+
     private static final List<String> PROJECT_PREFIXES = Arrays.asList( "pom.", "project." );
 
     private static final List<String> TRANSLATED_PATH_EXPRESSIONS;
@@ -122,8 +123,9 @@ public abstract class AbstractStringBasedModelInterpolator
      * <br/>
      * <b>NOTE:</b> This will result in a different instance of Model being returned!!!
      *
-     * @param model   The inbound Model instance, to serialize and reference for expression resolution
+     * @param model The inbound Model instance, to serialize and reference for expression resolution
      * @param context The other context map to be used during resolution
+     *
      * @return The resolved instance of the inbound Model. This is a different instance!
      *
      * @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead.
@@ -227,6 +229,7 @@ public abstract class AbstractStringBasedModelInterpolator
 
         ValueSource basedirValueSource = new PrefixedValueSourceWrapper( new AbstractValueSource( false )
         {
+
             public Object getValue( String expression )
             {
                 if ( projectDir != null && "basedir".equals( expression ) )
@@ -235,9 +238,11 @@ public abstract class AbstractStringBasedModelInterpolator
                 }
                 return null;
             }
+
         }, PROJECT_PREFIXES, true );
         ValueSource baseUriValueSource = new PrefixedValueSourceWrapper( new AbstractValueSource( false )
         {
+
             public Object getValue( String expression )
             {
                 if ( projectDir != null && "baseUri".equals( expression ) )
@@ -246,6 +251,7 @@ public abstract class AbstractStringBasedModelInterpolator
                 }
                 return null;
             }
+
         }, PROJECT_PREFIXES, false );
 
         List<ValueSource> valueSources = new ArrayList<>( 9 );
@@ -260,10 +266,12 @@ public abstract class AbstractStringBasedModelInterpolator
         valueSources.add( new MapBasedValueSource( config.getExecutionProperties() ) );
         valueSources.add( new AbstractValueSource( false )
         {
+
             public Object getValue( String expression )
             {
                 return config.getExecutionProperties().getProperty( "env." + expression );
             }
+
         } );
         valueSources.add( modelValueSource2 );
 
@@ -273,11 +281,13 @@ public abstract class AbstractStringBasedModelInterpolator
     protected List<InterpolationPostProcessor> createPostProcessors( final Model model, final File projectDir,
                                                                      final ProjectBuilderConfiguration config )
     {
-        return Collections.singletonList( (InterpolationPostProcessor) new PathTranslatingPostProcessor(
-                                                                                                         PROJECT_PREFIXES,
-                                                                                                         TRANSLATED_PATH_EXPRESSIONS,
-                                                                                                         projectDir,
-                                                                                                         pathTranslator ) );
+        return Collections.singletonList(
+            (InterpolationPostProcessor) new PathTranslatingPostProcessor(
+                PROJECT_PREFIXES,
+                TRANSLATED_PATH_EXPRESSIONS,
+                projectDir,
+                pathTranslator ) );
+
     }
 
     @SuppressWarnings( "unchecked" )

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
index 13ceaf7..ecde27f 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
@@ -47,8 +47,8 @@ public class StringSearchModelInterpolator
     extends AbstractStringBasedModelInterpolator
 {
 
-    private static final Map<Class<?>, Field[]> fieldsByClass = new WeakHashMap<>();
-    private static final Map<Class<?>, Boolean> fieldIsPrimitiveByClass = new WeakHashMap<>();
+    private static final Map<Class<?>, Field[]> FIELDS_BY_CLASS = new WeakHashMap<>();
+    private static final Map<Class<?>, Boolean> PRIMITIVE_BY_CLASS = new WeakHashMap<>();
 
     public StringSearchModelInterpolator()
     {
@@ -161,11 +161,11 @@ public class StringSearchModelInterpolator
             }
             else if ( isQualifiedForInterpolation( cls ) )
             {
-                Field[] fields = fieldsByClass.get( cls );
+                Field[] fields = FIELDS_BY_CLASS.get( cls );
                 if ( fields == null )
                 {
                     fields = cls.getDeclaredFields();
-                    fieldsByClass.put( cls, fields );
+                    FIELDS_BY_CLASS.put( cls, fields );
                 }
 
                 for ( Field field : fields )
@@ -350,12 +350,12 @@ public class StringSearchModelInterpolator
 
         private boolean isQualifiedForInterpolation( Field field, Class<?> fieldType )
         {
-            if ( !fieldIsPrimitiveByClass.containsKey( fieldType ) )
+            if ( !PRIMITIVE_BY_CLASS.containsKey( fieldType ) )
             {
-                fieldIsPrimitiveByClass.put( fieldType, fieldType.isPrimitive() );
+                PRIMITIVE_BY_CLASS.put( fieldType, fieldType.isPrimitive() );
             }
 
-            if ( fieldIsPrimitiveByClass.get( fieldType ) )
+            if ( PRIMITIVE_BY_CLASS.get( fieldType ) )
             {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
index b4061ec..eb3f24d 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
@@ -125,17 +125,13 @@ public class DefaultPathTranslator
         if ( s != null )
         {
             String basedirExpr = null;
-            for ( String BASEDIR_EXPRESSION : BASEDIR_EXPRESSIONS )
+            for ( String expression : BASEDIR_EXPRESSIONS )
             {
-                basedirExpr = BASEDIR_EXPRESSION;
-                if ( s.startsWith( basedirExpr ) )
+                if ( s.startsWith( expression ) )
                 {
+                    basedirExpr = expression;
                     break;
                 }
-                else
-                {
-                    basedirExpr = null;
-                }
             }
 
             if ( basedirExpr != null )

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
index cfdd7f9..bd5436c 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
@@ -118,7 +118,7 @@ public class MetadataResolutionResult
 
     public List<Artifact> getMissingArtifacts()
     {
-        return missingArtifacts == null ? Collections.<Artifact> emptyList() : missingArtifacts;
+        return missingArtifacts == null ? Collections.<Artifact>emptyList() : missingArtifacts;
     }
 
     public MetadataResolutionResult addMissingArtifact( Artifact artifact )
@@ -148,7 +148,7 @@ public class MetadataResolutionResult
 
     public List<Exception> getExceptions()
     {
-        return exceptions == null ? Collections.<Exception> emptyList() : exceptions;
+        return exceptions == null ? Collections.<Exception>emptyList() : exceptions;
     }
 
     // ------------------------------------------------------------------------
@@ -185,7 +185,7 @@ public class MetadataResolutionResult
 
     public List<Exception> getVersionRangeViolations()
     {
-        return versionRangeViolations == null ? Collections.<Exception> emptyList() : versionRangeViolations;
+        return versionRangeViolations == null ? Collections.<Exception>emptyList() : versionRangeViolations;
     }
 
     // ------------------------------------------------------------------------
@@ -217,7 +217,7 @@ public class MetadataResolutionResult
 
     public List<ArtifactResolutionException> getMetadataResolutionExceptions()
     {
-        return metadataResolutionExceptions == null ? Collections.<ArtifactResolutionException> emptyList()
+        return metadataResolutionExceptions == null ? Collections.<ArtifactResolutionException>emptyList()
                         : metadataResolutionExceptions;
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
index 6fa72ce..b8835b5 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
@@ -63,10 +63,19 @@ import org.eclipse.aether.util.ConfigUtils;
 public class DefaultWagonManager
     implements WagonManager
 {
-    private static final String[] CHECKSUM_IDS = { "md5", "sha1" };
 
-    /** have to match the CHECKSUM_IDS */
-    private static final String[] CHECKSUM_ALGORITHMS = { "MD5", "SHA-1" };
+    private static final String[] CHECKSUM_IDS =
+    {
+        "md5", "sha1"
+    };
+
+    /**
+     * have to match the CHECKSUM_IDS
+     */
+    private static final String[] CHECKSUM_ALGORITHMS =
+    {
+        "MD5", "SHA-1"
+    };
 
     @Requirement
     private Logger logger;
@@ -80,7 +89,6 @@ public class DefaultWagonManager
     @Requirement
     private LegacySupport legacySupport;
 
-
     //
     // Retriever
     //
@@ -96,14 +104,15 @@ public class DefaultWagonManager
         if ( !policy.isEnabled() )
         {
             logger.debug( "Skipping disabled repository " + repository.getId() + " for resolution of "
-                + artifact.getId() );
+                              + artifact.getId() );
+
         }
         else if ( artifact.isSnapshot() || !artifact.getFile().exists() )
         {
             if ( force || updateCheckManager.isUpdateRequired( artifact, repository ) )
             {
                 logger.debug( "Trying repository " + repository.getId() + " for resolution of " + artifact.getId()
-                    + " from " + remotePath );
+                                  + " from " + remotePath );
 
                 try
                 {
@@ -133,17 +142,21 @@ public class DefaultWagonManager
                 String error = updateCheckManager.getError( artifact, repository );
                 if ( error != null )
                 {
-                    throw new TransferFailedException( "Failure to resolve " + remotePath + " from "
-                        + repository.getUrl() + " was cached in the local repository. "
-                        + "Resolution will not be reattempted until the update interval of " + repository.getId()
-                        + " has elapsed or updates are forced. Original error: " + error );
+                    throw new TransferFailedException(
+                        "Failure to resolve " + remotePath + " from " + repository.getUrl()
+                            + " was cached in the local repository. "
+                            + "Resolution will not be reattempted until the update interval of "
+                            + repository.getId() + " has elapsed or updates are forced. Original error: " + error );
+
                 }
                 else
                 {
-                    throw new ResourceDoesNotExistException( "Failure to resolve " + remotePath + " from "
-                        + repository.getUrl() + " was cached in the local repository. "
-                        + "Resolution will not be reattempted until the update interval of " + repository.getId()
-                        + " has elapsed or updates are forced." );
+                    throw new ResourceDoesNotExistException(
+                        "Failure to resolve " + remotePath + " from " + repository.getUrl()
+                            + " was cached in the local repository. "
+                            + "Resolution will not be reattempted until the update interval of "
+                            + repository.getId() + " has elapsed or updates are forced." );
+
                 }
             }
         }
@@ -174,7 +187,8 @@ public class DefaultWagonManager
                 // because we want to cycle through them all before squawking.
 
                 logger.debug( "Unable to find artifact " + artifact.getId() + " in repository " + repository.getId()
-                    + " (" + repository.getUrl() + ")", e );
+                                  + " (" + repository.getUrl() + ")", e );
+
             }
             catch ( TransferFailedException e )
             {
@@ -183,6 +197,7 @@ public class DefaultWagonManager
                 String msg =
                     "Unable to get artifact " + artifact.getId() + " from repository " + repository.getId() + " ("
                         + repository.getUrl() + "): " + e.getMessage();
+
                 if ( logger.isDebugEnabled() )
                 {
                     logger.warn( msg, e );
@@ -233,6 +248,7 @@ public class DefaultWagonManager
      *
      * @param wagon
      * @param repository
+     *
      * @throws ConnectionException
      * @throws AuthenticationException
      */
@@ -241,13 +257,15 @@ public class DefaultWagonManager
     {
         // MNG-5509
         // See org.eclipse.aether.connector.wagon.WagonRepositoryConnector.connectWagon(Wagon)
-        if( legacySupport.getRepositorySession() != null )
+        if ( legacySupport.getRepositorySession() != null )
         {
-            String userAgent = ConfigUtils.getString( legacySupport.getRepositorySession(), null, ConfigurationProperties.USER_AGENT );
-            if( userAgent == null)
+            String userAgent = ConfigUtils.getString( legacySupport.getRepositorySession(), null,
+                                                      ConfigurationProperties.USER_AGENT );
+
+            if ( userAgent == null )
             {
                 Properties headers = new Properties();
-                    
+
                 headers.put( "User-Agent", ConfigUtils.getString( legacySupport.getRepositorySession(), "Maven",
                                                                   ConfigurationProperties.USER_AGENT ) );
                 try
@@ -269,18 +287,21 @@ public class DefaultWagonManager
         if ( repository.getProxy() != null && logger.isDebugEnabled() )
         {
             logger.debug( "Using proxy " + repository.getProxy().getHost() + ":" + repository.getProxy().getPort()
-                + " for " + repository.getUrl() );
+                              + " for " + repository.getUrl() );
+
         }
 
         if ( repository.getAuthentication() != null && repository.getProxy() != null )
         {
             wagon.connect( new Repository( repository.getId(), repository.getUrl() ), authenticationInfo( repository ),
                            proxyInfo( repository ) );
+
         }
         else if ( repository.getAuthentication() != null )
         {
             wagon.connect( new Repository( repository.getId(), repository.getUrl() ),
                            authenticationInfo( repository ) );
+
         }
         else if ( repository.getProxy() != null )
         {
@@ -414,10 +435,10 @@ public class DefaultWagonManager
                     }
                     catch ( ChecksumFailedException e )
                     {
-                        // if we catch a ChecksumFailedException, it means the transfer/read succeeded, but the checksum
-                        // doesn't match. This could be a problem with the server (ibiblio HTTP-200 error page), so we'll
-                        // try this up to two times. On the second try, we'll handle it as a bona-fide error, based on the
-                        // repository's checksum checking policy.
+                        // if we catch a ChecksumFailedException, it means the transfer/read succeeded, but the 
+                        // checksum doesn't match. This could be a problem with the server (ibiblio HTTP-200 error
+                        // page), so we'll try this up to two times. On the second try, we'll handle it as a bona-fide
+                        // error, based on the repository's checksum checking policy.
                         if ( firstRun )
                         {
                             logger.warn( "*** CHECKSUM FAILED - " + e.getMessage() + " - RETRYING" );
@@ -507,7 +528,6 @@ public class DefaultWagonManager
             // File.renameTo operation doesn't really work across file systems.
             // So we will attempt to do a File.renameTo for efficiency and atomicity, if this fails
             // then we will use a brute force copy and delete the temporary file.
-
             if ( !temp.renameTo( destination ) )
             {
                 try
@@ -522,7 +542,8 @@ public class DefaultWagonManager
                 catch ( IOException e )
                 {
                     throw new TransferFailedException( "Error copying temporary file to the final destination: "
-                        + e.getMessage(), e );
+                                                           + e.getMessage(), e );
+
                 }
             }
         }
@@ -642,9 +663,9 @@ public class DefaultWagonManager
             cleanupTemporaryFiles( temporaryFiles );
 
             // Remove every checksum listener
-            for ( String aCHECKSUM_IDS : CHECKSUM_IDS )
+            for ( String id : CHECKSUM_IDS )
             {
-                TransferListener checksumListener = checksums.get( aCHECKSUM_IDS );
+                TransferListener checksumListener = checksums.get( id );
                 if ( checksumListener != null )
                 {
                     wagon.removeTransferListener( checksumListener );
@@ -721,7 +742,7 @@ public class DefaultWagonManager
 
             // check for 'ALGO (name) = CHECKSUM' like used by openssl
             if ( expectedChecksum.regionMatches( true, 0, "MD", 0, 2 )
-                || expectedChecksum.regionMatches( true, 0, "SHA", 0, 3 ) )
+                     || expectedChecksum.regionMatches( true, 0, "SHA", 0, 3 ) )
             {
                 int lastSpacePos = expectedChecksum.lastIndexOf( ' ' );
                 expectedChecksum = expectedChecksum.substring( lastSpacePos + 1 );
@@ -752,7 +773,8 @@ public class DefaultWagonManager
             else
             {
                 throw new ChecksumFailedException( "Checksum failed on download: local = '" + actualChecksum
-                    + "'; remote = '" + expectedChecksum + "'" );
+                                                       + "'; remote = '" + expectedChecksum + "'" );
+
             }
         }
         catch ( IOException e )
@@ -814,7 +836,8 @@ public class DefaultWagonManager
         catch ( ComponentLookupException e )
         {
             throw new UnsupportedProtocolException( "Cannot find wagon which supports the requested protocol: "
-                + protocol, e );
+                                                        + protocol, e );
+
         }
 
         return wagon;

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
index 866968b..f8d4531 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
@@ -353,22 +353,21 @@ public class LegacyRepositorySystem
         return artifactResolver.resolve( request );
     }
 
-    /*
-    public void addProxy( String protocol, String host, int port, String username, String password, String nonProxyHosts )
-    {
-        ProxyInfo proxyInfo = new ProxyInfo();
-        proxyInfo.setHost( host );
-        proxyInfo.setType( protocol );
-        proxyInfo.setPort( port );
-        proxyInfo.setNonProxyHosts( nonProxyHosts );
-        proxyInfo.setUserName( username );
-        proxyInfo.setPassword( password );
-
-        proxies.put( protocol, proxyInfo );
-
-        wagonManager.addProxy( protocol, host, port, username, password, nonProxyHosts );
-    }
-    */
+//    public void addProxy( String protocol, String host, int port, String username, String password,
+//                          String nonProxyHosts )
+//    {
+//        ProxyInfo proxyInfo = new ProxyInfo();
+//        proxyInfo.setHost( host );
+//        proxyInfo.setType( protocol );
+//        proxyInfo.setPort( port );
+//        proxyInfo.setNonProxyHosts( nonProxyHosts );
+//        proxyInfo.setUserName( username );
+//        proxyInfo.setPassword( password );
+//
+//        proxies.put( protocol, proxyInfo );
+//
+//        wagonManager.addProxy( protocol, host, port, username, password, nonProxyHosts );
+//    }
 
     public List<ArtifactRepository> getEffectiveRepositories( List<ArtifactRepository> repositories )
     {

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java
index 73ead26..35fcf42 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java
@@ -45,7 +45,8 @@ public interface WagonManager
     //
     // Retriever
     //
-    void getArtifact( Artifact artifact, ArtifactRepository repository, TransferListener transferListener, boolean force )
+    void getArtifact( Artifact artifact, ArtifactRepository repository, TransferListener transferListener,
+                      boolean force )
         throws TransferFailedException, ResourceDoesNotExistException;
 
     void getArtifact( Artifact artifact, List<ArtifactRepository> remoteRepositories,
@@ -71,7 +72,8 @@ public interface WagonManager
                       TransferListener downloadMonitor )
         throws TransferFailedException;
 
-    void putRemoteFile( ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor )
+    void putRemoteFile( ArtifactRepository repository, File source, String remotePath,
+                        TransferListener downloadMonitor )
         throws TransferFailedException;
 
     void putArtifactMetadata( File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository )

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/ArtifactRepositoryFactory.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/ArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/ArtifactRepositoryFactory.java
index b982f91..aeb5739 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/ArtifactRepositoryFactory.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/ArtifactRepositoryFactory.java
@@ -37,7 +37,8 @@ public interface ArtifactRepositoryFactory
         throws UnknownRepositoryLayoutException;
 
     @Deprecated
-    ArtifactRepository createDeploymentArtifactRepository( String id, String url, String layoutId, boolean uniqueVersion )
+    ArtifactRepository createDeploymentArtifactRepository( String id, String url, String layoutId,
+                                                           boolean uniqueVersion )
         throws UnknownRepositoryLayoutException;
 
     ArtifactRepository createDeploymentArtifactRepository( String id, String url, ArtifactRepositoryLayout layout,
@@ -48,7 +49,8 @@ public interface ArtifactRepositoryFactory
         throws UnknownRepositoryLayoutException;
 
     ArtifactRepository createArtifactRepository( String id, String url, ArtifactRepositoryLayout repositoryLayout,
-                                                 ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases );
+                                                 ArtifactRepositoryPolicy snapshots,
+                                                 ArtifactRepositoryPolicy releases );
 
     void setGlobalUpdatePolicy( String snapshotPolicy );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
index 77fc705..4601eee 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
@@ -63,6 +63,7 @@ import org.codehaus.plexus.logging.Logger;
 public class DefaultLegacyArtifactCollector
     implements LegacyArtifactCollector
 {
+
     @Requirement( hint = "nearest" )
     private ConflictResolver defaultConflictResolver;
 
@@ -102,7 +103,8 @@ public class DefaultLegacyArtifactCollector
     }
 
     public ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
-                                             Map<String, Artifact> managedVersions, ArtifactResolutionRequest repositoryRequest,
+                                             Map<String, Artifact> managedVersions,
+                                             ArtifactResolutionRequest repositoryRequest,
                                              ArtifactMetadataSource source, ArtifactFilter filter,
                                              List<ResolutionListener> listeners,
                                              List<ConflictResolver> conflictResolvers )
@@ -206,7 +208,8 @@ public class DefaultLegacyArtifactCollector
      * @param originatingArtifact artifact we are processing
      * @param managedVersions original managed versions
      */
-    private ManagedVersionMap getManagedVersionsMap( Artifact originatingArtifact, Map<String,Artifact> managedVersions )
+    private ManagedVersionMap getManagedVersionsMap( Artifact originatingArtifact,
+                                                     Map<String, Artifact> managedVersions )
     {
         ManagedVersionMap versionMap;
         if ( ( managedVersions != null ) && ( managedVersions instanceof ManagedVersionMap ) )
@@ -218,7 +221,7 @@ public class DefaultLegacyArtifactCollector
             versionMap = new ManagedVersionMap( managedVersions );
         }
 
-        /* remove the originating artifact if it is also in managed versions to avoid being modified during resolution */
+        // remove the originating artifact if it is also in managed versions to avoid being modified during resolution
         Artifact managedOriginatingArtifact = versionMap.get( originatingArtifact.getDependencyConflictId() );
 
         if ( managedOriginatingArtifact != null )
@@ -286,7 +289,10 @@ public class DefaultLegacyArtifactCollector
                             // Select an appropriate available version from the (now restricted) range
                             // Note this version was selected before to get the appropriate POM
                             // But it was reset by the call to setVersionRange on restricting the version
-                            ResolutionNode[] resetNodes = { previous, node };
+                            ResolutionNode[] resetNodes =
+                            {
+                                previous, node
+                            };
                             for ( int j = 0; j < 2; j++ )
                             {
                                 Artifact resetArtifact = resetNodes[j].getArtifact();
@@ -306,6 +312,7 @@ public class DefaultLegacyArtifactCollector
                                         {
                                             MetadataResolutionRequest metadataRequest =
                                                 new DefaultMetadataResolutionRequest( request );
+
                                             metadataRequest.setArtifact( resetArtifact );
                                             versions = source.retrieveAvailableVersions( metadataRequest );
                                             resetArtifact.setAvailableVersions( versions );
@@ -314,25 +321,29 @@ public class DefaultLegacyArtifactCollector
                                         {
                                             resetArtifact.setDependencyTrail( node.getDependencyTrail() );
                                             throw new ArtifactResolutionException(
-                                                                                   "Unable to get dependency information: "
-                                                                                       + e.getMessage(), resetArtifact,
-                                                                                   request.getRemoteRepositories(), e );
+                                                "Unable to get dependency information: "
+                                                    + e.getMessage(), resetArtifact, request.getRemoteRepositories(),
+                                                e );
+
                                         }
                                     }
                                     // end hack
 
                                     // MNG-2861: match version can return null
-                                    ArtifactVersion selectedVersion =
-                                        resetArtifact.getVersionRange().matchVersion( resetArtifact.getAvailableVersions() );
+                                    ArtifactVersion selectedVersion = resetArtifact.getVersionRange().
+                                        matchVersion( resetArtifact.getAvailableVersions() );
+
                                     if ( selectedVersion != null )
                                     {
                                         resetArtifact.selectVersion( selectedVersion.toString() );
                                     }
                                     else
                                     {
-                                        throw new OverConstrainedVersionException( " Unable to find a version in "
-                                            + resetArtifact.getAvailableVersions() + " to match the range "
-                                            + resetArtifact.getVersionRange(), resetArtifact );
+                                        throw new OverConstrainedVersionException(
+                                            "Unable to find a version in " + resetArtifact.getAvailableVersions()
+                                                + " to match the range " + resetArtifact.getVersionRange(),
+                                            resetArtifact );
+
                                     }
 
                                     fireEvent( ResolutionListener.SELECT_VERSION_FROM_RANGE, listeners, resetNodes[j] );
@@ -342,7 +353,8 @@ public class DefaultLegacyArtifactCollector
 
                         // Conflict Resolution
                         ResolutionNode resolved = null;
-                        for ( Iterator<ConflictResolver> j = conflictResolvers.iterator(); ( resolved == null ) && j.hasNext(); )
+                        for ( Iterator<ConflictResolver> j = conflictResolvers.iterator();
+                              resolved == null && j.hasNext(); )
                         {
                             ConflictResolver conflictResolver = j.next();
 
@@ -354,8 +366,10 @@ public class DefaultLegacyArtifactCollector
                             // TODO: add better exception that can detail the two conflicting artifacts
                             ArtifactResolutionException are =
                                 new ArtifactResolutionException( "Cannot resolve artifact version conflict between "
-                                    + previous.getArtifact().getVersion() + " and " + node.getArtifact().getVersion(),
+                                                                     + previous.getArtifact().getVersion() + " and "
+                                                                     + node.getArtifact().getVersion(),
                                                                  previous.getArtifact() );
+
                             result.addVersionRangeViolation( are );
                         }
 
@@ -363,8 +377,9 @@ public class DefaultLegacyArtifactCollector
                         {
                             // TODO: add better exception
                             result.addVersionRangeViolation( new ArtifactResolutionException(
-                                                                                              "Conflict resolver returned unknown resolution node: ",
-                                                                                              resolved.getArtifact() ) );
+                                "Conflict resolver returned unknown resolution node: ",
+                                resolved.getArtifact() ) );
+
                         }
 
                         // TODO: should this be part of mediation?
@@ -509,15 +524,16 @@ public class DefaultLegacyArtifactCollector
                                             if ( versions.isEmpty() )
                                             {
                                                 throw new OverConstrainedVersionException(
-                                                                                           "No versions are present in the repository for the artifact with a range "
-                                                                                               + versionRange,
-                                                                                           artifact,
-                                                                                           childRemoteRepositories );
+                                                    "No versions are present in the repository for the artifact"
+                                                        + " with a range " + versionRange, artifact,
+                                                    childRemoteRepositories );
+
                                             }
 
-                                            throw new OverConstrainedVersionException( "Couldn't find a version in "
-                                                + versions + " to match range " + versionRange, artifact,
-                                                childRemoteRepositories );
+                                            throw new OverConstrainedVersionException(
+                                                "Couldn't find a version in " + versions + " to match range "
+                                                    + versionRange, artifact, childRemoteRepositories );
+
                                         }
                                     }
                                     else
@@ -536,10 +552,10 @@ public class DefaultLegacyArtifactCollector
                                     break;
                                 }
                             }
-                            while( !childKey.equals( child.getKey() ) );
+                            while ( !childKey.equals( child.getKey() ) );
 
                             if ( parentArtifact != null && parentArtifact.getDependencyFilter() != null
-                                && !parentArtifact.getDependencyFilter().include( artifact ) )
+                                     && !parentArtifact.getDependencyFilter().include( artifact ) )
                             {
                                 // MNG-3769: the [probably relocated] artifact is excluded.
                                 // We could process exclusions on relocated artifact details in the
@@ -574,7 +590,9 @@ public class DefaultLegacyArtifactCollector
                             artifact.setDependencyTrail( node.getDependencyTrail() );
 
                             throw new ArtifactResolutionException( "Unable to get dependency information for "
-                                + artifact.getId() + ": " + e.getMessage(), artifact, childRemoteRepositories, e );
+                                                                       + artifact.getId() + ": " + e.getMessage(),
+                                                                   artifact, childRemoteRepositories, e );
+
                         }
 
                         ArtifactResolutionRequest subRequest = new ArtifactResolutionRequest( metadataRequest );
@@ -583,6 +601,7 @@ public class DefaultLegacyArtifactCollector
                         subRequest.setProxies( request.getProxies() );
                         recurse( result, child, resolvedArtifacts, managedVersions, subRequest, source, filter,
                                  listeners, conflictResolvers );
+
                     }
                 }
                 catch ( OverConstrainedVersionException e )
@@ -610,9 +629,8 @@ public class DefaultLegacyArtifactCollector
         // explicit child override depMgmt (viz. depMgmt should only
         // provide defaults to children, but should override transitives).
         // We can do this by calling isChildOfRootNode on the current node.
-
         if ( ( artifact.getVersion() != null )
-            && ( !node.isChildOfRootNode() || node.getArtifact().getVersion() == null ) )
+                 && ( !node.isChildOfRootNode() || node.getArtifact().getVersion() == null ) )
         {
             fireEvent( ResolutionListener.MANAGE_ARTIFACT_VERSION, listeners, node, artifact );
             node.getArtifact().setVersion( artifact.getVersion() );
@@ -625,7 +643,7 @@ public class DefaultLegacyArtifactCollector
         }
 
         if ( Artifact.SCOPE_SYSTEM.equals( node.getArtifact().getScope() ) && ( node.getArtifact().getFile() == null )
-            && ( artifact.getFile() != null ) )
+                 && ( artifact.getFile() != null ) )
         {
             fireEvent( ResolutionListener.MANAGE_ARTIFACT_SYSTEM_PATH, listeners, node, artifact );
             node.getArtifact().setFile( artifact.getFile() );
@@ -648,15 +666,15 @@ public class DefaultLegacyArtifactCollector
 
         /* farthest is runtime and nearest has lower priority, change to runtime */
         if ( Artifact.SCOPE_RUNTIME.equals( farthestArtifact.getScope() )
-            && ( Artifact.SCOPE_TEST.equals( nearestArtifact.getScope() )
-                            || Artifact.SCOPE_PROVIDED.equals( nearestArtifact.getScope() ) ) )
+                 && ( Artifact.SCOPE_TEST.equals( nearestArtifact.getScope() )
+                      || Artifact.SCOPE_PROVIDED.equals( nearestArtifact.getScope() ) ) )
         {
             updateScope = true;
         }
 
         /* farthest is compile and nearest is not (has lower priority), change to compile */
         if ( Artifact.SCOPE_COMPILE.equals( farthestArtifact.getScope() )
-            && !Artifact.SCOPE_COMPILE.equals( nearestArtifact.getScope() ) )
+                 && !Artifact.SCOPE_COMPILE.equals( nearestArtifact.getScope() ) )
         {
             updateScope = true;
         }
@@ -762,7 +780,7 @@ public class DefaultLegacyArtifactCollector
                     break;
                 case ResolutionListener.RESTRICT_RANGE:
                     if ( node.getArtifact().getVersionRange().hasRestrictions()
-                        || replacement.getVersionRange().hasRestrictions() )
+                             || replacement.getVersionRange().hasRestrictions() )
                     {
                         listener.restrictRange( node.getArtifact(), replacement, newRange );
                     }

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java
index 133bd58..4045258 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java
@@ -42,19 +42,22 @@ import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver;
 public interface LegacyArtifactCollector
 {
 
-    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact, Map<String, Artifact> managedVersions,
+    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                      Map<String, Artifact> managedVersions,
                                       ArtifactResolutionRequest repositoryRequest, ArtifactMetadataSource source,
                                       ArtifactFilter filter, List<ResolutionListener> listeners,
                                       List<ConflictResolver> conflictResolvers );
 
-    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact, Map<String, Artifact> managedVersions,
+    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                      Map<String, Artifact> managedVersions,
                                       ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
                                       ArtifactMetadataSource source, ArtifactFilter filter,
                                       List<ResolutionListener> listeners, List<ConflictResolver> conflictResolvers );
 
     // used by maven-dependency-tree and maven-dependency-plugin
     @Deprecated
-    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact, Map<String, Artifact> managedVersions,
+    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                      Map<String, Artifact> managedVersions,
                                       ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
                                       ArtifactMetadataSource source, ArtifactFilter filter,
                                       List<ResolutionListener> listeners );

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
index 3f13888..4bcca4c 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
@@ -104,7 +104,8 @@ public class MetadataGraph
      *
      * @param tree "dirty" tree root
      * @param versionedVertices true if graph nodes should be versioned (different versions -> different nodes)
-     * @param scopedVertices true if graph nodes should be versioned and scoped (different versions and/or scopes -> different nodes)
+     * @param scopedVertices true if graph nodes should be versioned and scoped
+     * (different versions and/or scopes -> different nodes)
      *
      */
     public MetadataGraph( MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices )

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
index 5f16df0..5a4c106 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
@@ -88,7 +88,8 @@ public class MetadataGraphEdge
             MetadataGraphEdge e = (MetadataGraphEdge) o;
 
             return objectsEqual( version, e.version )
-                && ArtifactScopeEnum.checkScope( scope ).getScope().equals( ArtifactScopeEnum.checkScope( e.scope ).getScope() )
+                && ArtifactScopeEnum.checkScope( scope ).getScope().
+                    equals( ArtifactScopeEnum.checkScope( e.scope ).getScope() )
                 && depth == e.depth;
         }
         return false;

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphTransformationException.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphTransformationException.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphTransformationException.java
index 16a34a8..7861b48 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphTransformationException.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphTransformationException.java
@@ -21,12 +21,12 @@ package org.apache.maven.repository.metadata;
 
 /**
  * @author <a href="oleg@codehaus.org">Oleg Gusakov</a>
- *
  */
 public class MetadataGraphTransformationException
     extends Exception
 {
-	private static final long serialVersionUID = -4029897098314019152L;
+
+    private static final long serialVersionUID = -4029897098314019152L;
 
     public MetadataGraphTransformationException()
     {

http://git-wip-us.apache.org/repos/asf/maven/blob/a99a7898/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
index 65bd9cf..b5e606d 100644
--- a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
+++ b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
@@ -38,7 +38,10 @@ import java.util.Map;
 public class ExpressionDocumenter
 {
 
-    private static final String[] EXPRESSION_ROOTS = { "project", "settings", "session", "plugin", "rootless" };
+    private static final String[] EXPRESSION_ROOTS =
+    {
+        "project", "settings", "session", "plugin", "rootless"
+    };
 
     private static final String EXPRESSION_DOCO_ROOTPATH = "META-INF/maven/plugin-expressions/";
 
@@ -53,10 +56,10 @@ public class ExpressionDocumenter
 
             ClassLoader docLoader = initializeDocLoader();
 
-            for ( String EXPRESSION_ROOT : EXPRESSION_ROOTS )
+            for ( String root : EXPRESSION_ROOTS )
             {
                 try ( InputStream docStream = docLoader.getResourceAsStream(
-                    EXPRESSION_DOCO_ROOTPATH + EXPRESSION_ROOT + ".paramdoc.xml" ) )
+                    EXPRESSION_DOCO_ROOTPATH + root + ".paramdoc.xml" ) )
                 {
                     if ( docStream != null )
                     {
@@ -68,12 +71,12 @@ public class ExpressionDocumenter
                 catch ( IOException e )
                 {
                     throw new ExpressionDocumentationException(
-                        "Failed to read documentation for expression root: " + EXPRESSION_ROOT, e );
+                        "Failed to read documentation for expression root: " + root, e );
                 }
                 catch ( XmlPullParserException e )
                 {
                     throw new ExpressionDocumentationException(
-                        "Failed to parse documentation for expression root: " + EXPRESSION_ROOT, e );
+                        "Failed to parse documentation for expression root: " + root, e );
                 }
 
             }
@@ -161,7 +164,10 @@ public class ExpressionDocumenter
                 "Cannot construct expression documentation classpath" + " resource base.", e );
         }
 
-        return new URLClassLoader( new URL[]{ docResource } );
+        return new URLClassLoader( new URL[]
+        {
+            docResource
+        } );
     }
 
 }


[39/50] maven git commit: [MNG-5815] "mvn.cmd" does not indicate failure properly when using "&&"

Posted by sc...@apache.org.
[MNG-5815] "mvn.cmd" does not indicate failure properly when using "&&"


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

Branch: refs/heads/MNG-5359
Commit: fe586467ecbd63791001e7a6ddf8f18d4fac19b8
Parents: ca43030
Author: Michael Osipov <mi...@apache.org>
Authored: Wed May 11 11:47:14 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 29 21:51:20 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/fe586467/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 3f170c3..2321b9c 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -154,4 +154,4 @@ if "%MAVEN_BATCH_PAUSE%" == "on" pause
 
 if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
 
-exit /B %ERROR_CODE%
+cmd /C exit /B %ERROR_CODE%


[07/50] maven git commit: [MNG-6102] Introduce ${maven.conf} in m2.conf

Posted by sc...@apache.org.
[MNG-6102] Introduce ${maven.conf} in m2.conf

Set maven.conf to default ${maven.home}/conf in ${maven.home}/bin/m2.conf
to have a canonical property pointing to global configuration files from
within Java code.

This also helps package maintainers to decouple the Maven installation
from a global configuration by solely modifying m2.conf instead of using
dirty hacks, if possible at all.


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

Branch: refs/heads/MNG-5359
Commit: be5caccaff3d00ffca4b3cefe9665b6106bc44bf
Parents: 149cce7
Author: Michael Osipov <mi...@apache.org>
Authored: Sun Oct 9 21:00:42 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 23 20:54:54 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/m2.conf                                     | 4 +++-
 apache-maven/src/conf/settings.xml                               | 2 +-
 apache-maven/src/conf/toolchains.xml                             | 2 +-
 .../org/apache/maven/settings/DefaultMavenSettingsBuilder.java   | 2 +-
 maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java  | 2 +-
 .../cli/configuration/SettingsXmlConfigurationProcessor.java     | 4 ++--
 maven-embedder/src/site/apt/logging.apt                          | 2 +-
 7 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/apache-maven/src/bin/m2.conf
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/m2.conf b/apache-maven/src/bin/m2.conf
index 346554c..2235f82 100644
--- a/apache-maven/src/bin/m2.conf
+++ b/apache-maven/src/bin/m2.conf
@@ -1,6 +1,8 @@
 main is org.apache.maven.cli.MavenCli from plexus.core
 
+set maven.conf default ${maven.home}/conf
+
 [plexus.core]
-load       ${maven.home}/conf/logging
+load       ${maven.conf}/logging
 optionally ${maven.home}/lib/ext/*.jar
 load       ${maven.home}/lib/*.jar

http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/apache-maven/src/conf/settings.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/settings.xml b/apache-maven/src/conf/settings.xml
index 19d7a97..e27c579 100644
--- a/apache-maven/src/conf/settings.xml
+++ b/apache-maven/src/conf/settings.xml
@@ -32,7 +32,7 @@ under the License.
  |  2. Global Level. This settings.xml file provides configuration for all Maven
  |                 users on a machine (assuming they're all using the same Maven
  |                 installation). It's normally provided in
- |                 ${maven.home}/conf/settings.xml.
+ |                 ${maven.conf}/settings.xml.
  |
  |                 NOTE: This location can be overridden with the CLI option:
  |

http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/apache-maven/src/conf/toolchains.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/toolchains.xml b/apache-maven/src/conf/toolchains.xml
index aefddd8..b737c17 100644
--- a/apache-maven/src/conf/toolchains.xml
+++ b/apache-maven/src/conf/toolchains.xml
@@ -32,7 +32,7 @@ under the License.
  |  2. Global Level. This toolchains.xml file provides configuration for all Maven
  |                 users on a machine (assuming they're all using the same Maven
  |                 installation). It's normally provided in
- |                 ${maven.home}/conf/toolchains.xml.
+ |                 ${maven.conf}/toolchains.xml.
  |
  |                 NOTE: This location can be overridden with the CLI option:
  |

http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
index 820d886..207b9aa 100644
--- a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
@@ -66,7 +66,7 @@ public class DefaultMavenSettingsBuilder
         throws IOException, XmlPullParserException
     {
         File globalSettingsFile =
-            getFile( "${maven.home}/conf/settings.xml", "maven.home",
+            getFile( "${maven.conf}/settings.xml", "maven.conf",
                      MavenSettingsBuilder.ALT_GLOBAL_SETTINGS_XML_LOCATION );
 
         SettingsBuildingRequest request = new DefaultSettingsBuildingRequest();

http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/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 2b9f099..9da7c4d 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
@@ -142,7 +142,7 @@ public class MavenCli
     public static final File DEFAULT_USER_TOOLCHAINS_FILE = new File( userMavenConfigurationHome, "toolchains.xml" );
 
     public static final File DEFAULT_GLOBAL_TOOLCHAINS_FILE =
-        new File( System.getProperty( "maven.home", System.getProperty( "user.dir", "" ) ), "conf/toolchains.xml" );
+        new File( System.getProperty( "maven.conf" ), "toolchains.xml" );
 
     private static final String EXT_CLASS_PATH = "maven.ext.class.path";
 

http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
index 791a226..d9a6954 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
@@ -59,8 +59,8 @@ public class SettingsXmlConfigurationProcessor
 
     public static final File DEFAULT_USER_SETTINGS_FILE = new File( USER_MAVEN_CONFIGURATION_HOME, "settings.xml" );
 
-    public static final File DEFAULT_GLOBAL_SETTINGS_FILE = new File( System.getProperty( "maven.home", System
-        .getProperty( "user.dir", "" ) ), "conf/settings.xml" );
+    public static final File DEFAULT_GLOBAL_SETTINGS_FILE =
+        new File( System.getProperty( "maven.conf" ), "settings.xml" );
 
     @Requirement
     private Logger logger;

http://git-wip-us.apache.org/repos/asf/maven/blob/be5cacca/maven-embedder/src/site/apt/logging.apt
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
index cc9257d..d1eb53a 100644
--- a/maven-embedder/src/site/apt/logging.apt
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -54,7 +54,7 @@ Maven Logging
 
  Logging configuration loading is actually done by logging implementation, without any Maven extensions to support merging
  Maven installation configuration with per-user configuration for example:
- `${maven.home}/conf/logging` directory was added to core's classpath (see `${maven.home}/bin/m2.conf`). See your implementation
+ <<<$\{maven.conf}/logging>>> directory was added to core's classpath (see <<<$\{maven.home}/bin/m2.conf>>>). See your implementation
  documentation for details on file names, formats, and so on.
 
  During Maven initialization, Maven tweaks default root logging level to match CLI verbosity choice. Since such feature isn't available


[46/50] maven git commit: [MNG-5962] mvn.cmd fails when the current directory has spaces in between

Posted by sc...@apache.org.
[MNG-5962] mvn.cmd fails when the current directory has spaces in between


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

Branch: refs/heads/MNG-5359
Commit: 842b07be97fdb7d4f36e167f596eb185f9601169
Parents: 1351020
Author: Miriam Lee <mi...@gmail.com>
Authored: Thu Jan 14 13:56:36 2016 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 13:12:57 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn.cmd | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/842b07be/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 2321b9c..467269a 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -97,29 +97,30 @@ set MAVEN_CMD_LINE_ARGS=%*
 set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
 if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
 
-set EXEC_DIR=%CD%
-set WDIR=%EXEC_DIR%
+set "EXEC_DIR=%CD%"
+set "WDIR=%EXEC_DIR%"
+
 :findBaseDir
 if exist "%WDIR%\.mvn" goto baseDirFound
 cd ..
 IF "%WDIR%"=="%CD%" goto baseDirNotFound
-set WDIR=%CD%
+set "WDIR=%CD%"
 goto findBaseDir
 
 :baseDirFound
-set MAVEN_PROJECTBASEDIR=%WDIR%
+set "MAVEN_PROJECTBASEDIR=%WDIR%"
 cd "%EXEC_DIR%"
 goto endDetectBaseDir
 
 :baseDirNotFound
 if "_%EXEC_DIR:~-1%"=="_\" set EXEC_DIR=%EXEC_DIR:~0,-1%
-
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+set "MAVEN_PROJECTBASEDIR=%EXEC_DIR%"
 cd "%EXEC_DIR%"
 
 :endDetectBaseDir
 
-if not exist "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+set "jvmConfig=\.mvn\jvm.config"
+if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%"  goto endReadAdditionalConfig
 
 @setlocal EnableExtensions EnableDelayedExpansion
 for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a


[02/50] maven git commit: [MNG-6081] Log refactoring - Method Invocation Replaced By Variable

Posted by sc...@apache.org.
[MNG-6081] Log refactoring - Method Invocation Replaced By Variable


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

Branch: refs/heads/MNG-5359
Commit: a2358ba7bb9b5b8ccb4ca2b6ea66b637b88d6c09
Parents: 5053a62
Author: Nemo Chen <ch...@gmail.com>
Authored: Fri Oct 21 22:36:41 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 22 21:37:57 2017 +0100

----------------------------------------------------------------------
 .../apache/maven/artifact/resolver/DebugResolutionListener.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/a2358ba7/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
index 43806b1..bd1ed9a 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
@@ -71,7 +71,7 @@ public class DebugResolutionListener
 
         if ( omittedVersion != null ? !omittedVersion.equals( keptVersion ) : keptVersion != null )
         {
-            logger.debug( indent + omitted + " (removed - nearer found: " + kept.getVersion() + ")" );
+            logger.debug( indent + omitted + " (removed - nearer found: " + keptVersion + ")" );
         }
     }
 
@@ -164,4 +164,4 @@ public class DebugResolutionListener
         }
     }
 
-}
\ No newline at end of file
+}


[13/50] maven git commit: [MNG-6030] ReactorModelCache do not used effectively after maven version 3.0.5 which cause a large memory footprint o Reintroduced ReactorModelCache reduces the memory footprint.

Posted by sc...@apache.org.
[MNG-6030] ReactorModelCache do not used effectively after maven version 3.0.5 which cause a large memory footprint
 o Reintroduced ReactorModelCache reduces the memory footprint.


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

Branch: refs/heads/MNG-5359
Commit: cfb075ac706b25df630f3671f61f8d8313e0f138
Parents: 733eedc
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Tue May 31 21:39:31 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Tue Jan 24 20:19:10 2017 +0100

----------------------------------------------------------------------
 .../maven/project/DefaultProjectBuilder.java       | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/cfb075ac/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
index 9d51a6d..d064ab4 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
@@ -116,14 +116,14 @@ public class DefaultProjectBuilder
     public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest request )
         throws ProjectBuildingException
     {
-        return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null ) );
+        return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null, null ) );
     }
 
     @Override
     public ProjectBuildingResult build( ModelSource modelSource, ProjectBuildingRequest request )
         throws ProjectBuildingException
     {
-        return build( null, modelSource, new InternalConfig( request, null ) );
+        return build( null, modelSource, new InternalConfig( request, null, null ) );
     }
 
     private ProjectBuildingResult build( File pomFile, ModelSource modelSource, InternalConfig config )
@@ -275,7 +275,7 @@ public class DefaultProjectBuilder
         request.setUserProperties( configuration.getUserProperties() );
         request.setBuildStartTime( configuration.getBuildStartTime() );
         request.setModelResolver( resolver );
-        request.setModelCache( new ReactorModelCache() );
+        request.setModelCache( config.modelCache );
 
         return request;
     }
@@ -294,7 +294,7 @@ public class DefaultProjectBuilder
         org.eclipse.aether.artifact.Artifact pomArtifact = RepositoryUtils.toArtifact( artifact );
         pomArtifact = ArtifactDescriptorUtils.toPomArtifact( pomArtifact );
 
-        InternalConfig config = new InternalConfig( request, null );
+        InternalConfig config = new InternalConfig( request, null, null );
 
         boolean localProject;
 
@@ -394,7 +394,9 @@ public class DefaultProjectBuilder
 
         ReactorModelPool modelPool = new ReactorModelPool();
 
-        InternalConfig config = new InternalConfig( request, modelPool );
+        ReactorModelCache modelCache = new ReactorModelCache();
+
+        InternalConfig config = new InternalConfig( request, modelPool, modelCache );
 
         Map<String, MavenProject> projectIndex = new HashMap<>( 256 );
 
@@ -913,11 +915,14 @@ public class DefaultProjectBuilder
         public final List<RemoteRepository> repositories;
 
         public final ReactorModelPool modelPool;
+        
+        public final ReactorModelCache modelCache;
 
-        InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool )
+        InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool, ReactorModelCache modelCache )
         {
             this.request = request;
             this.modelPool = modelPool;
+            this.modelCache = modelCache;
             session =
                 LegacyLocalRepositoryManager.overlay( request.getLocalRepository(), request.getRepositorySession(),
                                                       repoSystem );


[29/50] maven git commit: [MNG-6105] properties.internal.SystemProperties.addSystemProperties() is not really thread-safe

Posted by sc...@apache.org.
[MNG-6105] properties.internal.SystemProperties.addSystemProperties() is not really thread-safe

Refactoring the current code setting system properties to synchronize correctly on the given ones: avoids ConcurrentModificationException and NullPointerException if the properties is modified by another thread.


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

Branch: refs/heads/MNG-5359
Commit: 5b4b8bd94c87afd2a1527d6a860e9673bdaf4a22
Parents: 1e2a80e
Author: Guillaume Bou� <gb...@apache.org>
Authored: Sun Oct 16 01:40:46 2016 +0200
Committer: Guillaume Bou� <gb...@apache.org>
Committed: Sat Jan 28 14:07:59 2017 +0100

----------------------------------------------------------------------
 .../internal/MavenRepositorySystemUtils.java    | 14 +++++----
 .../execution/DefaultMavenExecutionRequest.java |  4 +--
 .../project/DefaultProjectBuildingRequest.java  |  7 ++---
 .../properties/internal/SystemProperties.java   | 30 ++++++++++++++------
 .../building/DefaultModelBuildingRequest.java   |  5 +++-
 .../DefaultSettingsBuildingRequest.java         |  7 ++---
 6 files changed, 42 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5b4b8bd9/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
----------------------------------------------------------------------
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
index 5b240ef..1b11cb3 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
@@ -126,14 +126,18 @@ public final class MavenRepositorySystemUtils
 
         session.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, true ) );
 
+        final Properties systemProperties = new Properties();
+        
         // MNG-5670 guard against ConcurrentModificationException
-        Properties sysProps = new Properties();
-        for ( String key : System.getProperties().stringPropertyNames() )
+        // MNG-6053 guard against key without value
+        Properties sysProp = System.getProperties();
+        synchronized ( sysProp )
         {
-            sysProps.put( key, System.getProperty( key ) );
+            systemProperties.putAll( sysProp );
         }
-        session.setSystemProperties( sysProps );
-        session.setConfigProperties( sysProps );
+
+        session.setSystemProperties( systemProperties );
+        session.setConfigProperties( systemProperties );
 
         return session;
     }

http://git-wip-us.apache.org/repos/asf/maven/blob/5b4b8bd9/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
index 71a6894..d67061f 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
@@ -33,6 +33,7 @@ import org.apache.maven.eventspy.internal.EventSpyDispatcher;
 import org.apache.maven.model.Profile;
 import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.properties.internal.SystemProperties;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
@@ -535,8 +536,7 @@ public class DefaultMavenExecutionRequest
     {
         if ( properties != null )
         {
-            this.systemProperties = new Properties();
-            this.systemProperties.putAll( properties );
+            this.systemProperties = SystemProperties.copyProperties( properties );
         }
         else
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/5b4b8bd9/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
index f439240..f1b271b 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
@@ -28,6 +28,7 @@ import org.apache.commons.lang3.Validate;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.properties.internal.SystemProperties;
 import org.eclipse.aether.RepositorySystemSession;
 
 public class DefaultProjectBuildingRequest
@@ -165,11 +166,7 @@ public class DefaultProjectBuildingRequest
     {
         if ( systemProperties != null )
         {
-            this.systemProperties = new Properties();
-            synchronized ( systemProperties )
-            { // avoid concurrentmodification if someone else sets/removes an unrelated system property
-                this.systemProperties.putAll( systemProperties );
-            }
+            this.systemProperties = SystemProperties.copyProperties( systemProperties );
         }
         else
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/5b4b8bd9/maven-core/src/main/java/org/apache/maven/properties/internal/SystemProperties.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/properties/internal/SystemProperties.java b/maven-core/src/main/java/org/apache/maven/properties/internal/SystemProperties.java
index aa5fed9..3d6a969 100644
--- a/maven-core/src/main/java/org/apache/maven/properties/internal/SystemProperties.java
+++ b/maven-core/src/main/java/org/apache/maven/properties/internal/SystemProperties.java
@@ -33,19 +33,33 @@ public class SystemProperties
      */
     public static void addSystemProperties( Properties props )
     {
-        for ( String key : System.getProperties().stringPropertyNames() )
-        {
-            props.put( key, System.getProperty( key ) );
-        }
+        props.putAll( getSystemProperties() );
     }
 
     /**
-     * Returns System.properties copy.
+     * Returns a copy of {@link System#getProperties()} in a thread-safe manner.
+     * 
+     * @return {@link System#getProperties()} obtained in a thread-safe manner. 
      */
     public static Properties getSystemProperties()
     {
-        Properties systemProperties = new Properties();
-        addSystemProperties( systemProperties );
-        return systemProperties;
+        return copyProperties( System.getProperties() );
+    }
+
+    /**
+     * Copies the given {@link Properties} object into a new {@link Properties} object, in a thread-safe manner.
+     * @param properties Properties to copy.
+     * @return Copy of the given properties.
+     */
+    public static Properties copyProperties( Properties properties )
+    {
+        final Properties copyProperties = new Properties();
+        // guard against modification/removal of keys in the given properties (MNG-5670, MNG-6053, MNG-6105)
+        synchronized ( properties )
+        {
+            copyProperties.putAll( properties );
+        }
+        return copyProperties;
     }
+
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/5b4b8bd9/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
index a3505c9..84a68f7 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
@@ -286,7 +286,10 @@ public class DefaultModelBuildingRequest
         if ( systemProperties != null )
         {
             this.systemProperties = new Properties();
-            this.systemProperties.putAll( systemProperties );
+            synchronized ( systemProperties )
+            { // avoid concurrentmodification if someone else sets/removes an unrelated system property
+                this.systemProperties.putAll( systemProperties );
+            }
         }
         else
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/5b4b8bd9/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingRequest.java
----------------------------------------------------------------------
diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingRequest.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingRequest.java
index 5a4824e..4bb691b 100644
--- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingRequest.java
+++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingRequest.java
@@ -116,10 +116,9 @@ public class DefaultSettingsBuildingRequest
         if ( systemProperties != null )
         {
             this.systemProperties = new Properties();
-            // MNG-5670 guard against ConcurrentModificationException
-            for ( String key : System.getProperties().stringPropertyNames() )
-            {
-                this.systemProperties.put( key, System.getProperty( key ) );
+            synchronized ( systemProperties )
+            { // avoid concurrentmodification if someone else sets/removes an unrelated system property
+                this.systemProperties.putAll( systemProperties );
             }
         }
         else


[11/50] maven git commit: [MNG-5904] Remove the whole Ant build

Posted by sc...@apache.org.
[MNG-5904] Remove the whole Ant build


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

Branch: refs/heads/MNG-5359
Commit: 8b661620521de63586f825257e9c08c37e251eb5
Parents: be5cacc
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Fri Dec 11 19:41:02 2015 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 18:40:07 2017 +0100

----------------------------------------------------------------------
 README.md                                    |   6 +-
 apache-maven/README.txt                      |   2 +-
 apache-maven/pom.xml                         |  55 +++-
 apache-maven/src/main/assembly/bin.xml       |  74 +-----
 apache-maven/src/main/assembly/component.xml |  89 +++++++
 apache-maven/src/main/assembly/dir.xml       |  30 +++
 apache-maven/src/main/assembly/src.xml       |   3 +-
 build.xml                                    | 307 ----------------------
 maven-ant-tasks-2.1.1.jar                    | Bin 1314262 -> 0 bytes
 9 files changed, 184 insertions(+), 382 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a263dca..7a5ed4d 100644
--- a/README.md
+++ b/README.md
@@ -12,12 +12,12 @@ Maven is available under the [Apache License, Version 2.0](http://www.apache.org
 If you want to bootstrap Maven, you'll need:
 
 - Java 1.7+
-- Ant 1.8 or later
+- Maven 3.0.5 or later
 
-Run Ant, specifying a location into which the completed Maven distro should be installed:
+Run Maven, specifying a location into which the completed Maven distro should be installed:
 
 ```
-ant -Dmaven.home="$HOME/apps/maven/apache-maven-3.3.x-SNAPSHOT"
+mvn -DdistributionTargetDir="$HOME/app/maven/apache-maven-3.5.x-SNAPSHOT" clean package
 ```
 
 Once the build completes, you should have a new Maven distro ready to roll in that directory!

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/apache-maven/README.txt
----------------------------------------------------------------------
diff --git a/apache-maven/README.txt b/apache-maven/README.txt
index b05080d..cbaa7d4 100644
--- a/apache-maven/README.txt
+++ b/apache-maven/README.txt
@@ -16,7 +16,7 @@
   Release Notes
   -------------
 
-  The full list of changes can be found at http://maven.apache.org/release-notes.html.
+  The full list of changes can be found at http://maven.apache.org/docs/history.html.
 
   System Requirements
   -------------------

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 2db95cf..735e5b8 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -151,7 +151,7 @@
         <artifactId>maven-assembly-plugin</artifactId>
         <executions>
           <execution>
-            <id>create-distro</id>
+            <id>create-distro-packages</id>
             <phase>package</phase>
             <goals>
               <goal>single</goal>
@@ -182,6 +182,59 @@
 
   <profiles>
     <profile>
+      <id>create-distribution-in-dir</id>
+      <activation>
+        <property>
+          <name>distributionTargetDir</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>clean</goal>
+                </goals>
+                <id>clean-target-dir</id>
+                <phase>prepare-package</phase>
+                <configuration>
+                  <filesets>
+                    <fileset>
+                      <directory>${distributionTargetDir}</directory>
+                    </fileset>
+                  </filesets>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>create-distribution-dir</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>single</goal>
+                </goals>
+                <configuration>
+                  <finalName>./</finalName>
+                  <appendAssemblyId>false</appendAssemblyId>
+                  <attach>false</attach>
+                  <outputDirectory>${distributionTargetDir}</outputDirectory>
+                  <descriptors>
+                    <descriptor>src/main/assembly/dir.xml</descriptor>
+                  </descriptors>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
       <id>apache-release</id>
       <build>
         <plugins>

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/apache-maven/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/main/assembly/bin.xml b/apache-maven/src/main/assembly/bin.xml
index ea14a9d..79723c2 100644
--- a/apache-maven/src/main/assembly/bin.xml
+++ b/apache-maven/src/main/assembly/bin.xml
@@ -17,78 +17,14 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<assembly>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
   <id>bin</id>
   <formats>
     <format>zip</format>
     <format>tar.gz</format>
   </formats>
-  <dependencySets>
-    <dependencySet>
-      <useProjectArtifact>false</useProjectArtifact>
-      <outputDirectory>boot</outputDirectory>
-      <includes>
-        <include>org.codehaus.plexus:plexus-classworlds</include>
-      </includes>
-    </dependencySet>
-    <dependencySet>
-      <useProjectArtifact>false</useProjectArtifact>
-      <outputDirectory>lib</outputDirectory>
-      <excludes>
-        <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
-      </excludes>
-    </dependencySet>
-  </dependencySets>
-  <fileSets>
-    <fileSet>
-      <includes>
-        <include>README*</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>target/maven-shared-archive-resources/META-INF</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>LICENSE</include>
-        <include>NOTICE</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>target/licenses/lib</directory>
-      <outputDirectory>lib</outputDirectory>
-      <includes>
-        <include>**</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>src/bin</directory>
-      <outputDirectory>bin</outputDirectory>
-      <includes>
-        <include>*.cmd</include>
-        <include>*.conf</include>
-      </includes>
-      <lineEnding>dos</lineEnding>
-    </fileSet>
-    <fileSet>
-      <directory>src/bin</directory>
-      <outputDirectory>bin</outputDirectory>
-      <includes>
-        <include>m2</include>
-        <include>mvn</include>
-        <include>mvnDebug</include>
-        <!-- This is so that CI systems can periodically run the profiler -->
-        <include>mvnyjp</include>
-      </includes>
-      <lineEnding>unix</lineEnding>
-      <fileMode>0755</fileMode>
-    </fileSet>
-    <fileSet>
-      <directory>src/conf</directory>
-      <outputDirectory>conf</outputDirectory>
-    </fileSet>
-    <fileSet>
-      <directory>src/lib</directory>
-      <outputDirectory>lib</outputDirectory>
-    </fileSet>
-  </fileSets>
+  <componentDescriptors>
+    <componentDescriptor>src/main/assembly/component.xml</componentDescriptor>
+  </componentDescriptors>
 </assembly>

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/apache-maven/src/main/assembly/component.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/main/assembly/component.xml b/apache-maven/src/main/assembly/component.xml
new file mode 100644
index 0000000..8ccf02a
--- /dev/null
+++ b/apache-maven/src/main/assembly/component.xml
@@ -0,0 +1,89 @@
+<!--
+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.
+-->
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3 http://maven.apache.org/xsd/component-1.1.3.xsd">
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <outputDirectory>boot</outputDirectory>
+      <includes>
+        <include>org.codehaus.plexus:plexus-classworlds</include>
+      </includes>
+    </dependencySet>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <outputDirectory>lib</outputDirectory>
+      <excludes>
+        <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
+      </excludes>
+    </dependencySet>
+  </dependencySets>
+  <fileSets>
+    <fileSet>
+      <includes>
+        <include>README*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/maven-shared-archive-resources/META-INF</directory>
+      <outputDirectory>./</outputDirectory>
+      <includes>
+        <include>LICENSE</include>
+        <include>NOTICE</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/licenses/lib</directory>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>**</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>*.cmd</include>
+        <include>*.conf</include>
+      </includes>
+      <lineEnding>dos</lineEnding>
+    </fileSet>
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>m2</include>
+        <include>mvn</include>
+        <include>mvnDebug</include>
+        <!-- This is so that CI systems can periodically run the profiler -->
+        <include>mvnyjp</include>
+      </includes>
+      <lineEnding>unix</lineEnding>
+      <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>src/conf</directory>
+      <outputDirectory>conf</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>src/lib</directory>
+      <outputDirectory>lib</outputDirectory>
+    </fileSet>
+  </fileSets>
+</component>

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/apache-maven/src/main/assembly/dir.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/main/assembly/dir.xml b/apache-maven/src/main/assembly/dir.xml
new file mode 100644
index 0000000..0d2b887
--- /dev/null
+++ b/apache-maven/src/main/assembly/dir.xml
@@ -0,0 +1,30 @@
+<!--
+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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+  <id>dir</id>
+  <formats>
+    <format>dir</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <componentDescriptors>
+    <componentDescriptor>src/main/assembly/component.xml</componentDescriptor>
+  </componentDescriptors>
+</assembly>

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/apache-maven/src/main/assembly/src.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/main/assembly/src.xml b/apache-maven/src/main/assembly/src.xml
index 3bf10e0..fb0aee8 100644
--- a/apache-maven/src/main/assembly/src.xml
+++ b/apache-maven/src/main/assembly/src.xml
@@ -17,7 +17,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<assembly>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
   <id>src</id>
   <formats>
     <format>zip</format>

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
deleted file mode 100644
index ccfca3b..0000000
--- a/build.xml
+++ /dev/null
@@ -1,307 +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.
--->
-
-<!-- START SNIPPET: ant-bootstrap
-
-By default the bootstrap will use ~/.m2/repository as the integration repository but you can define the integration
-repository by specifying a property on the command line:
-
-ant -Dmaven.repo.local=/my/integration/repository
-
-Those familiar with Maven will note this is the same way the local repository can be set from the command-line.
-This facilitates having a set of builds converge on the same repository for integration purposes.
-
-END SNIPPET: ant-bootstrap -->
-
-<project default="all" basedir="." xmlns:artifact="urn:maven-artifact-ant">
-
-  <property name="distributionDirectory" value="apache-maven"/>
-  <property name="distributionId" value="apache-maven"/>
-  <property name="distributionShortName" value="Maven"/>
-  <property name="distributionName" value="Apache Maven"/>
-  <property name="it.workdir.version" value="3.0.x" />
-  <property name="maven-compile.jvmargs" value="-Xmx512m -Xms512m"/>
-  <property name="maven-compile.fork" value="true"/>
-  <property name="maven-compile.maxmemory" value="512m"/>
-
-  <target name="initTaskDefs">
-    <echo>Building ${distributionName} ...</echo>
-    <xmlproperty file="pom.xml" prefix="xmlPom" />
-    <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.1.1.jar" />
-    <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
-  </target>
-
-  <target name="isMavenHomeSet" depends="initTaskDefs">
-    <property environment="env" />
-    <condition property="maven.home" value="${env.M2_HOME}">
-      <isset property="env.M2_HOME" />
-    </condition>
-    <fail message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script">
-      <condition>
-        <or>
-          <not>
-            <isset property="maven.home" />
-          </not>
-          <equals arg1="${maven.home}" arg2="" trim="true" />
-        </or>
-      </condition>
-    </fail>
-    <available property="maven.home.exists" file="${maven.home}" />
-  </target>
-
-  <target name="prompt-maven-home-exists" depends="isMavenHomeSet" if="maven.home.exists">
-    <input addproperty="maven.home.exists.continue" validargs="yes,no" defaultvalue="no">WARNING:
-The specified target directory
-  ${maven.home}
-already exists. It will be deleted and overwritten by the build.
-Do you want to continue?</input>
-    <fail message="Build was aborted by user">
-      <condition>
-        <equals arg1="${maven.home.exists.continue}" arg2="no" trim="true" casesensitive="false" />
-      </condition>
-    </fail>
-  </target>
-
-  <target name="init" depends="isMavenHomeSet">
-    <!-- Initialize properties -->
-    <property name="maven.home.basename.expected" value="${distributionId}-${xmlPom.project.version}" />
-    <property name="maven.assembly" location="${distributionDirectory}/target/${maven.home.basename.expected}-bin.zip" />
-    <property name="maven.repo.local" value="${user.home}/.m2/repository" />
-    <property name="maven.debug" value="-e" />
-    <property name="maven.test.skip" value="false" />
-    <property name="skipTests" value="false" />
-    <property name="surefire.useFile" value="true" />
-    <property name="maven.test.redirectTestOutputToFile" value="${surefire.useFile}" />
-    <property name="maven.goal" value="install" />
-    <echo>maven.home = ${maven.home}</echo>
-    <echo>maven.repo.local = ${maven.repo.local}</echo>
-    <echo>distributionId = ${distributionId}</echo>
-    <echo>distributionName = ${distributionName}</echo>
-    <echo>distributionDirectory = ${distributionDirectory}</echo>
-  </target>
-
-  <target name="clean-bootstrap" description="cleans up generated bootstrap classes">
-    <delete dir="bootstrap" />
-  </target>
-
-  <target name="pull" depends="init" unless="skip.pull">
-    <!-- Pull the dependencies that Maven needs to build -->
-    <copy file="pom.xml" tofile="dependencies.xml" />
-    <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-start-comment--&gt;" value="&lt;!--" />
-    <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-end-comment--&gt;" value="--&gt;" />
-    <artifact:pom file="${basedir}/dependencies.xml" id="pom">
-      <localRepository path="${maven.repo.local}" />
-    </artifact:pom>
-    <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" useScope="compile">
-      <localRepository path="${maven.repo.local}" />
-      <pom refid="pom" />
-    </artifact:dependencies>
-    <delete file="${basedir}/dependencies.xml" />
-
-    <!-- Pull the dependencies for Modello -->
-    <artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset">
-      <localRepository path="${maven.repo.local}" />
-      <dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="${pom.properties.modelloVersion}" />
-    </artifact:dependencies>
-
-    <!-- Pull the dependencies for the MetadataGenerator CLI -->
-    <artifact:dependencies pathId="pmdg.pathid" filesetId="pmdg.fileset">
-      <localRepository path="${maven.repo.local}" />
-      <dependency groupId="org.codehaus.plexus" artifactId="plexus-component-metadata" version="${pom.properties.plexusVersion}" />
-    </artifact:dependencies>
-
-  </target>
-
-  <target name="process-classes" depends="pull" description="generates plexus component metadata.">
-    <mkdir dir="${basedir}/bootstrap/target" />
-    <mkdir dir="${basedir}/bootstrap/target/classes" />
-
-    <path id="pmdg.classpath">
-      <path refid="maven.classpath" />
-      <path refid="pmdg.pathid" />
-    </path>
-
-    <echo>Using plexus version ${pom.properties.plexusVersion}</echo>
-    <java fork="true" classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" failonerror="true">
-      <classpath refid="pmdg.classpath" />
-      <!-- We need to generate component descriptors from the maven-artifact sources which use javadoc annotations. -->
-      <arg value="--source" />
-      <arg value="${basedir}/maven-compat/src/main/java" />
-      <!-- We have separated the artifact handlers and lifecycle mappings into a separate file. -->
-      <arg value="--descriptors" />
-      <arg value="${basedir}/maven-core/src/main/resources/META-INF/plexus" />
-      <!-- Search the classes for annotations that we've compiled. -->
-      <arg value="--classes" />
-      <arg value="${basedir}/bootstrap/target/classes" />
-      <!-- We'll make one big fat components descriptor. -->
-      <arg value="--output" />
-      <arg value="${basedir}/bootstrap/target/classes/META-INF/plexus/components.xml" />
-    </java>
-  </target>
-
-  <target name="generate-sources" depends="pull" description="generates Java sources from Modello mdo model files">
-    <mkdir dir="bootstrap/target" />
-    <mkdir dir="bootstrap/target/generated-sources" />
-
-    <macrodef name="modello-single-mode">
-      <attribute name="file" />
-      <attribute name="mode" />
-      <attribute name="version" />
-      <sequential>
-        <java fork="true" classname="org.codehaus.modello.ModelloCli" failonerror="true">
-          <classpath refid="modello.pathid" />
-          <arg file="@{file}" />
-          <!-- model file -->
-          <arg value="@{mode}" />
-          <!-- output type -->
-          <arg file="bootstrap/target/generated-sources" />
-          <!-- output directory -->
-          <arg value="@{version}" />
-          <!-- model version -->
-          <arg value="false" />
-          <!-- package with version -->
-          <arg value="true" />
-          <!-- use Java 5 -->
-          <arg value="UTF-8" />
-          <!-- encoding -->
-        </java>
-      </sequential>
-    </macrodef>
-
-    <macrodef name="modello">
-      <attribute name="file" />
-      <attribute name="version" default="1.0.0" />
-      <sequential>
-        <echo taskname="modello" message="Generating sources for @{file}" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="java" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-reader" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-writer" />
-      </sequential>
-    </macrodef>
-
-    <macrodef name="modello-ex">
-      <attribute name="file" />
-      <attribute name="version" default="1.0.0" />
-      <sequential>
-        <modello file="@{file}" version="@{version}" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-extended-reader" />
-      </sequential>
-    </macrodef>
-
-    <modello-ex file="maven-model/src/main/mdo/maven.mdo" version="4.0.0" />
-    <modello file="maven-plugin-api/src/main/mdo/lifecycle.mdo" />
-    <modello file="maven-model-builder/src/main/mdo/profiles.mdo" />
-    <modello file="maven-settings/src/main/mdo/settings.mdo" version="1.1.0" />
-    <modello file="maven-core/src/main/mdo/toolchains.mdo" version="1.1.0" />
-    <modello file="maven-repository-metadata/src/main/mdo/metadata.mdo" version="1.1.0" />
-    <modello file="maven-compat/src/main/mdo/profiles.mdo" />
-    <modello file="maven-compat/src/main/mdo/paramdoc.mdo" />
-    <modello file="maven-embedder/src/main/mdo/core-extensions.mdo" />
-  </target>
-
-  <target name="compile-boot" depends="generate-sources" description="compiles the bootstrap sources">
-    <path id="sources">
-      <dirset dir=".">
-        <include name="bootstrap/target/generated-sources" />
-        <include name="*/src/main/java" />
-      </dirset>
-    </path>
-
-    <mkdir dir="bootstrap/target/classes" />
-    <javac destdir="bootstrap/target/classes" encoding="UTF-8" source="1.7" target="1.7" debug="true" includeAntRuntime="false">
-      <src refid="sources" />
-      <classpath refid="pom.pathid" />
-    </javac>
-
-    <copy todir="bootstrap/target/classes" encoding="ISO-8859-1">
-      <fileset dir="maven-core/src/main/resources">
-        <include name="**/build.properties" />
-      </fileset>
-      <filterset begintoken="${" endtoken="}">
-        <filter token="project.version" value="${xmlPom.project.version}"/>
-      </filterset>
-    </copy>
-    <echo file="bootstrap/target/classes/META-INF/maven/org.apache.maven/maven-core/pom.properties" encoding="ISO-8859-1">
-      version = ${xmlPom.project.version}
-    </echo>
-
-    <path id="maven.classpath">
-      <pathelement location="bootstrap/target/classes" />
-      <dirset dir=".">
-        <include name="*/src/main/resources" />
-      </dirset>
-      <path refid="pom.pathid" />
-    </path>
-  </target>
-
-  <target name="maven-compile" depends="compile-boot,process-classes" description="compiles Maven using the bootstrap Maven, skipping automated tests">
-    <java fork="${maven-compile.fork}" classname="org.apache.maven.cli.MavenCli" failonerror="true" timeout="600000"  maxmemory="${maven-compile.maxmemory}">
-      <!--jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/-->
-      <!--jvmarg value="${maven-compile.jvmargs}"/-->
-      <classpath refid="maven.classpath" />
-      <arg value="${maven.debug}" />
-      <arg value="-B" />
-      <arg value="-V" />
-      <arg value="clean" />
-      <arg value="${maven.goal}" />
-      <arg value="-Dmaven.test.skip=${maven.test.skip}" />
-      <arg value="-DskipTests=${skipTests}" />
-      <arg value="-Dmaven.repo.local=${maven.repo.local}" />
-      <arg value="-Dsurefire.useFile=${surefire.useFile}" />
-      <arg value="-Dmaven.test.redirectTestOutputToFile=${maven.test.redirectTestOutputToFile}" />
-      <arg value="-DdistributionId=${distributionId}" />
-      <arg value="-DdistributionShortName=${distributionShortName}" />
-      <arg value="-DdistributionName=${distributionName}" />
-      <jvmarg value="-Dmaven.multiModuleProjectDirectory=${basedir}" />
-    </java>
-  </target>
-
-  <target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">
-    <echo>
-The new Maven distribution was created as part of the MAVEN-COMPILE step, above.
-This goal just validates the presence of that distribution.
-</echo>
-    <condition property="build.failed">
-      <not>
-        <available file="${maven.assembly}" />
-      </not>
-    </condition>
-    <fail if="build.failed" message="Assembly task seemed to succeed, but couldn't find assembly file: ${maven.assembly}" />
-  </target>
-
-  <target name="extract-assembly" depends="init,prompt-maven-home-exists,maven-assembly" description="extracts the maven assembly into maven.home">
-    <echo>Extracting assembly to ${maven.home} ...</echo>
-    <!-- If we are starting from scratch make sure the directory is created -->
-    <delete dir="${maven.home}" />
-    <mkdir dir="${maven.home}" />
-    <unzip src="${maven.assembly}" dest="${maven.home}">
-      <mapper type="regexp" from="^[^\\/]+[\\/](.*)$$" to="\1" />
-    </unzip>
-    <chmod perm="+x">
-      <fileset dir="${maven.home}/bin">
-        <include name="mvn" />
-        <include name="mvnDebug" />
-        <include name="mvnyjp" />
-      </fileset>
-    </chmod>
-  </target>
-
-  <target name="all" depends="clean-bootstrap,init,extract-assembly" />
-
-</project>

http://git-wip-us.apache.org/repos/asf/maven/blob/8b661620/maven-ant-tasks-2.1.1.jar
----------------------------------------------------------------------
diff --git a/maven-ant-tasks-2.1.1.jar b/maven-ant-tasks-2.1.1.jar
deleted file mode 100644
index 7810a54..0000000
Binary files a/maven-ant-tasks-2.1.1.jar and /dev/null differ


[42/50] maven git commit: [MNG-6068] Document default scope compile in XSD o Added information about default scope in XSD comment.

Posted by sc...@apache.org.
[MNG-6068] Document default scope compile in XSD
 o Added information about default scope in XSD comment.


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

Branch: refs/heads/MNG-5359
Commit: 1f0493431be3bd0f25757b5ba0ed98b3a41b3374
Parents: 5a46234
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Mon Jul 18 11:56:40 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Mon Jan 30 09:21:49 2017 +0100

----------------------------------------------------------------------
 maven-model/src/main/mdo/maven.mdo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/1f049343/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 5eba3ea..2f4ea0c 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -1398,7 +1398,7 @@
             It also assists in determining which artifacts to include in a distribution of
             this project. For more information, see
             <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
-            dependency mechanism</a>.
+            dependency mechanism</a>. If no scope is given the scope is <code>compile</code>.
             ]]>
           </description>
           <type>String</type>


[05/50] maven git commit: [MNG-5975] Use Java 7's SimpleDateFormat in CLIReportingUtils#formatTimestamp

Posted by sc...@apache.org.
[MNG-5975] Use Java 7's SimpleDateFormat in CLIReportingUtils#formatTimestamp


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

Branch: refs/heads/MNG-5359
Commit: 355f4dff03cea8cab0d7bdcb00fffa4e43b2c10b
Parents: a2358ba
Author: Michael Osipov <mi...@apache.org>
Authored: Fri Feb 12 23:30:47 2016 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 22 21:37:57 2017 +0100

----------------------------------------------------------------------
 .../org/apache/maven/cli/CLIReportingUtils.java | 32 ++++++--------------
 1 file changed, 10 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/355f4dff/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 2397d5d..214704b 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -19,15 +19,15 @@ package org.apache.maven.cli;
  * under the License.
  */
 
-import org.codehaus.plexus.util.Os;
-import org.slf4j.Logger;
-
 import java.io.IOException;
 import java.io.InputStream;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
 import java.util.Properties;
-import java.util.TimeZone;
+
+import org.codehaus.plexus.util.Os;
+import org.slf4j.Logger;
 
 /**
  * Utility class used to report errors, statistics, application version info, etc.
@@ -152,24 +152,8 @@ public final class CLIReportingUtils
 
     public static String formatTimestamp( long timestamp )
     {
-        // Manual construction of the tz offset because only Java 7 is aware of ISO 8601 time zones
-        TimeZone tz = TimeZone.getDefault();
-        int offset = tz.getRawOffset();
-
-        // Raw offset ignores DST, so check if we are in DST now and add the offset
-        if ( tz.inDaylightTime( new Date( timestamp ) ) )
-        {
-            offset += tz.getDSTSavings();
-        }
-
-        // CHECKSTYLE_OFF: MagicNumber
-        long m = Math.abs( ( offset / ONE_MINUTE ) % 60 );
-        long h = Math.abs( ( offset / ONE_HOUR ) % 24 );
-        // CHECKSTYLE_ON: MagicNumber
-
-        int offsetDir = (int) Math.signum( (float) offset );
-        char offsetSign = offsetDir >= 0 ? '+' : '-';
-        return String.format( "%tFT%<tT%s%02d:%02d", timestamp, offsetSign, h, m );
+        SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssXXX" );
+        return sdf.format( new Date( timestamp ) );
     }
 
     public static String formatDuration( long duration )
@@ -185,18 +169,22 @@ public final class CLIReportingUtils
         String format;
         if ( d > 0 )
         {
+            // Length 11+ chars
             format = "%d d %02d:%02d h";
         }
         else if ( h > 0 )
         {
+            // Length 7 chars
             format = "%2$02d:%3$02d h";
         }
         else if ( m > 0 )
         {
+            // Length 9 chars
             format = "%3$02d:%4$02d min";
         }
         else
         {
+            // Length 7-8 chars
             format = "%4$d.%5$03d s";
         }
 


[28/50] maven git commit: [MNG-5883] Silence unnecessary legacy local repository warning

Posted by sc...@apache.org.
[MNG-5883] Silence unnecessary legacy local repository warning

o Updated to decrease logging level from 'warning' to 'info'.


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

Branch: refs/heads/MNG-5359
Commit: 1e2a80eced0f01c182458a2c7e7919634fa632f6
Parents: 6b31c4a
Author: Christian Schulte <sc...@apache.org>
Authored: Mon Jan 25 02:40:03 2016 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Thu Jan 26 20:30:37 2017 +0100

----------------------------------------------------------------------
 .../aether/DefaultRepositorySystemSessionFactory.java        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/1e2a80ec/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
index 0c91cf9..a0c5444 100644
--- a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
+++ b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
@@ -132,16 +132,16 @@ public class DefaultRepositorySystemSessionFactory
 
         if ( request.isUseLegacyLocalRepository() )
         {
-            logger.warn( "Disabling enhanced local repository: using legacy is strongly discouraged to ensure"
-                             + " build reproducibility." );
             try
             {
                 session.setLocalRepositoryManager( simpleLocalRepoMgrFactory.newInstance( session, localRepo ) );
+                logger.info( "Disabling enhanced local repository: using legacy is strongly discouraged to ensure"
+                                 + " build reproducibility." );
+
             }
             catch ( NoLocalRepositoryManagerException e )
             {
-
-                logger.warn( "Failed to configure legacy local repository: back to default" );
+                logger.error( "Failed to configure legacy local repository: falling back to default" );
                 session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( session, localRepo ) );
             }
         }


[15/50] maven git commit: point to our documentation on plugins dependencies upgrade

Posted by sc...@apache.org.
point to our documentation on plugins dependencies upgrade

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

Branch: refs/heads/MNG-5359
Commit: cfbad56f65b9d664c7967122b76a5389931080f8
Parents: 84085c0
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sun May 29 09:55:54 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 23:50:10 2017 +0100

----------------------------------------------------------------------
 maven-compat/src/site/apt/index.apt | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/cfbad56f/maven-compat/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-compat/src/site/apt/index.apt b/maven-compat/src/site/apt/index.apt
new file mode 100644
index 0000000..a288cdc
--- /dev/null
+++ b/maven-compat/src/site/apt/index.apt
@@ -0,0 +1,32 @@
+~~ 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.
+
+ -----
+ Introduction
+ -----
+ Herv� Boutemy
+ -----
+ 2016-05-29
+ -----
+
+Maven Compat
+
+ Maven2 classes maintained as compatibility layer for plugins that need to keep Maven2 compatibility.
+
+ Plugins should avoid these classes and be updated to use only Maven3 dependencies (and require Maven3): see
+ {{{https://cwiki.apache.org/confluence/display/MAVEN/Plugin+migration+to+Maven3+dependencies} Plugin migration to Maven3 dependencies}}
+ documentation to get hints on how to make the update.


[27/50] maven git commit: [MNG-5958] restore binary compatibility of Lifecycle.setPhases

Posted by sc...@apache.org.
[MNG-5958] restore binary compatibility of Lifecycle.setPhases

While MNG-5805 restored binary compatibility of Lifecycle.getPhases
it didn't do the same for Lifecycle.setPhases. This breaks plugins
like flexmojos-maven-plugin which have their own lifecycle mapping
implementations.

This closes #77


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

Branch: refs/heads/MNG-5359
Commit: 6b31c4a556f51cd1c2064fe773550c0acf14d307
Parents: f20a5d9
Author: Stuart McCulloch <mc...@gmail.com>
Authored: Wed Jan 6 11:23:06 2016 +0000
Committer: Christian Schulte <sc...@apache.org>
Committed: Thu Jan 26 20:19:57 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/lifecycle/mapping/Lifecycle.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6b31c4a5/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java
index d2b6d6c..c14cf94 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java
@@ -106,8 +106,13 @@ public class Lifecycle
     }
 
     @Deprecated
-    public void setPhases( Map<String, LifecyclePhase> phases )
+    public void setPhases( Map<String, String> phases )
     {
-        setLifecyclePhases( phases );
+        Map<String, LifecyclePhase> lphases = new LinkedHashMap<>();
+        for ( Map.Entry<String, String> e: phases.entrySet() )
+        {
+            lphases.put( e.getKey(), new LifecyclePhase( e.getValue() ) );
+        }
+        setLifecyclePhases( lphases );
     }
 }


[38/50] maven git commit: [MNG-6078] Can't overwrite properties which have been defined in .mvn/maven.config o Reversed the order of properties only to get the properties from command line at the end of the properties list which results in correct

Posted by sc...@apache.org.
[MNG-6078] Can't overwrite properties which have been defined in
.mvn/maven.config
 o Reversed the order of properties only to get the properties from
   command line at the end of the properties list which results
   in correct behaviour to be able to overwrite properties from
   command line for properties which have been defined in
   .mvn/maven.config file.


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

Branch: refs/heads/MNG-5359
Commit: ca4303031357a7decaee8de770b71fb2c2fedd28
Parents: 4604c49
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sun Aug 7 12:21:01 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sun Jan 29 21:17:36 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/cli/MavenCli.java     | 12 ++++-
 .../java/org/apache/maven/cli/MavenCliTest.java | 53 ++++++++++++++++++--
 .../mavenConfigProperties/.mvn/maven.config     |  3 ++
 3 files changed, 62 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/ca430303/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 633d533..a27517b 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
@@ -27,6 +27,7 @@ import com.google.inject.AbstractModule;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.ParseException;
 import org.apache.commons.cli.UnrecognizedOptionException;
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.maven.BuildAbort;
 import org.apache.maven.InternalErrorException;
 import org.apache.maven.Maven;
@@ -542,7 +543,9 @@ public class MavenCli
         }
     }
 
-    private void properties( CliRequest cliRequest )
+    //Needed to make this method package visible to make writing a unit test possible
+    //Maybe it's better to move some of those methods to separate class (SoC).
+    void properties( CliRequest cliRequest )
     {
         populateProperties( cliRequest.commandLine, cliRequest.systemProperties, cliRequest.userProperties );
     }
@@ -1581,9 +1584,14 @@ public class MavenCli
         if ( commandLine.hasOption( CLIManager.SET_SYSTEM_PROPERTY ) )
         {
             String[] defStrs = commandLine.getOptionValues( CLIManager.SET_SYSTEM_PROPERTY );
-
+            
             if ( defStrs != null )
             {
+                //The following is needed to get precedence
+                //of properties which are defined on command line
+                //over properties defined in the .mvn/maven.config. 
+                ArrayUtils.reverse( defStrs );
+                
                 for ( String defStr : defStrs )
                 {
                     setCliProperty( defStr, userProperties );

http://git-wip-us.apache.org/repos/asf/maven/blob/ca430303/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 c8d75b1..d926624 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
@@ -21,10 +21,10 @@ package org.apache.maven.cli;
 
 import java.io.File;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.cli.ParseException;
 
+import junit.framework.TestCase;
+
 public class MavenCliTest
     extends TestCase
 {
@@ -81,8 +81,8 @@ public class MavenCliTest
         // read .mvn/maven.config
         cli.initialize( request );
         cli.cli( request );
-        assertEquals( "multithreaded", request.commandLine.getOptionValue( "builder" ) );
-        assertEquals( "8", request.commandLine.getOptionValue( "threads" ) );
+        assertEquals( "multithreaded", request.commandLine.getOptionValue( CLIManager.BUILDER ) );
+        assertEquals( "8", request.commandLine.getOptionValue( CLIManager.THREADS ) );
 
         // override from command line
         request = new CliRequest( new String[] { "--builder", "foobar" }, null );
@@ -107,4 +107,49 @@ public class MavenCliTest
 
         }
     }
+    
+    /**
+     * Read .mvn/maven.config with the following definitions:
+     * <pre>
+     *   -T 3
+     *   -Drevision=1.3.0
+     * </pre>
+     * and check if the {@code -T 3} option can be overwritten via command line
+     * argument.
+     * @throws Exception in case of failure.
+     */
+    public void testMVNConfigurationThreadCanBeOverwrittenViaCommandLine() throws Exception {
+        System.setProperty( MavenCli.MULTIMODULE_PROJECT_DIRECTORY, new File( "src/test/projects/mavenConfigProperties" ).getCanonicalPath() );
+        CliRequest request = new CliRequest( new String[]{ "-T", "5" }, null );
+
+        cli.initialize( request );
+        // read .mvn/maven.config
+        cli.cli( request );
+        
+        assertEquals( "5", request.commandLine.getOptionValue( CLIManager.THREADS ) );
+    }
+    
+    /**
+     * Read .mvn/maven.config with the following definitions:
+     * <pre>
+     *   -T 3
+     *   -Drevision=1.3.0
+     * </pre>
+     * and check if the {@code -Drevision-1.3.0} option can be overwritten via command line
+     * argument.
+     * @throws Exception
+     */
+    public void testMVNConfigurationDefinedPropertiesCanBeOverwrittenViaCommandLine() throws Exception {
+        System.setProperty( MavenCli.MULTIMODULE_PROJECT_DIRECTORY, new File( "src/test/projects/mavenConfigProperties" ).getCanonicalPath() );
+        CliRequest request = new CliRequest( new String[]{ "-Drevision=8.1.0"}, null );
+
+        cli.initialize( request );
+        // read .mvn/maven.config
+        cli.cli( request );
+        cli.properties( request );
+        
+        String revision = System.getProperty( "revision" );
+        assertEquals( "8.1.0", revision );
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/ca430303/maven-embedder/src/test/projects/mavenConfigProperties/.mvn/maven.config
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/projects/mavenConfigProperties/.mvn/maven.config b/maven-embedder/src/test/projects/mavenConfigProperties/.mvn/maven.config
new file mode 100644
index 0000000..c73de53
--- /dev/null
+++ b/maven-embedder/src/test/projects/mavenConfigProperties/.mvn/maven.config
@@ -0,0 +1,3 @@
+-T 3
+-Drevision=1.3.0
+


[06/50] maven git commit: [MNG-5977] Improve output readability of our MavenTransferListener implementations

Posted by sc...@apache.org.
[MNG-5977] Improve output readability of our MavenTransferListener implementations

* Applied a general decimal formatter which automatically scales file sizes between [0,10) (one decimal digit) and [10,1000) (whole numbers) along with proper size and time units
* The progress meter will now properly
** tell the amount of transfers along with file names (in debug mode) and absolute progress by size
** visually seperate parallel transfers with " | "
* Optimized and reduced padding to the cases where it actually is necessary
* Padding has to be applied to every event which can succeed with progress update
* Synchronize all calls to console to avoid race conditions where output is terminated by a carriage return only. If no sync is done, SLF4J or INIT/SUCCEEDED update can interleave and overwrite the progress while being shorter as the progress itself.
* Replaced the concurrent hash map with a synchronized linked hash map to retain order of the progress meter. It will behave now like a queue.
* Work around a rounding bug existed upto Java 7
  See http://stackoverflow.com/q/22797964/696632 and Oracle's bugfix
  Announcement: http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html

Race conditions cannot be avoided if -T is employed since one does not have access to the output stream of a SLF4J backend to synchronize on.


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

Branch: refs/heads/MNG-5359
Commit: 149cce7a867956efeaf72d527f61297bf2471b1e
Parents: deefd93
Author: Michael Osipov <mi...@apache.org>
Authored: Thu Feb 18 00:28:50 2016 +0100
Committer: Michael Osipov <19...@gmx.net>
Committed: Mon Jan 23 11:18:15 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/cli/MavenCli.java     |  10 +-
 .../transfer/AbstractMavenTransferListener.java | 209 +++++++++++--
 .../transfer/ConsoleMavenTransferListener.java  | 112 ++++---
 .../transfer/Slf4jMavenTransferListener.java    |  38 +--
 .../maven/cli/transfer/FileSizeFormatTest.java  | 313 +++++++++++++++++++
 5 files changed, 595 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/149cce7a/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 176ce4d..2b9f099 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
@@ -1005,13 +1005,13 @@ public class MavenCli
         // present supplied by the user. The rule is that we only allow the execution of one ConfigurationProcessor.
         // If there is more than one then we execute the one supplied by the user, otherwise we execute the
         // the default SettingsXmlConfigurationProcessor.
-        // 
+        //
         int userSuppliedConfigurationProcessorCount = configurationProcessors.size() - 1;
 
         if ( userSuppliedConfigurationProcessorCount == 0 )
         {
             //
-            // Our settings.xml source is historically how we have configured Maven from the CLI so we are going to 
+            // Our settings.xml source is historically how we have configured Maven from the CLI so we are going to
             // have to honour its existence forever. So let's run it.
             //
             configurationProcessors.get( SettingsXmlConfigurationProcessor.HINT ).process( cliRequest );
@@ -1288,7 +1288,7 @@ public class MavenCli
             // If we're logging to a file then we don't want the console transfer listener as it will spew
             // download progress all over the place
             //
-            transferListener = getConsoleTransferListener();
+            transferListener = getConsoleTransferListener( cliRequest.commandLine.hasOption( CLIManager.DEBUG ) );
         }
         else
         {
@@ -1588,9 +1588,9 @@ public class MavenCli
     // Customizations available via the CLI
     //
 
-    protected TransferListener getConsoleTransferListener()
+    protected TransferListener getConsoleTransferListener( boolean printResourceNames )
     {
-        return new ConsoleMavenTransferListener( System.out );
+        return new ConsoleMavenTransferListener( System.out, printResourceNames );
     }
 
     protected TransferListener getBatchTransferListener()

http://git-wip-us.apache.org/repos/asf/maven/blob/149cce7a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
index 58b1a5d..21822be 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java
@@ -24,6 +24,7 @@ import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.util.Locale;
 
+import org.apache.commons.lang3.Validate;
 import org.eclipse.aether.transfer.AbstractTransferListener;
 import org.eclipse.aether.transfer.TransferCancelledException;
 import org.eclipse.aether.transfer.TransferEvent;
@@ -33,6 +34,178 @@ public abstract class AbstractMavenTransferListener
     extends AbstractTransferListener
 {
 
+    // CHECKSTYLE_OFF: LineLength
+    /**
+     * Formats file size with the associated <a href="https://en.wikipedia.org/wiki/Metric_prefix">SI</a> prefix
+     * (GB, MB, kB) and using the patterns <code>#0.0</code> for numbers between 1 and 10
+     * and <code>###0</code> for numbers between 10 and 1000+ by default.
+     *
+     * @see <a href="https://en.wikipedia.org/wiki/Metric_prefix">https://en.wikipedia.org/wiki/Metric_prefix</a>
+     * @see <a href="https://en.wikipedia.org/wiki/Binary_prefix">https://en.wikipedia.org/wiki/Binary_prefix</a>
+     * @see <a
+     *      href="https://en.wikipedia.org/wiki/Octet_%28computing%29">https://en.wikipedia.org/wiki/Octet_(computing)</a>
+     */
+    // CHECKSTYLE_ON: LineLength
+    // TODO Move me to Maven Shared Utils
+    static class FileSizeFormat
+    {
+        static enum ScaleUnit
+        {
+            BYTE
+            {
+                @Override
+                public long bytes()
+                {
+                    return 1L;
+                }
+
+                @Override
+                public String symbol()
+                {
+                    return "B";
+                }
+            },
+            KILOBYTE
+            {
+                @Override
+                public long bytes()
+                {
+                    return 1000L;
+                }
+
+                @Override
+                public String symbol()
+                {
+                    return "kB";
+                }
+            },
+            MEGABYTE
+            {
+                @Override
+                public long bytes()
+                {
+                    return KILOBYTE.bytes() * KILOBYTE.bytes();
+                }
+
+                @Override
+                public String symbol()
+                {
+                    return "MB";
+                }
+            },
+            GIGABYTE
+            {
+                @Override
+                public long bytes()
+                {
+                    return MEGABYTE.bytes() * KILOBYTE.bytes();
+                };
+
+                @Override
+                public String symbol()
+                {
+                    return "GB";
+                }
+            };
+
+            public abstract long bytes();
+            public abstract String symbol();
+
+            public static ScaleUnit getScaleUnit( long size )
+            {
+                Validate.isTrue( size >= 0L, "file size cannot be negative: %s", size );
+
+                if ( size >= GIGABYTE.bytes() )
+                {
+                    return GIGABYTE;
+                }
+                else if ( size >= MEGABYTE.bytes() )
+                {
+                    return MEGABYTE;
+                }
+                else if ( size >= KILOBYTE.bytes() )
+                {
+                    return KILOBYTE;
+                }
+                else
+                {
+                    return BYTE;
+                }
+            }
+        }
+
+        private DecimalFormat smallFormat;
+        private DecimalFormat largeFormat;
+
+        public FileSizeFormat( Locale locale )
+        {
+            smallFormat = new DecimalFormat( "#0.0", new DecimalFormatSymbols( locale ) );
+            largeFormat = new DecimalFormat( "###0", new DecimalFormatSymbols( locale ) );
+        }
+
+        public String format( long size )
+        {
+            return format( size, null );
+        }
+
+        public String format( long size, ScaleUnit unit )
+        {
+            return format( size, unit, false );
+        }
+
+        public String format( long size, ScaleUnit unit, boolean omitSymbol )
+        {
+            Validate.isTrue( size >= 0L, "file size cannot be negative: %s", size );
+
+            if ( unit == null )
+            {
+                unit = ScaleUnit.getScaleUnit( size );
+            }
+
+            double scaledSize = (double) size / unit.bytes();
+            String scaledSymbol = " " + unit.symbol();
+
+            if ( omitSymbol )
+            {
+                scaledSymbol = "";
+            }
+
+            if ( unit == ScaleUnit.BYTE )
+            {
+                return largeFormat.format( size ) + scaledSymbol;
+            }
+
+            if ( scaledSize < 0.05 || scaledSize >= 10.0 )
+            {
+                return largeFormat.format( scaledSize ) + scaledSymbol;
+            }
+            else
+            {
+                return smallFormat.format( scaledSize ) + scaledSymbol;
+            }
+        }
+
+        public String formatProgress( long progressedSize, long size )
+        {
+            Validate.isTrue( progressedSize >= 0L, "progressed file size cannot be negative: %s", progressedSize );
+            Validate.isTrue( size >= 0L && progressedSize <= size || size < 0L,
+                "progressed file size cannot be greater than size: %s > %s", progressedSize, size );
+
+            if ( size >= 0L && progressedSize != size )
+            {
+                ScaleUnit unit = ScaleUnit.getScaleUnit( size );
+                String formattedProgressedSize = format( progressedSize, unit, true );
+                String formattedSize = format( size, unit );
+
+                return formattedProgressedSize + "/" + formattedSize;
+            }
+            else
+            {
+                return format( progressedSize );
+            }
+        }
+    }
+
     protected PrintStream out;
 
     protected AbstractMavenTransferListener( PrintStream out )
@@ -43,9 +216,10 @@ public abstract class AbstractMavenTransferListener
     @Override
     public void transferInitiated( TransferEvent event )
     {
-        String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
+        String action = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
 
-        out.println( message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
+        TransferResource resource = event.getResource();
+        out.println( action + ": " + resource.getRepositoryUrl() + resource.getResourceName() );
     }
 
     @Override
@@ -53,7 +227,7 @@ public abstract class AbstractMavenTransferListener
         throws TransferCancelledException
     {
         TransferResource resource = event.getResource();
-
+        // TODO This needs to be colorized
         out.println( "[WARNING] " + event.getException().getMessage() + " for " + resource.getRepositoryUrl()
             + resource.getResourceName() );
     }
@@ -63,28 +237,21 @@ public abstract class AbstractMavenTransferListener
     {
         TransferResource resource = event.getResource();
         long contentLength = event.getTransferredBytes();
-        if ( contentLength >= 0 )
-        {
-            String type = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
-            String len = contentLength >= 1024 ? toKB( contentLength ) + " KB" : contentLength + " B";
 
-            String throughput = "";
-            long duration = System.currentTimeMillis() - resource.getTransferStartTime();
-            if ( duration > 0 )
-            {
-                DecimalFormat format = new DecimalFormat( "0.0", new DecimalFormatSymbols( Locale.ENGLISH ) );
-                double kbPerSec = ( contentLength / 1024.0 ) / ( duration / 1000.0 );
-                throughput = " at " + format.format( kbPerSec ) + " KB/sec";
-            }
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+        String result = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
+        String len = format.format( contentLength );
 
-            out.println( type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
-                + throughput + ")" );
+        String throughput = "";
+        long duration = System.currentTimeMillis() - resource.getTransferStartTime();
+        if ( duration > 0L )
+        {
+            double bytesPerSecond = contentLength / ( duration / 1000.0 );
+            throughput = " at " + format.format( (long) bytesPerSecond ) + "/s";
         }
-    }
 
-    protected long toKB( long bytes )
-    {
-        return ( bytes + 1023 ) / 1024;
+        out.println( result + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
+            + throughput + ")" );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/149cce7a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
index 5f87836..1ad943b 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
@@ -20,9 +20,13 @@ package org.apache.maven.cli.transfer;
  */
 
 import java.io.PrintStream;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Locale;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.commons.lang3.StringUtils;
 import org.eclipse.aether.transfer.TransferCancelledException;
 import org.eclipse.aether.transfer.TransferEvent;
 import org.eclipse.aether.transfer.TransferResource;
@@ -36,32 +40,58 @@ public class ConsoleMavenTransferListener
     extends AbstractMavenTransferListener
 {
 
-    private Map<TransferResource, Long> downloads = new ConcurrentHashMap<>();
+    private Map<TransferResource, Long> transfers = Collections.synchronizedMap(
+                                                        new LinkedHashMap<TransferResource, Long>() );
 
+    private boolean printResourceNames;
     private int lastLength;
 
-    public ConsoleMavenTransferListener( PrintStream out )
+    public ConsoleMavenTransferListener( PrintStream out, boolean printResourceNames )
     {
         super( out );
+        this.printResourceNames = printResourceNames;
     }
 
     @Override
-    public void transferProgressed( TransferEvent event )
+    public synchronized void transferInitiated( TransferEvent event )
+    {
+        overridePreviousTransfer( event );
+
+        super.transferInitiated( event );
+    }
+
+    @Override
+    public synchronized void transferCorrupted( TransferEvent event )
+        throws TransferCancelledException
+    {
+        overridePreviousTransfer( event );
+
+        super.transferCorrupted( event );
+    }
+
+    @Override
+    public synchronized void transferProgressed( TransferEvent event )
         throws TransferCancelledException
     {
         TransferResource resource = event.getResource();
-        downloads.put( resource, event.getTransferredBytes() );
+        transfers.put( resource, event.getTransferredBytes() );
 
-        StringBuilder buffer = new StringBuilder( 64 );
+        StringBuilder buffer = new StringBuilder( 128 );
+        buffer.append( "Progress (" ).append(  transfers.size() ).append( "): " );
 
-        for ( Map.Entry<TransferResource, Long> entry : downloads.entrySet() )
+        synchronized ( transfers )
         {
-            long total = entry.getKey().getContentLength();
-            Long complete = entry.getValue();
-            // NOTE: This null check guards against http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6312056
-            if ( complete != null )
+            Iterator<Map.Entry<TransferResource, Long>> entries = transfers.entrySet().iterator();
+            while ( entries.hasNext() )
             {
-                buffer.append( getStatus( complete, total ) ).append( "  " );
+                Map.Entry<TransferResource, Long> entry = entries.next();
+                long total = entry.getKey().getContentLength();
+                Long complete = entry.getValue();
+                buffer.append( getStatus( entry.getKey().getResourceName(), complete, total ) );
+                if ( entries.hasNext() )
+                {
+                    buffer.append( " | " );
+                }
             }
         }
 
@@ -69,28 +99,29 @@ public class ConsoleMavenTransferListener
         lastLength = buffer.length();
         pad( buffer, pad );
         buffer.append( '\r' );
-
-        out.print( buffer.toString() );
+        out.print( buffer );
+        out.flush();
     }
 
-    private String getStatus( long complete, long total )
+    private String getStatus( String resourceName, long complete, long total )
     {
-        if ( total >= 1024 )
-        {
-            return toKB( complete ) + "/" + toKB( total ) + " KB ";
-        }
-        else if ( total >= 0 )
-        {
-            return complete + "/" + total + " B ";
-        }
-        else if ( complete >= 1024 )
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+        StringBuilder status = new StringBuilder();
+
+        if ( printResourceNames )
         {
-            return toKB( complete ) + " KB ";
+            status.append( StringUtils.substringAfterLast( resourceName,  "/" ) );
+            status.append( " (" );
         }
-        else
+
+        status.append( format.formatProgress( complete, total ) );
+
+        if ( printResourceNames )
         {
-            return complete + " B ";
+            status.append( ")" );
         }
+
+        return status.toString();
     }
 
     private void pad( StringBuilder buffer, int spaces )
@@ -105,29 +136,34 @@ public class ConsoleMavenTransferListener
     }
 
     @Override
-    public void transferSucceeded( TransferEvent event )
+    public synchronized void transferSucceeded( TransferEvent event )
     {
-        transferCompleted( event );
+        transfers.remove( event.getResource() );
+        overridePreviousTransfer( event );
 
         super.transferSucceeded( event );
     }
 
     @Override
-    public void transferFailed( TransferEvent event )
+    public synchronized void transferFailed( TransferEvent event )
     {
-        transferCompleted( event );
+        transfers.remove( event.getResource() );
+        overridePreviousTransfer( event );
 
         super.transferFailed( event );
     }
 
-    private void transferCompleted( TransferEvent event )
+    private void overridePreviousTransfer( TransferEvent event )
     {
-        downloads.remove( event.getResource() );
-
-        StringBuilder buffer = new StringBuilder( 64 );
-        pad( buffer, lastLength );
-        buffer.append( '\r' );
-        out.print( buffer.toString() );
+        if ( lastLength > 0 )
+        {
+            StringBuilder buffer = new StringBuilder( 128 );
+            pad( buffer, lastLength );
+            buffer.append( '\r' );
+            out.print( buffer );
+            out.flush();
+            lastLength = 0;
+        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/149cce7a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
index bb72db3..ac5333e 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
@@ -19,10 +19,9 @@ package org.apache.maven.cli.transfer;
  * under the License.
  */
 
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
 import java.util.Locale;
 
+import org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat;
 import org.eclipse.aether.transfer.AbstractTransferListener;
 import org.eclipse.aether.transfer.TransferCancelledException;
 import org.eclipse.aether.transfer.TransferEvent;
@@ -50,9 +49,10 @@ public class Slf4jMavenTransferListener
     @Override
     public void transferInitiated( TransferEvent event )
     {
-        String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
+        String action = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
 
-        out.info( message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
+        TransferResource resource = event.getResource();
+        out.info( action + ": " + resource.getRepositoryUrl() + resource.getResourceName() );
     }
 
     @Override
@@ -60,7 +60,6 @@ public class Slf4jMavenTransferListener
         throws TransferCancelledException
     {
         TransferResource resource = event.getResource();
-
         out.warn( event.getException().getMessage() + " for " + resource.getRepositoryUrl()
             + resource.getResourceName() );
     }
@@ -70,28 +69,21 @@ public class Slf4jMavenTransferListener
     {
         TransferResource resource = event.getResource();
         long contentLength = event.getTransferredBytes();
-        if ( contentLength >= 0 )
-        {
-            String type = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
-            String len = contentLength >= 1024 ? toKB( contentLength ) + " KB" : contentLength + " B";
 
-            String throughput = "";
-            long duration = System.currentTimeMillis() - resource.getTransferStartTime();
-            if ( duration > 0 )
-            {
-                DecimalFormat format = new DecimalFormat( "0.0", new DecimalFormatSymbols( Locale.ENGLISH ) );
-                double kbPerSec = ( contentLength / 1024.0 ) / ( duration / 1000.0 );
-                throughput = " at " + format.format( kbPerSec ) + " KB/sec";
-            }
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+        String result = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
+        String len = format.format( contentLength );
 
-            out.info( type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
-                + throughput + ")" );
+        String throughput = "";
+        long duration = System.currentTimeMillis() - resource.getTransferStartTime();
+        if ( duration > 0L )
+        {
+            double bytesPerSecond = contentLength / ( duration / 1000.0 );
+            throughput = " at " + format.format( (long) bytesPerSecond ) + "/s";
         }
-    }
 
-    protected long toKB( long bytes )
-    {
-        return ( bytes + 1023 ) / 1024;
+        out.info( result + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
+            + throughput + ")" );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/149cce7a/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java
new file mode 100644
index 0000000..43939d1
--- /dev/null
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java
@@ -0,0 +1,313 @@
+package org.apache.maven.cli.transfer;
+
+/*
+ * 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.Locale;
+
+import org.apache.commons.lang3.JavaVersion;
+import org.apache.commons.lang3.SystemUtils;
+import org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat;
+import org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat.ScaleUnit;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+public class FileSizeFormatTest {
+
+    @Test( expected = IllegalArgumentException.class )
+    public void testNegativeSize()
+    {
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+        long negativeSize = -100L;
+        format.format( negativeSize );
+    }
+
+    @Test
+    public void testSize()
+    {
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+        long _0_bytes = 0L;
+        assertEquals( "0 B", format.format( _0_bytes ) );
+
+        long _5_bytes = 5L;
+        assertEquals( "5 B", format.format( _5_bytes ) );
+
+        long _10_bytes = 10L;
+        assertEquals( "10 B", format.format( _10_bytes ) );
+
+        long _15_bytes = 15L;
+        assertEquals( "15 B", format.format( _15_bytes ) );
+
+        long _999_bytes = 999L;
+        assertEquals( "999 B", format.format( _999_bytes ) );
+
+        long _1000_bytes = 1000L;
+        assertEquals( "1.0 kB", format.format( _1000_bytes ) );
+
+        long _5500_bytes = 5500L;
+        assertEquals( "5.5 kB", format.format( _5500_bytes ) );
+
+        long _10_kilobytes = 10L * 1000L;
+        assertEquals( "10 kB", format.format( _10_kilobytes ) );
+
+        long _15_kilobytes = 15L * 1000L;
+        assertEquals( "15 kB", format.format( _15_kilobytes ) );
+
+        long _999_kilobytes = 999L * 1000L;
+        assertEquals( "999 kB", format.format( _999_kilobytes ) );
+
+        long _1000_kilobytes = 1000L * 1000L;
+        assertEquals( "1.0 MB", format.format( _1000_kilobytes ) );
+
+        long _5500_kilobytes = 5500L * 1000L;
+        assertEquals( "5.5 MB", format.format( _5500_kilobytes ) );
+
+        long _10_megabytes = 10L * 1000L * 1000L;
+        assertEquals( "10 MB", format.format( _10_megabytes ) );
+
+        long _15_megabytes = 15L * 1000L * 1000L;
+        assertEquals( "15 MB", format.format( _15_megabytes ) );
+
+        long _999_megabytes = 999L * 1000L * 1000L;
+        assertEquals( "999 MB", format.format( _999_megabytes ) );
+
+        long _1000_megabytes = 1000L * 1000L * 1000L;
+        assertEquals( "1.0 GB", format.format( _1000_megabytes ) );
+
+        long _5500_megabytes = 5500L * 1000L * 1000L;
+        assertEquals( "5.5 GB", format.format( _5500_megabytes ) );
+
+        long _10_gigabytes = 10L * 1000L * 1000L * 1000L;
+        assertEquals( "10 GB", format.format( _10_gigabytes ) );
+
+        long _15_gigabytes = 15L * 1000L * 1000L * 1000L;
+        assertEquals( "15 GB", format.format( _15_gigabytes ) );
+
+        long _1000_gigabytes = 1000L * 1000L * 1000L * 1000L;
+        assertEquals( "1000 GB", format.format( _1000_gigabytes ) );
+    }
+
+    @Test
+    public void testSizeWithSelectedScaleUnit()
+    {
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+        long _0_bytes = 0L;
+        assertEquals( "0 B", format.format( _0_bytes ) );
+        assertEquals( "0 B", format.format( _0_bytes, ScaleUnit.BYTE ) );
+        assertEquals( "0 kB", format.format( _0_bytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "0 MB", format.format( _0_bytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _0_bytes, ScaleUnit.GIGABYTE ) );
+
+        long _5_bytes = 5L;
+        assertEquals( "5 B", format.format( _5_bytes ) );
+        assertEquals( "5 B", format.format( _5_bytes, ScaleUnit.BYTE ) );
+        assertEquals( "0 kB", format.format( _5_bytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "0 MB", format.format( _5_bytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _5_bytes, ScaleUnit.GIGABYTE ) );
+
+
+        long _49_bytes = 49L;
+        assertEquals( "49 B", format.format( _49_bytes ) );
+        assertEquals( "49 B", format.format( _49_bytes, ScaleUnit.BYTE ) );
+        assertEquals( "0 kB", format.format( _49_bytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "0 MB", format.format( _49_bytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _49_bytes, ScaleUnit.GIGABYTE ) );
+
+        long _50_bytes = 50L;
+        assertEquals( "50 B", format.format( _50_bytes ) );
+        assertEquals( "50 B", format.format( _50_bytes, ScaleUnit.BYTE ) );
+        if ( SystemUtils.isJavaVersionAtLeast( JavaVersion.JAVA_1_8 ) )
+        {
+            assertEquals( "0.1 kB", format.format( _50_bytes, ScaleUnit.KILOBYTE ) );
+        }
+        assertEquals( "0 MB", format.format( _50_bytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _50_bytes, ScaleUnit.GIGABYTE ) );
+
+        long _999_bytes = 999L;
+        assertEquals( "999 B", format.format( _999_bytes ) );
+        assertEquals( "999 B", format.format( _999_bytes, ScaleUnit.BYTE ) );
+        assertEquals( "1.0 kB", format.format( _999_bytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "0 MB", format.format( _999_bytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _999_bytes, ScaleUnit.GIGABYTE ) );
+
+        long _1000_bytes = 1000L;
+        assertEquals( "1.0 kB", format.format( _1000_bytes ) );
+        assertEquals( "1000 B", format.format( _1000_bytes, ScaleUnit.BYTE ) );
+        assertEquals( "1.0 kB", format.format( _1000_bytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "0 MB", format.format( _1000_bytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _1000_bytes, ScaleUnit.GIGABYTE ) );
+
+        long _49_kilobytes = 49L * 1000L;
+        assertEquals( "49 kB", format.format( _49_kilobytes ) );
+        assertEquals( "49000 B", format.format( _49_kilobytes, ScaleUnit.BYTE ) );
+        assertEquals( "49 kB", format.format( _49_kilobytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "0 MB", format.format( _49_kilobytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _49_kilobytes, ScaleUnit.GIGABYTE ) );
+
+        long _50_kilobytes = 50L * 1000L;
+        assertEquals( "50 kB", format.format( _50_kilobytes ) );
+        assertEquals( "50000 B", format.format( _50_kilobytes, ScaleUnit.BYTE ) );
+        assertEquals( "50 kB", format.format( _50_kilobytes, ScaleUnit.KILOBYTE ) );
+        if ( SystemUtils.isJavaVersionAtLeast( JavaVersion.JAVA_1_8 ) )
+        {
+            assertEquals( "0.1 MB", format.format( _50_kilobytes, ScaleUnit.MEGABYTE ) );
+        }
+        assertEquals( "0 GB", format.format( _50_kilobytes, ScaleUnit.GIGABYTE ) );
+
+        long _999_kilobytes = 999L * 1000L;
+        assertEquals( "999 kB", format.format( _999_kilobytes ) );
+        assertEquals( "999000 B", format.format( _999_kilobytes, ScaleUnit.BYTE ) );
+        assertEquals( "999 kB", format.format( _999_kilobytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "1.0 MB", format.format( _999_kilobytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _999_kilobytes, ScaleUnit.GIGABYTE ) );
+
+        long _1000_kilobytes = 1000L * 1000L;
+        assertEquals( "1.0 MB", format.format( _1000_kilobytes ) );
+        assertEquals( "1000000 B", format.format( _1000_kilobytes, ScaleUnit.BYTE ) );
+        assertEquals( "1000 kB", format.format( _1000_kilobytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "1.0 MB", format.format( _1000_kilobytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _1000_kilobytes, ScaleUnit.GIGABYTE ) );
+
+        long _49_megabytes = 49L * 1000L * 1000L;
+        assertEquals( "49 MB", format.format( _49_megabytes ) );
+        assertEquals( "49000000 B", format.format( _49_megabytes, ScaleUnit.BYTE ) );
+        assertEquals( "49000 kB", format.format( _49_megabytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "49 MB", format.format( _49_megabytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "0 GB", format.format( _49_megabytes, ScaleUnit.GIGABYTE ) );
+
+        long _50_megabytes = 50L * 1000L * 1000L;
+        assertEquals( "50 MB", format.format( _50_megabytes ) );
+        assertEquals( "50000000 B", format.format( _50_megabytes, ScaleUnit.BYTE ) );
+        assertEquals( "50000 kB", format.format( _50_megabytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "50 MB", format.format( _50_megabytes, ScaleUnit.MEGABYTE ) );
+        if ( SystemUtils.isJavaVersionAtLeast( JavaVersion.JAVA_1_8 ) )
+        {
+            assertEquals( "0.1 GB", format.format( _50_megabytes, ScaleUnit.GIGABYTE ) );
+        }
+
+        long _999_megabytes = 999L * 1000L * 1000L;
+        assertEquals( "999 MB", format.format( _999_megabytes ) );
+        assertEquals( "999000000 B", format.format( _999_megabytes, ScaleUnit.BYTE ) );
+        assertEquals( "999000 kB", format.format( _999_megabytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "999 MB", format.format( _999_megabytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "1.0 GB", format.format( _999_megabytes, ScaleUnit.GIGABYTE ) );
+
+        long _1000_megabytes = 1000L * 1000L * 1000L;
+        assertEquals( "1.0 GB", format.format( _1000_megabytes ) );
+        assertEquals( "1000000000 B", format.format( _1000_megabytes, ScaleUnit.BYTE ) );
+        assertEquals( "1000000 kB", format.format( _1000_megabytes, ScaleUnit.KILOBYTE ) );
+        assertEquals( "1000 MB", format.format( _1000_megabytes, ScaleUnit.MEGABYTE ) );
+        assertEquals( "1.0 GB", format.format( _1000_megabytes, ScaleUnit.GIGABYTE ) );
+    }
+
+    @Test( expected = IllegalArgumentException.class )
+    public void testNegativeProgessedSize()
+    {
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+        long negativeProgessedSize = -100L;
+        format.formatProgress( negativeProgessedSize, 10L );
+    }
+
+    @Test( expected = IllegalArgumentException.class )
+    public void testNegativeProgessedSizeBiggerThanSize()
+    {
+        FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+        format.formatProgress( 100L, 10L );
+    }
+
+    @Test
+    public void testProgressedSizeWithoutSize()
+    {
+         FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+         long _0_bytes = 0L;
+         assertEquals( "0 B", format.formatProgress( _0_bytes, -1L ) );
+
+         long _1000_bytes = 1000L;
+         assertEquals( "1.0 kB", format.formatProgress( _1000_bytes, -1L ) );
+
+         long _1000_kilobytes = 1000L * 1000L;
+         assertEquals( "1.0 MB", format.formatProgress( _1000_kilobytes, -1L ) );
+
+         long _1000_megabytes = 1000L * 1000L * 1000L;
+         assertEquals( "1.0 GB", format.formatProgress( _1000_megabytes, -1L ) );
+
+    }
+
+    @Test
+    public void testProgressedBothZero()
+    {
+         FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+         long _0_bytes = 0L;
+         assertEquals( "0 B", format.formatProgress( _0_bytes, _0_bytes ) );
+    }
+
+    @Test
+    public void testProgressedSizeWithSize()
+    {
+         FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
+
+         long _0_bytes = 0L;
+         long _400_bytes = 400L;
+         long _800_bytes = 2L * _400_bytes;
+         assertEquals( "0/800 B", format.formatProgress( _0_bytes, _800_bytes ) );
+         assertEquals( "400/800 B", format.formatProgress( _400_bytes, _800_bytes ) );
+         assertEquals( "800 B", format.formatProgress( _800_bytes, _800_bytes ) );
+
+         long _4000_bytes = 4000L;
+         long _8000_bytes = 2L * _4000_bytes;
+         long _50_kilobytes = 50000L;
+         assertEquals( "0/8.0 kB", format.formatProgress( _0_bytes, _8000_bytes ) );
+         assertEquals( "0.4/8.0 kB", format.formatProgress( _400_bytes, _8000_bytes ) );
+         assertEquals( "4.0/8.0 kB", format.formatProgress( _4000_bytes, _8000_bytes ) );
+         assertEquals( "8.0 kB", format.formatProgress( _8000_bytes, _8000_bytes ) );
+         assertEquals( "8.0/50 kB", format.formatProgress( _8000_bytes, _50_kilobytes ) );
+         assertEquals( "16/50 kB", format.formatProgress( 2L * _8000_bytes, _50_kilobytes ) );
+         assertEquals( "50 kB", format.formatProgress( _50_kilobytes, _50_kilobytes ) );
+
+         long _500_kilobytes = 500000L;
+         long _1000_kilobytes = 2L * _500_kilobytes;;
+         long _5000_kilobytes = 5L * _1000_kilobytes;
+         long _15_megabytes = 3L * _5000_kilobytes;
+         assertEquals( "0/5.0 MB", format.formatProgress( _0_bytes, _5000_kilobytes ) );
+         assertEquals( "0.5/5.0 MB", format.formatProgress( _500_kilobytes, _5000_kilobytes ) );
+         assertEquals( "1.0/5.0 MB", format.formatProgress( _1000_kilobytes, _5000_kilobytes ) );
+         assertEquals( "5.0 MB", format.formatProgress( _5000_kilobytes, _5000_kilobytes ) );
+         assertEquals( "5.0/15 MB", format.formatProgress( _5000_kilobytes, _15_megabytes ) );
+         assertEquals( "15 MB", format.formatProgress( _15_megabytes, _15_megabytes ) );
+
+         long _500_megabytes = 500000000L;
+         long _1000_megabytes = 2L * _500_megabytes;
+         long _5000_megabytes = 5L * _1000_megabytes;
+         long _15_gigabytes = 3L * _5000_megabytes;
+         assertEquals( "0/500 MB", format.formatProgress( _0_bytes, _500_megabytes ) );
+         assertEquals( "1.0/5.0 GB", format.formatProgress( _1000_megabytes, _5000_megabytes ) );
+         assertEquals( "5.0 GB", format.formatProgress( _5000_megabytes, _5000_megabytes ) );
+         assertEquals( "5.0/15 GB", format.formatProgress( _5000_megabytes, _15_gigabytes ) );
+         assertEquals( "15 GB", format.formatProgress( _15_gigabytes, _15_gigabytes ) );
+    }
+
+}


[40/50] maven git commit: [MNG-5823] mvnDebug doesn't work with M2_HOME with spaces - missing quotes

Posted by sc...@apache.org.
[MNG-5823] mvnDebug doesn't work with M2_HOME with spaces - missing quotes


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

Branch: refs/heads/MNG-5359
Commit: 46c1581474ed3b8110dbc7275172b92056b6e5dd
Parents: fe58646
Author: Tobias Oberlies <to...@sap.com>
Authored: Sat Dec 19 18:06:23 2015 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 29 22:56:10 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvnDebug | 2 +-
 apache-maven/src/bin/mvnyjp   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/46c15814/apache-maven/src/bin/mvnDebug
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index 09f48d9..8d6e6a1 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -31,4 +31,4 @@ MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,addre
 
 echo Preparing to execute Maven in debug mode
 
-env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
+env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" "$(dirname "$0")/mvn" "$@"

http://git-wip-us.apache.org/repos/asf/maven/blob/46c15814/apache-maven/src/bin/mvnyjp
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index e08f77e..b2dbe1d 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -32,4 +32,4 @@ if [ ! -f "$YJPLIB" ]; then
   exit 1
 fi
 
-env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" $(dirname $0)/mvn "$@"
+env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" "$(dirname "$0")/mvn" "$@"


[09/50] maven git commit: [MNG-6093] use monkey patched slf4j-simple provider with Maven color

Posted by sc...@apache.org.
[MNG-6093] use monkey patched slf4j-simple provider with Maven color

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

Branch: refs/heads/MNG-5359
Commit: 94bc4de2ea54afa09a353034ed06edf0f68a8d87
Parents: b80915b
Author: Herv� Boutemy <hb...@apache.org>
Authored: Thu Sep 22 17:46:53 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 18:40:07 2017 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml                            |   4 +-
 .../maven/slf4j-configuration.properties        |   1 +
 maven-slf4j-provider/pom.xml                    | 116 +++++++++++++++++++
 .../java/org/slf4j/impl/MavenSimpleLogger.java  | 115 ++++++++++++++++++
 .../slf4j/impl/MavenSimpleLoggerFactory.java    |  44 +++++++
 .../src/main/script/patch-slf4j-simple.groovy   |  53 +++++++++
 maven-slf4j-provider/src/site/site.xml          |  36 ++++++
 pom.xml                                         |   6 +
 src/site/xdoc/index.xml                         |   2 +
 9 files changed, 375 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index f7c28ed..b2fa989 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -88,8 +88,8 @@
       <artifactId>aether-transport-wagon</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-slf4j-provider</artifactId>
     </dependency>
     <dependency>
       <groupId>org.fusesource.jansi</groupId>

http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties b/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
index 8741836..ae1bc39 100644
--- a/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
+++ b/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
@@ -18,5 +18,6 @@
 # key = Slf4j effective logger factory implementation
 # value = corresponding o.a.m.cli.logging.Slf4jConfiguration class
 org.slf4j.impl.SimpleLoggerFactory org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration
+org.slf4j.impl.MavenSimpleLoggerFactory org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration
 org.slf4j.helpers.Log4jLoggerFactory org.apache.maven.cli.logging.impl.Log4j2Configuration
 ch.qos.logback.classic.LoggerContext org.apache.maven.cli.logging.impl.LogbackConfiguration

http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/maven-slf4j-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
new file mode 100644
index 0000000..81af382
--- /dev/null
+++ b/maven-slf4j-provider/pom.xml
@@ -0,0 +1,116 @@
+<?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 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>org.apache.maven</groupId>
+    <artifactId>maven</artifactId>
+    <version>3.5.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-slf4j-provider</artifactId>
+
+  <name>Maven SLF4J Simple Provider</name>
+  <description>
+    Maven SLF4J provider based on SLF4J's simple provider, monkey-patched to support Maven styled colors
+    for levels and stacktraces rendering.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-shared-utils</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <artifactItems>
+            <artifactItem>
+              <groupId>org.slf4j</groupId>
+              <artifactId>slf4j-simple</artifactId>
+              <version>${slf4jVersion}</version>
+              <type>jar</type>
+              <classifier>sources</classifier>
+              <overWrite>false</overWrite>
+              <outputDirectory>${project.build.directory}/generated-sources/slf4j-simple</outputDirectory>
+              <includes>org/slf4j/impl/*.java</includes>
+            </artifactItem>
+          </artifactItems>
+        </configuration>
+        <executions>
+          <execution>
+            <id>unzip-slf4j-simple</id>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.12</version>
+        <executions>
+          <execution>
+            <id>add-slf4j-simple</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/generated-sources/slf4j-simple</source>
+              </sources>
+            </configuration>
+          </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/94bc4de2/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
new file mode 100644
index 0000000..17f1f48
--- /dev/null
+++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java
@@ -0,0 +1,115 @@
+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 static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
+
+import java.io.PrintStream;
+
+/**
+ * Logger for Maven, that support colorization of levels and stacktraces.
+ * This class implements 2 methods introduced in slf4j-simple provider local copy.
+ * @since 3.5.0
+ */
+public class MavenSimpleLogger
+    extends SimpleLogger
+{
+    MavenSimpleLogger( String name )
+    {
+        super( name );
+    }
+
+    @Override
+    protected String renderLevel( int level )
+    {
+        switch ( level )
+        {
+            case LOG_LEVEL_TRACE:
+                return buffer().debug( "TRACE" ).toString();
+            case LOG_LEVEL_DEBUG:
+                return buffer().debug( "DEBUG" ).toString();
+            case LOG_LEVEL_INFO:
+                return buffer().info( "INFO" ).toString();
+            case LOG_LEVEL_WARN:
+                return buffer().warning( "WARNING" ).toString();
+            case LOG_LEVEL_ERROR:
+            default:
+                return buffer().error( "ERROR" ).toString();
+        }
+    }
+
+    @Override
+    protected void renderThrowable( Throwable t, PrintStream stream )
+    {
+        stream.print( buffer().failure( t.getClass().getName() ) );
+        if ( t.getMessage() != null )
+        {
+            stream.print( ": " );
+            stream.print( buffer().failure( t.getMessage() ) );
+        }
+        stream.println();
+
+        while ( t != null )
+        {
+            for ( StackTraceElement e : t.getStackTrace() )
+            {
+                stream.print( "    " );
+                stream.print( buffer().strong( "at" ) );
+                stream.print( " " + e.getClassName() + "." + e.getMethodName() );
+                stream.print( buffer().a( " (" ).strong( getLocation( e ) ).a( ")" ) );
+                stream.println();
+            }
+
+            t = t.getCause();
+            if ( t != null )
+            {
+                stream.print( buffer().strong( "Caused by" ).a( ": " ).a( t.getClass().getName() ) );
+                if ( t.getMessage() != null )
+                {
+                    stream.print( ": " );
+                    stream.print( buffer().failure( t.getMessage() ) );
+                }
+                stream.println();
+            }
+        }
+    }
+
+    protected String getLocation( final StackTraceElement e )
+    {
+        assert e != null;
+
+        if ( e.isNativeMethod() )
+        {
+            return "Native Method";
+        }
+        else if ( e.getFileName() == null )
+        {
+            return "Unknown Source";
+        }
+        else if ( e.getLineNumber() >= 0 )
+        {
+            return String.format( "%s:%s", e.getFileName(), e.getLineNumber() );
+        }
+        else
+        {
+            return e.getFileName();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java
new file mode 100644
index 0000000..d56e346
--- /dev/null
+++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java
@@ -0,0 +1,44 @@
+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.Logger;
+
+public class MavenSimpleLoggerFactory
+    extends SimpleLoggerFactory
+{
+    /**
+     * Return an appropriate {@link MavenSimpleLogger} instance by name.
+     */
+    public Logger getLogger( String name )
+    {
+        Logger simpleLogger = loggerMap.get( name );
+        if ( simpleLogger != null )
+        {
+            return simpleLogger;
+        }
+        else
+        {
+            Logger newInstance = new MavenSimpleLogger( name );
+            Logger oldInstance = loggerMap.putIfAbsent( name, newInstance );
+            return oldInstance == null ? newInstance : oldInstance;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/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
new file mode 100644
index 0000000..bba8646
--- /dev/null
+++ b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
@@ -0,0 +1,53 @@
+
+/*
+ * 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 );
+
+
+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/94bc4de2/maven-slf4j-provider/src/site/site.xml
----------------------------------------------------------------------
diff --git a/maven-slf4j-provider/src/site/site.xml b/maven-slf4j-provider/src/site/site.xml
new file mode 100644
index 0000000..3a16bf9
--- /dev/null
+++ b/maven-slf4j-provider/src/site/site.xml
@@ -0,0 +1,36 @@
+<?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 xmlns="http://maven.apache.org/DECORATION/1.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="JavaDocs" href="apidocs/index.html"/>
+      <item name="Source Xref" href="xref/index.html"/>
+      <!--item name="FAQ" href="faq.html"/-->
+    </menu>
+
+    <menu ref="parent"/>
+    <menu ref="reports"/>
+  </body>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f8b67aa..fba262b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,6 +84,7 @@
     <module>maven-artifact</module>
     <module>maven-aether-provider</module>
     <module>maven-repository-metadata</module>
+    <module>maven-slf4j-provider</module>
     <module>maven-embedder</module>
     <module>maven-compat</module>
     <module>apache-maven</module>
@@ -217,6 +218,11 @@
         <artifactId>maven-builder-support</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.maven</groupId>
+        <artifactId>maven-slf4j-provider</artifactId>
+        <version>${project.version}</version>
+      </dependency>
       <!--bootstrap-end-comment-->
       <!--  Plexus -->
       <dependency>

http://git-wip-us.apache.org/repos/asf/maven/blob/94bc4de2/src/site/xdoc/index.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index b98b4ee..11fa0de 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -55,6 +55,8 @@
           <area shape="rect" coords="446,234,537,269" alt="maven-settings" href="maven-settings/" />
           <area shape="rect" coords="388,284,521,319" alt="maven-model-builder" href="maven-model-builder/" />
           <area shape="rect" coords="409,342,500,378" alt="maven-model" href="maven-model/" />
+          <area shape="rect" coords="TODO"            alt="maven-slf4j-provider" href="maven-slf4j-provider/" />
+          <area shape="rect" coords="88,59,192,94"    alt="slf4j-api" href="http://www.slf4j.org/manual.html" />
           <area shape="rect" coords="551,58,707,94"   alt="commons-cli" href="http://commons.apache.org/cli/" />
           <area shape="rect" coords="551,116,739,152" alt="wagon-provider-api" href="http://maven.apache.org/wagon/wagon-provider-api/" />
           <area shape="rect" coords="550,175,690,211" alt="plexus-sec-dispatcher" href="https://github.com/codehaus-plexus/plexus-sec-dispatcher" />


[22/50] maven git commit: added link to 3.3.1 release notes for details on .mvn

Posted by sc...@apache.org.
added link to 3.3.1 release notes for details on .mvn

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

Branch: refs/heads/MNG-5359
Commit: 4547ff73d84f189dea35f60dffafff9cf2f446ba
Parents: 8a8f7cd
Author: Herv� Boutemy <hb...@apache.org>
Authored: Mon Nov 14 12:50:10 2016 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:09:30 2017 +0100

----------------------------------------------------------------------
 maven-embedder/src/site/apt/index.apt.vm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4547ff73/maven-embedder/src/site/apt/index.apt.vm
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/index.apt.vm b/maven-embedder/src/site/apt/index.apt.vm
index 17220c9..e820765 100644
--- a/maven-embedder/src/site/apt/index.apt.vm
+++ b/maven-embedder/src/site/apt/index.apt.vm
@@ -20,7 +20,7 @@
  -----
  Herv� Boutemy
  -----
- 2015-03-12
+ 2016-11-14
  -----
 
 ${project.name}
@@ -33,13 +33,14 @@ ${project.name}
 
  * {{{./logging.html}logging API}}.
 
- * since 3.3.0, per project settings can be defined by files in <<<.mvn/>>> directory:
+ * since 3.3.1 (see {{{/docs/3.3.1/release-notes.html#Core_Extensions}3.3.1 release notes}} for more details),
+   per project settings can be defined by files in <<<.mvn/>>> directory:
 
    * <<<.mvn/jvm.config>>> containing jvm options,
 
    * <<<.mvn/maven.config>>> containing Maven command-line parameter,
 
-   * <<<.mvn/extensions.xml>>> containing {{{./core-extensions.html}a list of extensions}}.
+   * <<<.mvn/extensions.xml>>> containing {{{./core-extensions.html}a list of extensions}},
 
  * since 3.5.0, output is colorized by default, with color disabled in batch mode: see
    {{{/shared/maven-shared-utils/apidocs/org/apache/maven/shared/utils/logging/package-summary.html}styled message API}}


[41/50] maven git commit: [MNG-6014] Removing ArtifactHandler for ejb3 o Followup to MNG-5894 of Maven 3.3.9 where the maven-ejb3-plugin has been removed from life cycle. o Removed the ArtifactHandler for ejb3 cause without a bound life cycle it

Posted by sc...@apache.org.
[MNG-6014] Removing ArtifactHandler for ejb3
 o Followup to MNG-5894 of Maven 3.3.9 where the maven-ejb3-plugin
   has been removed from life cycle.
 o Removed the ArtifactHandler for ejb3 cause without
   a bound life cycle it does not make sense.
 o Removed entry from artifact-handlers.apt site.


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

Branch: refs/heads/MNG-5359
Commit: 5a462344f9e8aee3f1a423f0268ea27ce017c8c3
Parents: 46c1581
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Mon May 2 20:45:01 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Mon Jan 30 09:20:07 2017 +0100

----------------------------------------------------------------------
 .../main/resources/META-INF/plexus/artifact-handlers.xml | 11 -----------
 maven-core/src/site/apt/artifact-handlers.apt            |  2 --
 2 files changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5a462344/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
index f467252..2f26ce2 100644
--- a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
@@ -80,17 +80,6 @@ Artifact handlers are required by the dependency resolution mechanism.
         <addedToClasspath>true</addedToClasspath>
       </configuration>
     </component>
-    <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>ejb3</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>ejb3</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
 
     <!--
      | TEST JAR

http://git-wip-us.apache.org/repos/asf/maven/blob/5a462344/maven-core/src/site/apt/artifact-handlers.apt
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/artifact-handlers.apt b/maven-core/src/site/apt/artifact-handlers.apt
index a7ffade..1a4b344 100644
--- a/maven-core/src/site/apt/artifact-handlers.apt
+++ b/maven-core/src/site/apt/artifact-handlers.apt
@@ -39,8 +39,6 @@ Default Artifact Handlers Reference
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<ejb>>>          | <<<jar>>>  | <= type>   |               | java      | <<<true>>>          |                       |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
-| <<<ejb3>>>         | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
-*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<war>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<ear>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |


[17/50] maven git commit: added README.md to rat excludes

Posted by sc...@apache.org.
added README.md to rat excludes

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

Branch: refs/heads/MNG-5359
Commit: 9d432fb515c390beb593d8c4608775c46cfc03f9
Parents: cfbad56
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sat May 28 21:14:54 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:00:43 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/9d432fb5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3f9ce4f..5d1f57f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -581,6 +581,7 @@ under the License.
             <exclude>.repository/**</exclude> <!-- jenkins with local maven repository -->
             <exclude>.maven/spy.log</exclude> <!-- hudson maven3 integration log -->
             <exclude>.java-version</exclude>
+            <exclude>README.md</exclude>
           </excludes>
         </configuration>
       </plugin>


[33/50] maven git commit: Remove Subversion keywords from LICENSE.vm

Posted by sc...@apache.org.
Remove Subversion keywords from LICENSE.vm


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

Branch: refs/heads/MNG-5359
Commit: b9285469a587f7c4bdc777c50173ba3a0619cc9e
Parents: aecccf9
Author: Michael Osipov <mi...@apache.org>
Authored: Sun Jan 29 15:14:27 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 29 15:14:27 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/main/appended-resources/META-INF/LICENSE.vm | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b9285469/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
----------------------------------------------------------------------
diff --git a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
index 1a46225..390fa42 100644
--- a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
+++ b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
@@ -16,8 +16,6 @@
 ## specific language governing permissions and limitations
 ## under the License.
 ##
-## $Date: 2008-03-09 23:17:06 -0700 (Sun, 09 Mar 2008) $ $Rev: 635446 $
-##
 
 Apache Maven includes a number of components and libraries with separate 
 copyright notices and license terms. Your use of those components are 


[16/50] maven git commit: updated urls (https, plexus) and license header formatting

Posted by sc...@apache.org.
updated urls (https, plexus) and license header formatting

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

Branch: refs/heads/MNG-5359
Commit: 84085c0a9ce4febee8be124fe61f02cd40185d20
Parents: bc07e74
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sat May 28 13:28:23 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 23:50:10 2017 +0100

----------------------------------------------------------------------
 README.md                                       |  6 ++--
 apache-maven/README.txt                         |  6 ++--
 apache-maven/pom.xml                            | 32 ++++++++++--------
 apache-maven/src/conf/toolchains.xml            |  2 +-
 maven-artifact/pom.xml                          | 27 ++++++++++-----
 maven-compat/pom.xml                            | 27 ++++++++++-----
 .../maven/artifact/manager/WagonManager.java    |  2 +-
 maven-core/pom.xml                              | 27 ++++++++++-----
 .../AbstractMavenLifecycleParticipant.java      |  2 +-
 maven-core/src/main/mdo/toolchains.mdo          |  4 +--
 maven-core/src/site/apt/index.apt               |  2 +-
 maven-embedder/pom.xml                          | 27 ++++++++++-----
 maven-embedder/src/site/apt/logging.apt         |  6 ++--
 maven-model-builder/pom.xml                     | 27 ++++++++++-----
 .../maven/model/io/xpp3/package-info.java       |  6 ++--
 maven-model/src/main/mdo/maven.mdo              | 20 +++++------
 maven-model/src/site/xdoc/navigation.xml        | 35 --------------------
 .../org/apache/maven/plugin/AbstractMojo.java   |  8 ++---
 .../maven/plugin/descriptor/MojoDescriptor.java |  4 +--
 maven-settings/src/main/mdo/settings.mdo        |  2 +-
 maven-settings/src/site/apt/index.apt           |  2 +-
 pom.xml                                         | 34 ++++++++++---------
 src/site/site.xml                               |  6 ++--
 src/site/xdoc/index.xml                         | 16 ++++-----
 24 files changed, 174 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 7a5ed4d..33a4be4 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
 # Maven
 
-Maven is available under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+Maven is available under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
 
 - [Maven Issue Tracker](https://issues.apache.org/jira/browse/MNG)
 - [Maven Wiki](https://cwiki.apache.org/confluence/display/MAVEN/Index)
-- [Building Maven](http://maven.apache.org/guides/development/guide-building-maven.html)
-- [Running Core ITs](http://maven.apache.org/core-its/core-it-suite/)
+- [Building Maven](https://maven.apache.org/guides/development/guide-building-maven.html)
+- [Running Core ITs](https://maven.apache.org/core-its/core-it-suite/)
 
 ## Bootstrapping Basics
 

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/apache-maven/README.txt
----------------------------------------------------------------------
diff --git a/apache-maven/README.txt b/apache-maven/README.txt
index cbaa7d4..6a1bafd 100644
--- a/apache-maven/README.txt
+++ b/apache-maven/README.txt
@@ -11,12 +11,12 @@
   Documentation
   -------------
 
-  The most up-to-date documentation can be found at http://maven.apache.org/.
+  The most up-to-date documentation can be found at https://maven.apache.org/.
 
   Release Notes
   -------------
 
-  The full list of changes can be found at http://maven.apache.org/docs/history.html.
+  The full list of changes can be found at https://maven.apache.org/docs/history.html.
 
   System Requirements
   -------------------
@@ -59,7 +59,7 @@
 
   5) Run "mvn --version" to verify that it is correctly installed.
 
-  For complete documentation, see http://maven.apache.org/download.html#Installation
+  For complete documentation, see https://maven.apache.org/download.html#Installation
 
   Licensing
   ---------

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index b2fa989..ba7fda3 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -1,19 +1,23 @@
 <?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.
-  -->
+<!--
+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>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/apache-maven/src/conf/toolchains.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/toolchains.xml b/apache-maven/src/conf/toolchains.xml
index b737c17..b263072 100644
--- a/apache-maven/src/conf/toolchains.xml
+++ b/apache-maven/src/conf/toolchains.xml
@@ -63,7 +63,7 @@ under the License.
    |   Look for documentation of the toolchains-aware plugin which configuration elements
    |   can be used.   
    |
-   | See also http://maven.apache.org/guides/mini/guide-using-toolchains.html
+   | See also https://maven.apache.org/guides/mini/guide-using-toolchains.html
    |
    | General example
 

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-artifact/pom.xml
----------------------------------------------------------------------
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index e024c65..e3943c9 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -1,14 +1,23 @@
 <?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.
-  -->
+<!--
+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>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-compat/pom.xml
----------------------------------------------------------------------
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 138f013..3a0a45c 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -1,14 +1,23 @@
 <?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.
-  -->
+<!--
+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>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java
index fb7ca8b..4337bb6 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java
@@ -29,7 +29,7 @@ import org.apache.maven.wagon.authentication.AuthenticationInfo;
 import org.apache.maven.wagon.proxy.ProxyInfo;
 
 /**
- * Manages <a href="http://maven.apache.org/wagon">Wagon</a> related operations in Maven.
+ * Manages <a href="https://maven.apache.org/wagon">Wagon</a> related operations in Maven.
  *
  * @author <a href="michal.maczka@dimatics.com">Michal Maczka </a>
  */

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index efff5c1..d147dd8 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -1,14 +1,23 @@
 <?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.
-  -->
+<!--
+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>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-core/src/main/java/org/apache/maven/AbstractMavenLifecycleParticipant.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/AbstractMavenLifecycleParticipant.java b/maven-core/src/main/java/org/apache/maven/AbstractMavenLifecycleParticipant.java
index 26c4667..01247ae 100644
--- a/maven-core/src/main/java/org/apache/maven/AbstractMavenLifecycleParticipant.java
+++ b/maven-core/src/main/java/org/apache/maven/AbstractMavenLifecycleParticipant.java
@@ -27,7 +27,7 @@ import org.apache.maven.execution.MavenSession;
  * All callback methods (will) follow beforeXXX/afterXXX naming pattern to
  * indicate at what lifecycle point it is being called.
  *
- * @see <a href="http://maven.apache.org/examples/maven-3-lifecycle-extensions.html">example</a>
+ * @see <a href="https://maven.apache.org/examples/maven-3-lifecycle-extensions.html">example</a>
  * @see <a href="https://issues.apache.org/jira/browse/MNG-4224">MNG-4224</a>
  * @since 3.0-alpha-3
  */

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-core/src/main/mdo/toolchains.mdo
----------------------------------------------------------------------
diff --git a/maven-core/src/main/mdo/toolchains.mdo b/maven-core/src/main/mdo/toolchains.mdo
index 9b2aa90..4740d1b 100644
--- a/maven-core/src/main/mdo/toolchains.mdo
+++ b/maven-core/src/main/mdo/toolchains.mdo
@@ -124,9 +124,9 @@
                     <description>
                     <![CDATA[Type of toolchain:<ul>
                     <li><code>jdk</code> for
-                    <a href="http://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html">JDK Standard Toolchain</a>,</li>
+                    <a href="https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html">JDK Standard Toolchain</a>,</li>
                     <li>other value for
-                    <a href="http://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/custom.html">Custom Toolchain</a></li>
+                    <a href="https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/custom.html">Custom Toolchain</a></li>
                     </ul>
                     ]]></description>
                     <type>String</type>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-core/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
index f6c26fd..61d1772 100644
--- a/maven-core/src/site/apt/index.apt
+++ b/maven-core/src/site/apt/index.apt
@@ -51,7 +51,7 @@ Maven Core
  ({{{./apidocs/org/apache/maven/classrealm/ClassRealmManager.html}javadoc}}),
  with its <<<DefaultClassRealmManager>>> implementation
  ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}), using
- {{{http://plexus.codehaus.org/plexus-classworlds/}Plexus Classworlds}},
+ {{{https://codehaus-plexus.github.io/plexus-classworlds/}Plexus Classworlds}},
 
  * {{{./extension.html}extension descriptor}},
 

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 04b8da6..75b92c9 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -1,14 +1,23 @@
 <?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.
-  -->
+<!--
+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>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-embedder/src/site/apt/logging.apt
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
index d1eb53a..800857c 100644
--- a/maven-embedder/src/site/apt/logging.apt
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -31,10 +31,10 @@ Maven Logging
 * Logging API
 
  Maven uses
- {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/package-summary.html}Plexus
+ {{{https://codehaus-plexus.github.io/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/package-summary.html}Plexus
  Container logging API}}, like any other Plexus components, ie
- {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/LoggerManager.html}LoggerManager}}
- / {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/Logger.html}Logger}}.
+ {{{https://codehaus-plexus.github.io/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/LoggerManager.html}LoggerManager}}
+ / {{{https://codehaus-plexus.github.io/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/Logger.html}Logger}}.
 
  Starting with Maven 3.1.0:
 

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-model-builder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index 0586648..fbfd417 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -1,14 +1,23 @@
 <?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.
-  -->
+<!--
+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>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
----------------------------------------------------------------------
diff --git a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
index 648607c..299193d 100644
--- a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
+++ b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/package-info.java
@@ -2,10 +2,10 @@
 /**
  * XML reader and writer classes for Maven POM, generated from <code>maven.mdo</code> model.
  * These classes use
- * <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/pull/package-summary.html">plexus-utils'
+ * <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/pull/package-summary.html">plexus-utils'
  * XML Pull Parser API</a> for their internal XML handling and
- * <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomBuilder.html">Xpp3DomBuilder</a> +
- * <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3Dom.html">Xpp3Dom</a> for
+ * <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomBuilder.html">Xpp3DomBuilder</a> +
+ * <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3Dom.html">Xpp3Dom</a> for
  * DOM content representation (see <code>&lt;configuration&gt;</code> elements).
  */
 package org.apache.maven.model.io.xpp3;

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/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 3f6b6d6..5eba3ea 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -54,8 +54,8 @@
     <p>This is a reference for the Maven project descriptor used in Maven.</p>
     <p>An XSD is available at:</p>
     <ul>
-      <li><a href="http://maven.apache.org/xsd/maven-v3_0_0.xsd">http://maven.apache.org/xsd/maven-v3_0_0.xsd</a> for Maven 1.1.</li>
-      <li><a href="http://maven.apache.org/xsd/maven-4.0.0.xsd">http://maven.apache.org/xsd/maven-4.0.0.xsd</a> for Maven 2.0.</li>
+      <li><a href="https://maven.apache.org/xsd/maven-v3_0_0.xsd">https://maven.apache.org/xsd/maven-v3_0_0.xsd</a> for Maven 1.1.</li>
+      <li><a href="https://maven.apache.org/xsd/maven-4.0.0.xsd">https://maven.apache.org/xsd/maven-4.0.0.xsd</a> for Maven 2.0.</li>
     </ul>
     ]]>
   </description>
@@ -701,7 +701,7 @@
             These dependencies are used to construct a classpath for your
             project during the build process. They are automatically downloaded from the
             repositories defined in this project.
-            See <a href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
+            See <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
             dependency mechanism</a> for more information.
             ]]>
           </description>
@@ -1397,7 +1397,7 @@
             calculate the various classpaths used for compilation, testing, and so on.
             It also assists in determining which artifacts to include in a distribution of
             this project. For more information, see
-            <a href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
+            <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
             dependency mechanism</a>.
             ]]>
           </description>
@@ -2095,8 +2095,8 @@
             The source control management system URL
             that describes the repository and how to connect to the
             repository. For more information, see the
-            <a href="http://maven.apache.org/scm/scm-url-format.html">URL format</a>
-            and <a href="http://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>.
+            <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>
@@ -2139,8 +2139,8 @@
             The source control management system URL
             that describes the repository and how to connect to the
             repository. For more information, see the
-            <a href="http://maven.apache.org/scm/scm-url-format.html">URL format</a>
-            and <a href="http://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>.
+            <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.
             <br /><b>Default value is</b>: parent value [+ path adjustment] + artifactId
             ]]>
@@ -2642,8 +2642,8 @@
             <li><code>combine.children</code>: available values are <code>merge</code> (default) and <code>append</code>,</li>
             <li><code>combine.self</code>: available values are <code>merge</code> (default) and <code>override</code>.</li>
             </ul>
-            <p>See <a href="http://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and
-            <a href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
+            <p>See <a href="https://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and
+            <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
             for more information.</p>
             ]]>
           </description>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-model/src/site/xdoc/navigation.xml
----------------------------------------------------------------------
diff --git a/maven-model/src/site/xdoc/navigation.xml b/maven-model/src/site/xdoc/navigation.xml
deleted file mode 100644
index 110a953..0000000
--- a/maven-model/src/site/xdoc/navigation.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-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 name="Project Descriptor">
-  <title>Project Descriptor</title>
-  <body>
-    <breadcrumbs>
-      <item name="Apache" href="http://www.apache.org" />
-      <item name="Maven" href="http://maven.apache.org/" />
-      <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x/" />
-      <item name="Reference" href="http://maven.apache.org/maven-1.x/reference/index.html" />
-    </breadcrumbs>
-    <menu name="Maven Project Descriptor">
-      <item name="About" href="/index.html" />
-      <item name="Model Documentation" href="/maven.html" />
-      <item name="API Docs" href="/apidocs/" target="_blank" />
-    </menu>
-  </body>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
----------------------------------------------------------------------
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
index d33e9bf..43fffb5 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
@@ -96,7 +96,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
  *          The execution of either will not affect the current project, but instead make available the
  *          <code>${executedProject}</code> expression if required. An alternate lifecycle can also be provided:
  *          for more information see the documentation on the
- *          <a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html"
+ *          <a href="https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html"
  *             target="_blank">build lifecycle</a>.
  *      </td>
  *   </tr>
@@ -133,9 +133,9 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
  *   </tr>
  * </table>
  *
- * @see <a href="http://maven.apache.org/guides/plugin/guide-java-plugin-development.html" target="_blank">Guide to Developing Java Plugins</a>
- * @see <a href="http://maven.apache.org/guides/mini/guide-configuring-plugins.html" target="_blank">Guide to Configuring Plug-ins</a>
- * @see <a href="http://maven.apache.org/developers/mojo-api-specification.html" target="_blank">Mojo API Specification</a>
+ * @see <a href="https://maven.apache.org/guides/plugin/guide-java-plugin-development.html" target="_blank">Guide to Developing Java Plugins</a>
+ * @see <a href="https://maven.apache.org/guides/mini/guide-configuring-plugins.html" target="_blank">Guide to Configuring Plug-ins</a>
+ * @see <a href="https://maven.apache.org/developers/mojo-api-specification.html" target="_blank">Mojo API Specification</a>
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  * @author jdcasey

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
----------------------------------------------------------------------
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
index 697d95a..515b110 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
@@ -33,8 +33,8 @@ import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
  * The bean containing the Mojo descriptor.
  * <br/>
  * For more information about the usage tag, have a look to:
- * <a href="http://maven.apache.org/developers/mojo-api-specification.html">
- * http://maven.apache.org/developers/mojo-api-specification.html</a>
+ * <a href="https://maven.apache.org/developers/mojo-api-specification.html">
+ * https://maven.apache.org/developers/mojo-api-specification.html</a>
  *
  * @todo is there a need for the delegation of MavenMojoDescriptor to this?
  * Why not just extend ComponentDescriptor here?

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-settings/src/main/mdo/settings.mdo
----------------------------------------------------------------------
diff --git a/maven-settings/src/main/mdo/settings.mdo b/maven-settings/src/main/mdo/settings.mdo
index 6d560cc..7fa00de 100644
--- a/maven-settings/src/main/mdo/settings.mdo
+++ b/maven-settings/src/main/mdo/settings.mdo
@@ -33,7 +33,7 @@
     <p>The default location for the settings file is <i>~/.m2/settings.xml</i></p>
     <p>An XSD is available at:</p>
     <ul>
-      <li><a href="http://maven.apache.org/xsd/settings-1.0.0.xsd">http://maven.apache.org/xsd/settings-1.0.0.xsd</a>.</li>
+      <li><a href="https://maven.apache.org/xsd/settings-1.0.0.xsd">https://maven.apache.org/xsd/settings-1.0.0.xsd</a>.</li>
     </ul>
     ]]>
   </description>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/maven-settings/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-settings/src/site/apt/index.apt b/maven-settings/src/site/apt/index.apt
index 6e404e8..17eaf8c 100644
--- a/maven-settings/src/site/apt/index.apt
+++ b/maven-settings/src/site/apt/index.apt
@@ -33,4 +33,4 @@ Maven Settings Model
 
    * A {{{./settings.html}Descriptor Reference}}
 
-   * An {{{http://maven.apache.org/xsd/settings-1.0.0.xsd}XSD}}
+   * An {{{https://maven.apache.org/xsd/settings-1.0.0.xsd}XSD}}

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fba262b..3f9ce4f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,18 +1,22 @@
 <?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.
+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">
@@ -38,7 +42,7 @@
     number of other development tools for reporting or the build
     process.
   </description>
-  <url>http://maven.apache.org/ref/${project.version}/</url>
+  <url>https://maven.apache.org/ref/${project.version}/</url>
   <inceptionYear>2001</inceptionYear>
 
   <properties>
@@ -105,7 +109,7 @@
     <url>https://builds.apache.org/job/maven-3.x/</url>
   </ciManagement>
   <distributionManagement>
-    <downloadUrl>http://maven.apache.org/download.html</downloadUrl>
+    <downloadUrl>https://maven.apache.org/download.html</downloadUrl>
     <site>
       <id>apache.website</id>
       <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/components/${maven.site.path}</url>
@@ -635,7 +639,7 @@
               <quiet>true</quiet>
               <links combine.children="append">
                 <link>http://download.eclipse.org/aether/aether-core/${aetherVersion}/apidocs/</link>
-                <link>http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/</link>
+                <link>https://codehaus-plexus.github.io/plexus-containers/plexus-container-default/apidocs/</link>
               </links>
             </configuration>
             <reportSets>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 86d5ecb..6dd30a6 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -25,11 +25,11 @@ under the License.
 
   <bannerLeft>
     <name>${project.name}</name>
-    <src>http://maven.apache.org/images/apache-maven-project.png</src>
-    <href>http://maven.apache.org/</href>
+    <src>https://maven.apache.org/images/apache-maven-project.png</src>
+    <href>https://maven.apache.org/</href>
   </bannerLeft>
   <bannerRight>
-    <src>http://maven.apache.org/images/maventxt_logo_200.gif</src>
+    <src>https://maven.apache.org/images/maventxt_logo_200.gif</src>
   </bannerRight>
 
   <skin>

http://git-wip-us.apache.org/repos/asf/maven/blob/84085c0a/src/site/xdoc/index.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 11fa0de..4cd2f66 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -35,7 +35,7 @@
     builds, dependency management, documentation creation, site
     publication, and distribution publication are all controlled from
     <a href="./maven-model/maven.html">the <code>pom.xml</code> declarative file</a>. Maven can be extended by
-    <a href="http://maven.apache.org/plugins/">plugins</a> to utilise a
+    <a href="https://maven.apache.org/plugins/">plugins</a> to utilise a
     number of other development tools for reporting or the build
     process.</p>
 
@@ -58,14 +58,14 @@
           <area shape="rect" coords="TODO"            alt="maven-slf4j-provider" href="maven-slf4j-provider/" />
           <area shape="rect" coords="88,59,192,94"    alt="slf4j-api" href="http://www.slf4j.org/manual.html" />
           <area shape="rect" coords="551,58,707,94"   alt="commons-cli" href="http://commons.apache.org/cli/" />
-          <area shape="rect" coords="551,116,739,152" alt="wagon-provider-api" href="http://maven.apache.org/wagon/wagon-provider-api/" />
+          <area shape="rect" coords="551,116,739,152" alt="wagon-provider-api" href="https://maven.apache.org/wagon/wagon-provider-api/" />
           <area shape="rect" coords="550,175,690,211" alt="plexus-sec-dispatcher" href="https://github.com/codehaus-plexus/plexus-sec-dispatcher" />
-          <area shape="rect" coords="581,230,660,265" alt="plexus-cipher" href="hhttps://github.com/codehaus-plexus/plexus-cipher" />
-          <area shape="rect" coords="551,284,707,320" alt="plexus-interpolation" href="https://github.com/codehaus-plexus/plexus-interpolation" />
-          <area shape="rect" coords="551,359,776,395" alt="plexus-component-annotations" href="https://github.com/codehaus-plexus/plexus-containers" />
-          <area shape="rect" coords="550,401,682,437" alt="plexus-classworlds" href="https://github.com/codehaus-plexus/plexus-classworlds" />
-          <area shape="rect" coords="685,455,775,491" alt="plexus-utils" href="https://github.com/codehaus-plexus/plexus-utils" />
-          <area shape="rect" coords="542,167,783,502" alt="plexus" href="https://github.com/codehaus-plexus" />
+          <area shape="rect" coords="581,230,660,265" alt="plexus-cipher" href="https://github.com/codehaus-plexus/plexus-cipher" />
+          <area shape="rect" coords="551,284,707,320" alt="plexus-interpolation" href="https://codehaus-plexus.github.io/plexus-interpolation" />
+          <area shape="rect" coords="551,359,776,395" alt="plexus-component-annotations" href="https://codehaus-plexus.github.io/plexus-containers" />
+          <area shape="rect" coords="550,401,682,437" alt="plexus-classworlds" href="https://codehaus-plexus.github.io/plexus-classworlds" />
+          <area shape="rect" coords="685,455,775,491" alt="plexus-utils" href="https://codehaus-plexus.github.io/plexus-utils" />
+          <area shape="rect" coords="542,167,783,502" alt="plexus" href="https://codehaus-plexus.github.io/" />
           <area shape="rect" coords="68,338,240,482"  alt="aether" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.aether" />
           <area shape="rect" coords="388,393,520,594" alt="sisu" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.sisu" />
           <area shape="rect" coords="519,518,621,554" alt="guice" href="http://code.google.com/p/google-guice/" />


[30/50] maven git commit: [MNG-6144] DefaultWagonManagerTest#testGetMissingJarForced() passed incorrect value

Posted by sc...@apache.org.
[MNG-6144] DefaultWagonManagerTest#testGetMissingJarForced() passed incorrect value

This closes #86


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

Branch: refs/heads/MNG-5359
Commit: 920f10a561dee3c3bc34d356082dafd1457a8647
Parents: 5b4b8bd
Author: Michael Osipov <mi...@apache.org>
Authored: Sun Oct 16 12:27:41 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sat Jan 28 17:09:30 2017 +0100

----------------------------------------------------------------------
 .../apache/maven/repository/legacy/DefaultWagonManagerTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/920f10a5/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
index b9bcf9b..aa5dd68 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
@@ -138,7 +138,7 @@ public class DefaultWagonManagerTest
 
         try
         {
-            wagonManager.getArtifact( artifact, repo, null, false );
+            wagonManager.getArtifact( artifact, repo, null, true );
 
             fail();
         }


[31/50] maven git commit: [MNG-6147] MetadataResolutionResult#getGraph() contains duplicate if clause

Posted by sc...@apache.org.
[MNG-6147] MetadataResolutionResult#getGraph() contains duplicate if clause


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

Branch: refs/heads/MNG-5359
Commit: f53f1547a16fb0f7e288de5c4684c599652ee601
Parents: 920f10a
Author: Michael Osipov <mi...@apache.org>
Authored: Sat Jan 28 15:26:52 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sat Jan 28 17:09:30 2017 +0100

----------------------------------------------------------------------
 .../maven/repository/metadata/MetadataResolutionResult.java      | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f53f1547/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
index 1d9e9c4..814b66c 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
@@ -119,10 +119,6 @@ public class MetadataResolutionResult
         {
             return conflictResolver.resolveConflicts( getGraph(), ArtifactScopeEnum.test );
         }
-        else if ( requestType.equals( MetadataResolutionRequestTypeEnum.classpathRuntime ) )
-        {
-            return conflictResolver.resolveConflicts( getGraph(), ArtifactScopeEnum.test );
-        }
         else if ( requestType.equals( MetadataResolutionRequestTypeEnum.graph ) )
         {
             return getGraph();


[14/50] maven git commit: [MNG-6017] Removing ArtifactHandler for par LifeCycle o Removed ArtifactHandler configuration for par lifeclyce which has been removed in Maven 3.3.9 See MNG-5892

Posted by sc...@apache.org.
[MNG-6017] Removing ArtifactHandler for par LifeCycle
 o Removed ArtifactHandler configuration for par lifeclyce
   which has been removed in Maven 3.3.9
   See MNG-5892


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

Branch: refs/heads/MNG-5359
Commit: bc07e74d3c974dae60aad1024d4cd1c4d0714b3a
Parents: cfb075a
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu May 5 22:40:18 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Tue Jan 24 20:21:55 2017 +0100

----------------------------------------------------------------------
 .../resources/META-INF/plexus/artifact-handlers.xml   | 14 --------------
 maven-core/src/site/apt/artifact-handlers.apt         |  2 --
 2 files changed, 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/bc07e74d/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
index 05795be..f467252 100644
--- a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
@@ -201,19 +201,5 @@ Artifact handlers are required by the dependency resolution mechanism.
       </configuration>
     </component>
 
-    <!--
-     | PAR
-     |-->
-    <component>
-      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>par</role-hint>
-      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
-      <configuration>
-        <type>par</type>
-        <includesDependencies>true</includesDependencies>
-        <language>java</language>
-        <addedToClasspath>false</addedToClasspath>
-      </configuration>
-    </component>
   </components>
 </component-set>

http://git-wip-us.apache.org/repos/asf/maven/blob/bc07e74d/maven-core/src/site/apt/artifact-handlers.apt
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/artifact-handlers.apt b/maven-core/src/site/apt/artifact-handlers.apt
index 916161b..a7ffade 100644
--- a/maven-core/src/site/apt/artifact-handlers.apt
+++ b/maven-core/src/site/apt/artifact-handlers.apt
@@ -47,8 +47,6 @@ Default Artifact Handlers Reference
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<rar>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
-| <<<par>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
-*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<java-source>>>  | <<<jar>>>  | <= type>   | <<<sources>>> | java      |                     |                       |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<javadoc>>>      | <<<jar>>>  | <= type>   | <<<javadoc>>> | java      | <<<true>>>          |                       |


[20/50] maven git commit: updated notice

Posted by sc...@apache.org.
updated notice

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

Branch: refs/heads/MNG-5359
Commit: 60e4fa650fc2e5b3b646c74f3eeab7d0381b8bcb
Parents: 512fa6a
Author: Herv� Boutemy <hb...@apache.org>
Authored: Wed Oct 5 23:57:03 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:08:12 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/maven/project/MavenProjectBuilder.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/60e4fa65/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java b/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
index c44d8db..816b4a9 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
@@ -39,7 +39,8 @@ public interface MavenProjectBuilder
     MavenProject build( File pom, ProjectBuilderConfiguration configuration )
         throws ProjectBuildingException;
 
-    //TODO maven-site-plugin -- Vincent, Dennis and Lukas are checking but this doesn't appear to be required anymore.
+    //TODO maven-site-plugin -- not used by the plugin directly, but used by Doxia Integration Tool & MPIR
+    // see DOXIASITETOOLS-167 & MPIR-349
     MavenProject build( File pom, ArtifactRepository localRepository, ProfileManager profileManager )
         throws ProjectBuildingException;
 


[43/50] maven git commit: [MNG-6068] Document default scope compile in XSD o Improved description.

Posted by sc...@apache.org.
[MNG-6068] Document default scope compile in XSD
 o Improved description.


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

Branch: refs/heads/MNG-5359
Commit: 8c7ce555720ec205680a1ce71ede03a4bc49bedb
Parents: 1f04934
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Mon Jan 30 12:48:28 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Mon Jan 30 12:48:28 2017 +0100

----------------------------------------------------------------------
 maven-model/src/main/mdo/maven.mdo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/8c7ce555/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 2f4ea0c..d830113 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -1398,7 +1398,7 @@
             It also assists in determining which artifacts to include in a distribution of
             this project. For more information, see
             <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
-            dependency mechanism</a>. If no scope is given the scope is <code>compile</code>.
+            dependency mechanism</a>. The default scope is <code>compile</code>.
             ]]>
           </description>
           <type>String</type>


[21/50] maven git commit: removed now unused checkstyle suppress warnings

Posted by sc...@apache.org.
removed now unused checkstyle suppress warnings

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

Branch: refs/heads/MNG-5359
Commit: 8a8f7cd53f08bd0847e6263f79894d18881dcd9d
Parents: 60e4fa6
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sun Oct 16 23:16:52 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:09:01 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/8a8f7cd5/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 8455848..c0b0dcf 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
@@ -1056,7 +1056,6 @@ public class MavenCli
 
     private static final String ANSI_RESET = "\u001B\u005Bm";
 
-    @SuppressWarnings( "checkstyle:methodlength" )
     private void configure( CliRequest cliRequest )
         throws Exception
     {
@@ -1122,7 +1121,6 @@ public class MavenCli
         }
     }
 
-    @SuppressWarnings( "checkstyle:methodlength" )
     private void toolchains( CliRequest cliRequest )
         throws Exception
     {


[03/50] maven git commit: [MNG-6106] Remove maven.home setter from m2.conf

Posted by sc...@apache.org.
[MNG-6106] Remove maven.home setter from m2.conf


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

Branch: refs/heads/MNG-5359
Commit: 5053a628c0a4eb069ab5512ad7491494207cb996
Parents: 8373c79
Author: Michael Osipov <mi...@apache.org>
Authored: Sun Jan 22 12:33:50 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 22 21:37:57 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/m2.conf | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5053a628/apache-maven/src/bin/m2.conf
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/m2.conf b/apache-maven/src/bin/m2.conf
index 213dc55..346554c 100644
--- a/apache-maven/src/bin/m2.conf
+++ b/apache-maven/src/bin/m2.conf
@@ -1,7 +1,5 @@
 main is org.apache.maven.cli.MavenCli from plexus.core
 
-set maven.home default ${user.home}/m2
-
 [plexus.core]
 load       ${maven.home}/conf/logging
 optionally ${maven.home}/lib/ext/*.jar


[49/50] maven git commit: [MNG-6003] Drastically reduce JAVA_HOME discovery code

Posted by sc...@apache.org.
[MNG-6003] Drastically reduce JAVA_HOME discovery code

All special handling has been removed. JAVA_HOME must be set properly by
the user if necessary. Error messages have been graciously borrowed from
the Tomcat start scripts.


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

Branch: refs/heads/MNG-5359
Commit: 2678388ea2cebc43f58009720609523ae09176f7
Parents: d426bf9
Author: Michael Osipov <mi...@apache.org>
Authored: Fri Apr 15 22:17:15 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 19:57:17 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn     | 84 ++++-----------------------------------
 apache-maven/src/bin/mvn.cmd | 53 ++++++++++++------------
 2 files changed, 34 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/2678388e/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 172f43b..4db1ad6 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -41,52 +41,12 @@ fi
 
 # OS specific support. $var _must_ be set to either true or false.
 cygwin=false;
-darwin=false;
 mingw=false;
 case "`uname`" in
   CYGWIN*) cygwin=true;;
   MINGW*) mingw=true;;
-  Darwin*) darwin=true
-           #
-           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
-           # for the new JDKs provided by Oracle.
-           #
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
-             #
-             # Apple JDKs
-             #
-             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
-           fi
-
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
-             #
-             # Apple JDKs
-             #
-             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
-           fi
-
-           if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
-             #
-             # Oracle JDKs
-             #
-             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
-           fi
-
-           if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
-             #
-             # Apple JDKs
-             #
-             export JAVA_HOME=`/usr/libexec/java_home`
-           fi
-           ;;
 esac
 
-if [ -z "$JAVA_HOME" ] ; then
-  if [ -r /etc/gentoo-release ] ; then
-    JAVA_HOME=`java-config --jre-home`
-  fi
-fi
-
 ## resolve links - $0 may be a link to Maven's home
 PRG="$0"
 
@@ -129,49 +89,19 @@ if $mingw ; then
   # TODO classpath?
 fi
 
-if [ -z "$JAVA_HOME" ]; then
-  javaExecutable="`which javac`"
-  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
-    # readlink(1) is not available as standard on Solaris 10.
-    readLink=`which readlink`
-    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
-      if $darwin ; then
-        javaHome="`dirname \"$javaExecutable\"`"
-        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
-      else
-        javaExecutable="`readlink -f \"$javaExecutable\"`"
-      fi
-      javaHome="`dirname \"$javaExecutable\"`"
-      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
-      JAVA_HOME="$javaHome"
-      export JAVA_HOME
-    fi
-  fi
-fi
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD="`which java`"
-  fi
+if [ -z "$JAVA_HOME" ] ; then
+  JAVACMD="`which java`"
+else
+  JAVACMD="$JAVA_HOME/bin/java"
 fi
 
 if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly." >&2
-  echo "  We cannot execute $JAVACMD" >&2
+  echo "The JAVA_HOME environment variable is not defined correctly" >&2
+  echo "This environment variable is needed to run this program" >&2
+  echo "NB: JAVA_HOME should point to a JDK not a JRE" >&2
   exit 1
 fi
 
-if [ -z "$JAVA_HOME" ] ; then
-  echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
 CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
 CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 

http://git-wip-us.apache.org/repos/asf/maven/blob/2678388e/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index aab3085..ecee20c 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -30,10 +30,10 @@
 @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
 @echo off
 @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+@if "%MAVEN_BATCH_ECHO%"=="on" echo %MAVEN_BATCH_ECHO%
 
 @REM Execute a user defined script before this one
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPre
 @REM check for pre script, once with legacy .bat ending and once with .cmd ending
 if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat"
 if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd"
@@ -44,24 +44,19 @@ if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd"
 set ERROR_CODE=0
 
 @REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo Error: JAVA_HOME not found in your environment. >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
+if not "%JAVA_HOME%"=="" goto OkJHome
+for %%i in (java.exe) do set "JAVACMD=%%~$PATH:i"
+goto checkJCmd
 
 :OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
-
-echo.
-echo Error: JAVA_HOME is set to an invalid directory. >&2
-echo JAVA_HOME = "%JAVA_HOME%" >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
+set "JAVACMD=%JAVA_HOME%\bin\java.exe"
+
+:checkJCmd
+if exist "%JAVACMD%" goto chkMHome
+
+echo The JAVA_HOME environment variable is not defined correctly >&2
+echo This environment variable is needed to run this program >&2
+echo NB: JAVA_HOME should point to a JDK not a JRE >&2
 goto error
 
 :chkMHome
@@ -114,7 +109,7 @@ cd "%EXEC_DIR%"
 :endDetectBaseDir
 
 set "jvmConfig=\.mvn\jvm.config"
-if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%"  goto endReadAdditionalConfig
+if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%" goto endReadAdditionalConfig
 
 @setlocal EnableExtensions EnableDelayedExpansion
 for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@@ -122,13 +117,19 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
 
 :endReadAdditionalConfig
 
-set MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-
 for %%i in ("%MAVEN_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
-
 set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" "-Dmaven.home=%MAVEN_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
+"%JAVACMD%" ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %CLASSWORLDS_JAR% ^
+  "-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" ^
+  "-Dmaven.home=%MAVEN_HOME%" ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext" ^
+  %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
 if ERRORLEVEL 1 goto error
 goto end
 
@@ -138,15 +139,15 @@ set ERROR_CODE=1
 :end
 @endlocal & set ERROR_CODE=%ERROR_CODE%
 
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
 @REM check for post script, once with legacy .bat ending and once with .cmd ending
 if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
 if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
 :skipRcPost
 
 @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
 
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
 
 cmd /C exit /B %ERROR_CODE%


[50/50] maven git commit: [MNG-5359] Declared execution in PluginMgmt gets bound to lifecycle (regression)

Posted by sc...@apache.org.
[MNG-5359] Declared execution in PluginMgmt gets bound to lifecycle (regression)


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

Branch: refs/heads/MNG-5359
Commit: 72c6051382c17eb72281c8ecf4ffb6b65c6b3ff1
Parents: 2678388
Author: Christian Schulte <sc...@apache.org>
Authored: Sun Dec 20 19:32:57 2015 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Tue Jan 31 04:00:41 2017 +0100

----------------------------------------------------------------------
 .../project/EmptyLifecyclePluginAnalyzer.java   |  27 ++-
 .../project/AbstractMavenProjectTestCase.xml    |   2 +-
 .../lifecycle/DefaultLifecycleExecutor.java     |  22 +-
 .../lifecycle/LifeCyclePluginAnalyzer.java      |  32 ---
 .../maven/lifecycle/LifecycleExecutor.java      |  20 +-
 .../LifecycleMappingNotFoundException.java      |  45 ++++
 .../lifecycle/LifecyclePluginAnalyzer.java      |  59 ++++++
 .../DefaultLifecyclePluginAnalyzer.java         | 207 ++++++++++++++-----
 .../DefaultLifecycleBindingsInjector.java       |  40 ++--
 .../lifecycle/EmptyLifecyclePluginAnalyzer.java |  25 ++-
 .../LifecycleExecutorSubModulesTest.java        |   4 +-
 .../stub/LifeCyclePluginAnalyzerStub.java       |  74 -------
 .../stub/LifecyclePluginAnalyzerStub.java       |  96 +++++++++
 .../project/AbstractMavenProjectTestCase.xml    |   2 +-
 .../maven/project/PomConstructionTest.xml       |   2 +-
 15 files changed, 451 insertions(+), 206 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
index 672e07b..2e0d7ea 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
@@ -23,7 +23,9 @@ import java.util.Collections;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
-import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
+import org.apache.maven.lifecycle.LifecyclePluginAnalyzer;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
 
@@ -31,8 +33,9 @@ import org.apache.maven.model.PluginExecution;
  * @author Benjamin Bentmann
  */
 public class EmptyLifecyclePluginAnalyzer
-    implements LifeCyclePluginAnalyzer
+    implements LifecyclePluginAnalyzer
 {
+
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
     {
         Set<Plugin> plugins;
@@ -57,6 +60,26 @@ public class EmptyLifecyclePluginAnalyzer
         return plugins;
     }
 
+    @Override
+    public Model getLifecycleModel( final Model model )
+    {
+        if ( model == null )
+        {
+            throw new NullPointerException( "model" );
+        }
+
+        final Model lifecycleModel = new Model();
+        lifecycleModel.setBuild( new Build() );
+        lifecycleModel.getBuild().setPluginManagement( model.getBuild() != null
+                                                           ? model.getBuild().getPluginManagement()
+                                                           : null );
+
+        lifecycleModel.getBuild().getPlugins().
+            addAll( this.getPluginsBoundByDefaultToAllLifecycles( model.getPackaging() ) );
+
+        return lifecycleModel;
+    }
+
     private Plugin newPlugin( String artifactId, String... goals )
     {
         Plugin plugin = new Plugin();

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-compat/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml b/maven-compat/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
index bcc291e..7e02f5e 100644
--- a/maven-compat/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
+++ b/maven-compat/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
@@ -2,7 +2,7 @@
 <plexus>
   <components>
     <component>
-      <role>org.apache.maven.lifecycle.LifeCyclePluginAnalyzer</role>
+      <role>org.apache.maven.lifecycle.LifecyclePluginAnalyzer</role>
       <implementation>org.apache.maven.project.EmptyLifecyclePluginAnalyzer</implementation>
     </component>
   </components>

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
index 6f994b3..0311f35 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
@@ -62,7 +62,7 @@ public class DefaultLifecycleExecutor
 {
 
     @Requirement
-    private LifeCyclePluginAnalyzer lifeCyclePluginAnalyzer;
+    private LifecyclePluginAnalyzer lifecyclePluginAnalyzer;
 
     @Requirement
     private DefaultLifecycles defaultLifeCycles;
@@ -88,21 +88,15 @@ public class DefaultLifecycleExecutor
     @Requirement
     private MojoDescriptorCreator mojoDescriptorCreator;
 
-    // These methods deal with construction intact Plugin object that look like they come from a standard
-    // <plugin/> block in a Maven POM. We have to do some wiggling to pull the sources of information
-    // together and this really shows the problem of constructing a sensible default configuration but
-    // it's all encapsulated here so it appears normalized to the POM builder.
-
-    // We are going to take the project packaging and find all plugin in the default lifecycle and create
-    // fully populated Plugin objects, including executions with goals and default configuration taken
-    // from the plugin.xml inside a plugin.
-    //
-    // TODO: This whole method could probably removed by injecting lifeCyclePluginAnalyzer straight into client site.
-    // TODO: But for some reason the whole plexus appcontext refuses to start when I try this.
-
+    /**
+     * @deprecated As of Maven 3.5, please use
+     * {@link LifecyclePluginAnalyzer#getLifecycleModel(org.apache.maven.model.Model)}.
+     */
+    @Deprecated
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException
     {
-        return lifeCyclePluginAnalyzer.getPluginsBoundByDefaultToAllLifecycles( packaging );
+        return lifecyclePluginAnalyzer.getPluginsBoundByDefaultToAllLifecycles( packaging );
     }
 
     // USED BY MAVEN HELP PLUGIN

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java
deleted file mode 100644
index ed07c1d..0000000
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.apache.maven.lifecycle;
-
-/*
- * 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.Set;
-import org.apache.maven.model.Plugin;
-
-/**
- * @since 3.0
- * @author Kristian Rosenvold
- */
-public interface LifeCyclePluginAnalyzer
-{
-    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging );
-}

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
index 04c602c..e462f8c 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
@@ -38,7 +38,7 @@ import java.util.Set;
 /**
  * A facade that provides lifecycle services to components outside Maven core.
  *
- * @author Jason van  Zyl
+ * @author Jason van Zyl
  */
 public interface LifecycleExecutor
 {
@@ -47,21 +47,13 @@ public interface LifecycleExecutor
     @Deprecated
     String ROLE = LifecycleExecutor.class.getName();
 
-    // For a given project packaging find all the plugins that are bound to any registered
-    // lifecycles. The project builder needs to now what default plugin information needs to be
-    // merged into POM being built. Once the POM builder has this plugin information, versions can be assigned
-    // by the POM builder because they will have to be defined in plugin management. Once this is setComplete then it
-    // can be passed back so that the default configuration information can be populated.
-    //
-    // We need to know the specific version so that we can lookup the right version of the plugin descriptor
-    // which tells us what the default configuration is.
-    //
-
     /**
-     * @return The plugins bound to the lifecycles of the specified packaging or {@code null} if the packaging is
-     *         unknown.
+     * @deprecated As of Maven 3.5, please use
+     * {@link LifecyclePluginAnalyzer#getLifecycleModel(org.apache.maven.model.Model)}.
      */
-    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging );
+    @Deprecated
+    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException;
 
     MavenExecutionPlan calculateExecutionPlan( MavenSession session, String... tasks )
         throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java
new file mode 100644
index 0000000..73aaf30
--- /dev/null
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java
@@ -0,0 +1,45 @@
+package org.apache.maven.lifecycle;
+
+/*
+ * 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.
+ */
+
+/**
+ * Signals a failure to locate a lifecycle mapping.
+ *
+ * @author Christian Schulte
+ *
+ * @since 3.5
+ */
+public final class LifecycleMappingNotFoundException extends Exception
+{
+
+    private String packaging;
+
+    public LifecycleMappingNotFoundException( final String packaging )
+    {
+        super( String.format( "No lifecycle mapping found for packaging '%s'.", packaging ) );
+        this.packaging = packaging;
+    }
+
+    public String getPackaging()
+    {
+        return this.packaging;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePluginAnalyzer.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePluginAnalyzer.java
new file mode 100644
index 0000000..814b5e6
--- /dev/null
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePluginAnalyzer.java
@@ -0,0 +1,59 @@
+package org.apache.maven.lifecycle;
+
+/*
+ * 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.Set;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+
+/**
+ * @since 3.0
+ * @author Kristian Rosenvold
+ */
+public interface LifecyclePluginAnalyzer
+{
+
+    /**
+     * @deprecated As of Maven 3.5, replaced by method {@link #getLifecycleModel(org.apache.maven.model.Model)}.
+     */
+    @Deprecated
+    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException;
+
+    /**
+     * Gets the lifecycle {@code Model} for a given {@code Model}.
+     * <p>
+     * The lifecycle model for a given model is the list of default build plugins plus lifecycle plugin execution
+     * management.
+     * </p>
+     *
+     * @param model The {@code Model} to get the lifecycle {@code Model} for.
+     *
+     * @return The lifecycle {@code Model} for {@code model}.
+     *
+     * @throws NullPointerException if {@code model} is {@code null}.
+     * @throws LifecycleMappingNotFoundException if {@code model} declares an unsupported packaging.
+     *
+     * @since 3.5
+     */
+    Model getLifecycleModel( Model model )
+        throws LifecycleMappingNotFoundException;
+
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/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 a72ce8e..b4f981d 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
@@ -19,40 +19,43 @@ package org.apache.maven.lifecycle.internal;
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import org.apache.maven.lifecycle.DefaultLifecycles;
-import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
+import org.apache.maven.lifecycle.LifecyclePluginAnalyzer;
 import org.apache.maven.lifecycle.Lifecycle;
+import org.apache.maven.lifecycle.LifecycleMappingNotFoundException;
 import org.apache.maven.lifecycle.mapping.LifecycleMapping;
 import org.apache.maven.lifecycle.mapping.LifecycleMojo;
 import org.apache.maven.lifecycle.mapping.LifecyclePhase;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
+import org.apache.maven.model.PluginManagement;
 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 java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 /**
  * @since 3.0
  * @author Benjamin Bentmann
  * @author Jason van Zyl
  * @author jdcasey
  * @author Kristian Rosenvold (extracted class only)
- *         <p/>
- *         NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
+ * <p/>
+ * NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
  */
-@Component( role = LifeCyclePluginAnalyzer.class )
+@Component( role = LifecyclePluginAnalyzer.class )
 public class DefaultLifecyclePluginAnalyzer
-    implements LifeCyclePluginAnalyzer
+    implements LifecyclePluginAnalyzer
 {
 
     @Requirement( role = LifecycleMapping.class )
@@ -68,64 +71,117 @@ public class DefaultLifecyclePluginAnalyzer
     {
     }
 
+    // -----------------------------------------------------------------------------------------------------------------
+    // Comment regarding these methods moved here from LifecycleExecuter:
+    // -----------------------------------------------------------------------------------------------------------------
+    // For a given project packaging find all the plugins that are bound to any registered
+    // lifecycles. The project builder needs to now what default plugin information needs to be
+    // merged into POM being built. Once the POM builder has this plugin information, versions can be assigned
+    // by the POM builder because they will have to be defined in plugin management. Once this is setComplete then it
+    // can be passed back so that the default configuration information can be populated.
+    //
+    // We need to know the specific version so that we can lookup the right version of the plugin descriptor
+    // which tells us what the default configuration is.
+    // -----------------------------------------------------------------------------------------------------------------
+    // Comment regarding these methods moved here from DefaultLifecycleExecutor:
+    // -----------------------------------------------------------------------------------------------------------------
     // These methods deal with construction intact Plugin object that look like they come from a standard
     // <plugin/> block in a Maven POM. We have to do some wiggling to pull the sources of information
     // together and this really shows the problem of constructing a sensible default configuration but
     // it's all encapsulated here so it appears normalized to the POM builder.
-
     // We are going to take the project packaging and find all plugin in the default lifecycle and create
     // fully populated Plugin objects, including executions with goals and default configuration taken
     // from the plugin.xml inside a plugin.
-    //
-
+    @Override
+    @Deprecated
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException
     {
+        if ( packaging == null )
+        {
+            throw new NullPointerException( "packaging" );
+        }
+
+        final Model model = new Model();
+        model.setPackaging( packaging );
+
+        final Set<Plugin> plugins = new HashSet<>( this.getLifecycleModel( model ).getBuild().getPlugins() );
+        return Collections.unmodifiableSet( plugins );
+    }
+
+    @Override
+    public Model getLifecycleModel( final Model model )
+        throws LifecycleMappingNotFoundException
+    {
+        if ( model == null )
+        {
+            throw new NullPointerException( "model" );
+        }
+
+        final PluginManagement pluginManagement =
+            model.getBuild() != null && model.getBuild().getPluginManagement() != null
+                ? model.getBuild().getPluginManagement().clone()
+                : null;
+
+        final Model lifecycleModel = new Model();
+        lifecycleModel.setBuild( new Build() );
+        lifecycleModel.getBuild().setPluginManagement( pluginManagement != null
+                                                           ? pluginManagement.clone()
+                                                           : new PluginManagement() );
+
+        for ( final Plugin managedPlugin : lifecycleModel.getBuild().getPluginManagement().getPlugins() )
+        {
+            managedPlugin.getExecutions().clear();
+        }
+
         if ( logger.isDebugEnabled() )
         {
-            logger.debug( "Looking up lifecyle mappings for packaging " + packaging + " from "
-                + Thread.currentThread().getContextClassLoader() );
+            logger.debug( "Looking up lifecyle mappings for packaging " + model.getPackaging() + " from "
+                              + Thread.currentThread().getContextClassLoader() );
+
         }
 
-        LifecycleMapping lifecycleMappingForPackaging = lifecycleMappings.get( packaging );
+        final LifecycleMapping lifecycleMappingForPackaging = this.lifecycleMappings.get( model.getPackaging() );
 
         if ( lifecycleMappingForPackaging == null )
         {
-            return null;
+            throw new LifecycleMappingNotFoundException( model.getPackaging() );
         }
 
-        Map<Plugin, Plugin> plugins = new LinkedHashMap<>();
+        final Map<Plugin, Plugin> plugins = new LinkedHashMap<>();
 
         for ( Lifecycle lifecycle : getOrderedLifecycles() )
         {
-            org.apache.maven.lifecycle.mapping.Lifecycle lifecycleConfiguration =
+            final org.apache.maven.lifecycle.mapping.Lifecycle lifecycleConfiguration =
                 lifecycleMappingForPackaging.getLifecycles().get( lifecycle.getId() );
 
-            Map<String, LifecyclePhase> phaseToGoalMapping = null;
-
-            if ( lifecycleConfiguration != null )
-            {
-                phaseToGoalMapping = lifecycleConfiguration.getLifecyclePhases();
-            }
-            else if ( lifecycle.getDefaultLifecyclePhases() != null )
-            {
-                phaseToGoalMapping = lifecycle.getDefaultLifecyclePhases();
-            }
+            final Map<String, LifecyclePhase> phaseToGoalMapping =
+                lifecycleConfiguration != null
+                    ? lifecycleConfiguration.getLifecyclePhases()
+                    : lifecycle.getDefaultLifecyclePhases() != null
+                          ? lifecycle.getDefaultLifecyclePhases()
+                          : null;
 
             if ( phaseToGoalMapping != null )
             {
-                for ( Map.Entry<String, LifecyclePhase> goalsForLifecyclePhase : phaseToGoalMapping.entrySet() )
+                for ( final Map.Entry<String, LifecyclePhase> goalsForLifecyclePhase : phaseToGoalMapping.entrySet() )
                 {
-                    String phase = goalsForLifecyclePhase.getKey();
-                    LifecyclePhase goals = goalsForLifecyclePhase.getValue();
+                    final String phase = goalsForLifecyclePhase.getKey();
+                    final LifecyclePhase goals = goalsForLifecyclePhase.getValue();
+
                     if ( goals != null )
                     {
-                        parseLifecyclePhaseDefinitions( plugins, phase, goals );
+                        parseLifecyclePhaseDefinitions( plugins, phase, goals, lifecycle, lifecycleModel,
+                                                        pluginManagement );
+
                     }
                 }
             }
         }
 
-        return plugins.keySet();
+        lifecycleModel.getBuild().getPlugins().addAll( plugins.keySet() );
+
+        return lifecycleModel;
     }
 
     private List<Lifecycle> getOrderedLifecycles()
@@ -137,6 +193,7 @@ public class DefaultLifecyclePluginAnalyzer
         Collections.sort( lifecycles, new Comparator<Lifecycle>()
         {
 
+            @Override
             public int compare( Lifecycle l1, Lifecycle l2 )
             {
                 return l1.getId().compareTo( l2.getId() );
@@ -147,30 +204,32 @@ public class DefaultLifecyclePluginAnalyzer
         return lifecycles;
     }
 
-    private void parseLifecyclePhaseDefinitions( Map<Plugin, Plugin> plugins, String phase, LifecyclePhase goals )
+    private void parseLifecyclePhaseDefinitions( Map<Plugin, Plugin> plugins, String phase, LifecyclePhase goals,
+                                                 final Lifecycle lifecycle, final Model lifecycleModel,
+                                                 final PluginManagement pluginManagement )
     {
         List<LifecycleMojo> mojos = goals.getMojos();
+
         if ( mojos != null )
         {
-            
             for ( int i = 0; i < mojos.size(); i++ )
             {
                 LifecycleMojo mojo = mojos.get( i );
-                
+
                 GoalSpec gs = parseGoalSpec( mojo.getGoal() );
-    
+
                 if ( gs == null )
                 {
                     logger.warn( "Ignored invalid goal specification '" + mojo.getGoal()
-                            + "' from lifecycle mapping for phase " + phase );
+                                     + "' from lifecycle mapping for phase '" + phase + "'" );
                     continue;
                 }
-    
+
                 Plugin plugin = new Plugin();
                 plugin.setGroupId( gs.groupId );
                 plugin.setArtifactId( gs.artifactId );
                 plugin.setVersion( gs.version );
-    
+
                 Plugin existing = plugins.get( plugin );
                 if ( existing != null )
                 {
@@ -184,16 +243,48 @@ public class DefaultLifecyclePluginAnalyzer
                 {
                     plugins.put( plugin, plugin );
                 }
-    
+
                 PluginExecution execution = new PluginExecution();
                 execution.setId( getExecutionId( plugin, gs.goal ) );
                 execution.setPhase( phase );
                 execution.setPriority( i - mojos.size() );
                 execution.getGoals().add( gs.goal );
                 execution.setConfiguration( mojo.getConfiguration() );
-                
+
                 plugin.setDependencies( mojo.getDependencies() );
                 plugin.getExecutions().add( execution );
+
+                if ( pluginManagement != null )
+                {
+                    final Plugin managedPlugin = this.getManagedPlugin( pluginManagement, plugin );
+
+                    if ( managedPlugin != null )
+                    {
+                        final List<PluginExecution> defaultExecutions =
+                            new ArrayList<>( managedPlugin.getExecutions().size() );
+
+                        for ( final PluginExecution pluginExecution : managedPlugin.getExecutions() )
+                        {
+                            // What if the plugin's default phase (== null) is not from the lifecyle?
+                            if ( pluginExecution.getPhase() == null
+                                     || lifecycle.getPhases().contains( pluginExecution.getPhase() ) )
+                            {
+                                defaultExecutions.add( pluginExecution );
+                            }
+                        }
+
+                        final Plugin defaultManagedPlugin =
+                            this.getManagedPlugin( lifecycleModel.getBuild().getPluginManagement(),
+                                                   managedPlugin );
+
+                        for ( final PluginExecution pluginExecution : defaultExecutions )
+                        {
+                            defaultManagedPlugin.addExecution( pluginExecution );
+                        }
+
+                        managedPlugin.getExecutions().removeAll( defaultExecutions );
+                    }
+                }
             }
         }
     }
@@ -247,6 +338,28 @@ public class DefaultLifecyclePluginAnalyzer
         return id;
     }
 
+    private Plugin getManagedPlugin( final PluginManagement pluginManagement, final Plugin plugin )
+    {
+        Plugin managedPlugin = null;
+        final String key = plugin.getKey();
+
+        if ( pluginManagement != null )
+        {
+            for ( int i = 0, s0 = pluginManagement.getPlugins().size(); i < s0; i++ )
+            {
+                final Plugin current = pluginManagement.getPlugins().get( i );
+
+                if ( current.getKey().equals( key ) )
+                {
+                    managedPlugin = current;
+                    break;
+                }
+            }
+        }
+
+        return managedPlugin;
+    }
+
     static class GoalSpec
     {
 

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
index 1401e30..aa491e7 100644
--- a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
+++ b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
@@ -20,13 +20,12 @@ package org.apache.maven.model.plugin;
  */
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-
-import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
+import org.apache.maven.lifecycle.LifecycleMappingNotFoundException;
+import org.apache.maven.lifecycle.LifecyclePluginAnalyzer;
 import org.apache.maven.model.Build;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
@@ -34,9 +33,9 @@ import org.apache.maven.model.PluginContainer;
 import org.apache.maven.model.PluginExecution;
 import org.apache.maven.model.PluginManagement;
 import org.apache.maven.model.building.ModelBuildingRequest;
-import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
@@ -55,27 +54,34 @@ public class DefaultLifecycleBindingsInjector
     private LifecycleBindingsMerger merger = new LifecycleBindingsMerger();
 
     @Requirement
-    private LifeCyclePluginAnalyzer lifecycle;
+    private LifecyclePluginAnalyzer lifecyclePluginAnalyzer;
 
+    @Override
     public void injectLifecycleBindings( Model model, ModelBuildingRequest request, ModelProblemCollector problems )
     {
-        String packaging = model.getPackaging();
+        try
+        {
+            final Model lifecycleModel = this.lifecyclePluginAnalyzer.getLifecycleModel( model );
 
-        Collection<Plugin> defaultPlugins = lifecycle.getPluginsBoundByDefaultToAllLifecycles( packaging );
+            if ( model.getBuild() == null )
+            {
+                model.setBuild( new Build() );
+            }
 
-        if ( defaultPlugins == null )
-        {
-            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
-                    .setMessage( "Unknown packaging: " + packaging )
-                    .setLocation( model.getLocation( "packaging" ) ) );
+            final PluginManagement pluginManagement = model.getBuild().getPluginManagement();
+
+            model.getBuild().setPluginManagement( lifecycleModel.getBuild().getPluginManagement() );
+
+            merger.merge( model, lifecycleModel );
+
+            model.getBuild().setPluginManagement( pluginManagement );
         }
-        else if ( !defaultPlugins.isEmpty() )
+        catch ( final LifecycleMappingNotFoundException e )
         {
-            Model lifecycleModel = new Model();
-            lifecycleModel.setBuild( new Build() );
-            lifecycleModel.getBuild().getPlugins().addAll( defaultPlugins );
+            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+                .setException( e )
+                .setLocation( model.getLocation( "packaging" ) ) );
 
-            merger.merge( model, lifecycleModel );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java b/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
index a812c26..21791da 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
@@ -23,6 +23,8 @@ import java.util.Collections;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
 
@@ -30,8 +32,9 @@ import org.apache.maven.model.PluginExecution;
  * @author Benjamin Bentmann
  */
 public class EmptyLifecyclePluginAnalyzer
-    implements LifeCyclePluginAnalyzer
+    implements LifecyclePluginAnalyzer
 {
+
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
     {
         Set<Plugin> plugins;
@@ -56,6 +59,26 @@ public class EmptyLifecyclePluginAnalyzer
         return plugins;
     }
 
+    @Override
+    public Model getLifecycleModel( final Model model )
+    {
+        if ( model == null )
+        {
+            throw new NullPointerException( "model" );
+        }
+
+        final Model lifecycleModel = new Model();
+        lifecycleModel.setBuild( new Build() );
+        lifecycleModel.getBuild().setPluginManagement( model.getBuild() != null
+                                                           ? model.getBuild().getPluginManagement()
+                                                           : null );
+
+        lifecycleModel.getBuild().getPlugins().
+            addAll( this.getPluginsBoundByDefaultToAllLifecycles( model.getPackaging() ) );
+
+        return lifecycleModel;
+    }
+
     private Plugin newPlugin( String artifactId, String... goals )
     {
         Plugin plugin = new Plugin();

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java
index 01ebeac..73a4f7e 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java
@@ -50,7 +50,7 @@ public class LifecycleExecutorSubModulesTest
     private LifecycleExecutionPlanCalculator lifeCycleExecutionPlanCalculator;
 
     @Requirement
-    private LifeCyclePluginAnalyzer lifeCyclePluginAnalyzer;
+    private LifecyclePluginAnalyzer lifeCyclePluginAnalyzer;
 
     @Requirement
     private LifecycleTaskSegmentCalculator lifeCycleTaskSegmentCalculator;
@@ -65,7 +65,7 @@ public class LifecycleExecutorSubModulesTest
         lifeCycleBuilder = lookup( LifecycleModuleBuilder.class );
         lifeCycleDependencyResolver = lookup( LifecycleDependencyResolver.class );
         lifeCycleExecutionPlanCalculator = lookup( LifecycleExecutionPlanCalculator.class );
-        lifeCyclePluginAnalyzer = lookup( LifeCyclePluginAnalyzer.class );
+        lifeCyclePluginAnalyzer = lookup( LifecyclePluginAnalyzer.class );
         lifeCycleTaskSegmentCalculator = lookup( LifecycleTaskSegmentCalculator.class );
         lookup( ExceptionHandler.class );
     }

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java
deleted file mode 100644
index b067e24..0000000
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java
+++ /dev/null
@@ -1,74 +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.
- */
-
-package org.apache.maven.lifecycle.internal.stub;
-
-import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginExecution;
-
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author Kristian Rosenvold
- */
-public class LifeCyclePluginAnalyzerStub
-    implements LifeCyclePluginAnalyzer
-{
-    public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
-    {
-        Set<Plugin> plugins;
-
-        // NOTE: The upper-case packaging name is intentional, that's a special hinting mode used for certain tests
-        if ( "JAR".equals( packaging ) )
-        {
-            plugins = new LinkedHashSet<>();
-
-            plugins.add( newPlugin( "maven-compiler-plugin", "compile", "testCompile" ) );
-            plugins.add( newPlugin( "maven-resources-plugin", "resources", "testResources" ) );
-            plugins.add( newPlugin( "maven-surefire-plugin", "test" ) );
-            plugins.add( newPlugin( "maven-jar-plugin", "jar" ) );
-            plugins.add( newPlugin( "maven-install-plugin", "install" ) );
-            plugins.add( newPlugin( "maven-deploy-plugin", "deploy" ) );
-        }
-        else
-        {
-            plugins = Collections.emptySet();
-        }
-
-        return plugins;
-    }
-
-    private Plugin newPlugin( String artifactId, String... goals )
-    {
-        Plugin plugin = new Plugin();
-
-        plugin.setGroupId( "org.apache.maven.plugins" );
-        plugin.setArtifactId( artifactId );
-
-        for ( String goal : goals )
-        {
-            PluginExecution pluginExecution = new PluginExecution();
-            pluginExecution.setId( "default-" + goal );
-            pluginExecution.addGoal( goal );
-            plugin.addExecution( pluginExecution );
-        }
-
-        return plugin;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecyclePluginAnalyzerStub.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecyclePluginAnalyzerStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecyclePluginAnalyzerStub.java
new file mode 100644
index 0000000..5a1d9db
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecyclePluginAnalyzerStub.java
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+package org.apache.maven.lifecycle.internal.stub;
+
+import org.apache.maven.lifecycle.LifecyclePluginAnalyzer;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginExecution;
+
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.apache.maven.model.Build;
+
+/**
+ * @author Kristian Rosenvold
+ */
+public class LifecyclePluginAnalyzerStub
+    implements LifecyclePluginAnalyzer
+{
+
+    public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+    {
+        Set<Plugin> plugins;
+
+        // NOTE: The upper-case packaging name is intentional, that's a special hinting mode used for certain tests
+        if ( "JAR".equals( packaging ) )
+        {
+            plugins = new LinkedHashSet<>();
+
+            plugins.add( newPlugin( "maven-compiler-plugin", "compile", "testCompile" ) );
+            plugins.add( newPlugin( "maven-resources-plugin", "resources", "testResources" ) );
+            plugins.add( newPlugin( "maven-surefire-plugin", "test" ) );
+            plugins.add( newPlugin( "maven-jar-plugin", "jar" ) );
+            plugins.add( newPlugin( "maven-install-plugin", "install" ) );
+            plugins.add( newPlugin( "maven-deploy-plugin", "deploy" ) );
+        }
+        else
+        {
+            plugins = Collections.emptySet();
+        }
+
+        return plugins;
+    }
+
+    @Override
+    public Model getLifecycleModel( final Model model )
+    {
+        if ( model == null )
+        {
+            throw new NullPointerException( "model" );
+        }
+
+        final Model lifecycleModel = new Model();
+        lifecycleModel.setBuild( new Build() );
+        lifecycleModel.getBuild().setPluginManagement( model.getBuild() != null
+                                                           ? model.getBuild().getPluginManagement()
+                                                           : null );
+
+        lifecycleModel.getBuild().getPlugins().
+            addAll( this.getPluginsBoundByDefaultToAllLifecycles( model.getPackaging() ) );
+
+        return lifecycleModel;
+    }
+
+    private Plugin newPlugin( String artifactId, String... goals )
+    {
+        Plugin plugin = new Plugin();
+
+        plugin.setGroupId( "org.apache.maven.plugins" );
+        plugin.setArtifactId( artifactId );
+
+        for ( String goal : goals )
+        {
+            PluginExecution pluginExecution = new PluginExecution();
+            pluginExecution.setId( "default-" + goal );
+            pluginExecution.addGoal( goal );
+            plugin.addExecution( pluginExecution );
+        }
+
+        return plugin;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml b/maven-core/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
index e052489..d48de04 100644
--- a/maven-core/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
+++ b/maven-core/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
@@ -2,7 +2,7 @@
 <plexus>
   <components>
     <component>
-      <role>org.apache.maven.lifecycle.LifeCyclePluginAnalyzer</role>
+      <role>org.apache.maven.lifecycle.LifecyclePluginAnalyzer</role>
       <implementation>org.apache.maven.lifecycle.EmptyLifecyclePluginAnalyzer</implementation>
     </component>
   </components>

http://git-wip-us.apache.org/repos/asf/maven/blob/72c60513/maven-core/src/test/resources/org/apache/maven/project/PomConstructionTest.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/test/resources/org/apache/maven/project/PomConstructionTest.xml b/maven-core/src/test/resources/org/apache/maven/project/PomConstructionTest.xml
index e3c3ab3..40b5f93 100644
--- a/maven-core/src/test/resources/org/apache/maven/project/PomConstructionTest.xml
+++ b/maven-core/src/test/resources/org/apache/maven/project/PomConstructionTest.xml
@@ -2,7 +2,7 @@
 <plexus>
   <components>
     <component>
-      <role>org.apache.maven.lifecycle.LifeCyclePluginAnalyzer</role>
+      <role>org.apache.maven.lifecycle.LifecyclePluginAnalyzer</role>
       <implementation>org.apache.maven.lifecycle.EmptyLifecyclePluginAnalyzer</implementation>
     </component>
     <component>


[32/50] maven git commit: [MNG-6145] Remove non-existent m2 include in component.xml

Posted by sc...@apache.org.
[MNG-6145] Remove non-existent m2 include in component.xml


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

Branch: refs/heads/MNG-5359
Commit: aecccf9a2a0a5d2db1fcb602cc972284fd573a4a
Parents: f53f154
Author: Michael Osipov <mi...@apache.org>
Authored: Fri Oct 7 21:39:24 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sat Jan 28 18:19:31 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/main/assembly/component.xml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/aecccf9a/apache-maven/src/main/assembly/component.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/main/assembly/component.xml b/apache-maven/src/main/assembly/component.xml
index 8ccf02a..ca4dcb6 100644
--- a/apache-maven/src/main/assembly/component.xml
+++ b/apache-maven/src/main/assembly/component.xml
@@ -68,7 +68,6 @@ under the License.
       <directory>src/bin</directory>
       <outputDirectory>bin</outputDirectory>
       <includes>
-        <include>m2</include>
         <include>mvn</include>
         <include>mvnDebug</include>
         <!-- This is so that CI systems can periodically run the profiler -->


[10/50] maven git commit: [MNG-3507] added color to Maven execution output messages

Posted by sc...@apache.org.
[MNG-3507] added color to Maven execution output messages

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

Branch: refs/heads/MNG-5359
Commit: b80915b8822b51aafa962a9ef53a61c0ac59033d
Parents: 8b66162
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sun Jun 5 13:11:45 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Tue Jan 24 18:40:07 2017 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml                            |   4 +
 apache-maven/src/bin/mvn                        |   1 +
 apache-maven/src/bin/mvn.cmd                    |   2 +-
 maven-core/pom.xml                              |   4 +
 .../lifecycle/LifecycleExecutionException.java  |  27 ++---
 .../main/resources/META-INF/maven/extension.xml |   3 +
 maven-embedder/pom.xml                          |   4 +
 .../java/org/apache/maven/cli/CLIManager.java   |   4 +-
 .../org/apache/maven/cli/CLIReportingUtils.java |   6 +-
 .../java/org/apache/maven/cli/MavenCli.java     |  87 ++++++++++++--
 .../maven/cli/event/ExecutionEventLogger.java   | 117 ++++++++++---------
 maven-embedder/src/site/apt/index.apt.vm        |   5 +
 pom.xml                                         |  10 ++
 13 files changed, 192 insertions(+), 82 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 735e5b8..f7c28ed 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -91,6 +91,10 @@
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.fusesource.jansi</groupId>
+      <artifactId>jansi</artifactId>
+    </dependency>
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 6875628..f3acb73 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -241,4 +241,5 @@ exec "$JAVACMD" \
   -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
   "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
   "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/ext" \
   ${CLASSWORLDS_LAUNCHER} "$@"

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index d35c1d2..5ad99ae 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -154,7 +154,7 @@ for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
 
 set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
 if ERRORLEVEL 1 goto error
 goto end
 

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index ac1968b..efff5c1 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -75,6 +75,10 @@
       <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-util</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-shared-utils</artifactId>
+    </dependency>
     <!-- Plexus -->
     <dependency>
       <groupId>org.eclipse.sisu</groupId>

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
index 349576c..62ae269 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
@@ -19,8 +19,11 @@ package org.apache.maven.lifecycle;
  * under the License.
  */
 
+import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
+
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.utils.logging.MessageBuilder;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -75,34 +78,26 @@ public class LifecycleExecutionException
 
     private static String createMessage( MojoExecution execution, MavenProject project, Throwable cause )
     {
-        StringBuilder buffer = new StringBuilder( 256 );
+        MessageBuilder buffer = buffer( 256 );
 
-        buffer.append( "Failed to execute goal" );
+        buffer.a( "Failed to execute goal" );
 
         if ( execution != null )
         {
-            buffer.append( ' ' );
-            buffer.append( execution.getGroupId() );
-            buffer.append( ':' );
-            buffer.append( execution.getArtifactId() );
-            buffer.append( ':' );
-            buffer.append( execution.getVersion() );
-            buffer.append( ':' );
-            buffer.append( execution.getGoal() );
-            buffer.append( " (" );
-            buffer.append( execution.getExecutionId() );
-            buffer.append( ")" );
+            buffer.a( ' ' ).a( execution.getGroupId() ).a( ':' );
+            buffer.mojo( execution.getArtifactId() + ':' + execution.getVersion() + ':' + execution.getGoal() );
+            buffer.a( ' ' ).strong( '(' + execution.getExecutionId() + ')' );
         }
 
         if ( project != null )
         {
-            buffer.append( " on project " );
-            buffer.append( project.getArtifactId() );
+            buffer.a( " on project " );
+            buffer.project( project.getArtifactId() );
         }
 
         if ( cause != null )
         {
-            buffer.append( ": " ).append( cause.getMessage() );
+            buffer.a( ": " ).failure( cause.getMessage() );
         }
 
         return buffer.toString();

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/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 e3af5a0..07e60aa 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -118,6 +118,8 @@ under the License.
     <exportedPackage>org.slf4j.spi.*</exportedPackage>
     <exportedPackage>org.slf4j.helpers.*</exportedPackage>
 
+    <!-- JAnsi -->
+    <exportedPackage>org.fusesource.jansi.*</exportedPackage>
   </exportedPackages>
 
   <exportedArtifacts>
@@ -156,6 +158,7 @@ under the License.
 
     <exportedArtifact>javax.inject:javax.inject</exportedArtifact>
     <exportedArtifact>org.slf4j:slf4j-api</exportedArtifact>
+    <exportedArtifact>org.fusesource.jansi:jansi</exportedArtifact>
 
     <!--
       | We must also filter out the old or NoClassDefFoundErrors will surface  

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index e02e43d..04b8da6 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -47,6 +47,10 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-shared-utils</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
index f461835..673f52d 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
@@ -108,7 +108,7 @@ public class CLIManager
     {
         options = new Options();
         options.addOption( OptionBuilder.withLongOpt( "help" ).withDescription( "Display help information" ).create( HELP ) );
-        options.addOption( OptionBuilder.withLongOpt( "file" ).hasArg().withDescription( "Force the use of an alternate POM file (or directory with pom.xml)." ).create( ALTERNATE_POM_FILE ) );
+        options.addOption( OptionBuilder.withLongOpt( "file" ).hasArg().withDescription( "Force the use of an alternate POM file (or directory with pom.xml, disables output color)" ).create( ALTERNATE_POM_FILE ) );
         options.addOption( OptionBuilder.withLongOpt( "define" ).hasArg().withDescription( "Define a system property" ).create( SET_SYSTEM_PROPERTY ) );
         options.addOption( OptionBuilder.withLongOpt( "offline" ).withDescription( "Work offline" ).create( OFFLINE ) );
         options.addOption( OptionBuilder.withLongOpt( "version" ).withDescription( "Display version information" ).create( VERSION ) );
@@ -118,7 +118,7 @@ public class CLIManager
         options.addOption( OptionBuilder.withLongOpt( "non-recursive" ).withDescription( "Do not recurse into sub-projects" ).create( NON_RECURSIVE ) );
         options.addOption( OptionBuilder.withLongOpt( "update-snapshots" ).withDescription( "Forces a check for missing releases and updated snapshots on remote repositories" ).create( UPDATE_SNAPSHOTS ) );
         options.addOption( OptionBuilder.withLongOpt( "activate-profiles" ).withDescription( "Comma-delimited list of profiles to activate" ).hasArg().create( ACTIVATE_PROFILES ) );
-        options.addOption( OptionBuilder.withLongOpt( "batch-mode" ).withDescription( "Run in non-interactive (batch) mode" ).create( BATCH_MODE ) );
+        options.addOption( OptionBuilder.withLongOpt( "batch-mode" ).withDescription( "Run in non-interactive (batch) mode (disables output color)" ).create( BATCH_MODE ) );
         options.addOption( OptionBuilder.withLongOpt( "no-snapshot-updates" ).withDescription( "Suppress SNAPSHOT updates" ).create( SUPRESS_SNAPSHOT_UPDATES ) );
         options.addOption( OptionBuilder.withLongOpt( "strict-checksums" ).withDescription( "Fail the build if checksums don't match" ).create( CHECKSUM_FAILURE_POLICY ) );
         options.addOption( OptionBuilder.withLongOpt( "lax-checksums" ).withDescription( "Warn if checksums don't match" ).create( CHECKSUM_WARNING_POLICY ) );

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 214704b..f164852 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -19,6 +19,8 @@ package org.apache.maven.cli;
  * under the License.
  */
 
+import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.text.SimpleDateFormat;
@@ -54,8 +56,8 @@ public final class CLIReportingUtils
     {
         final String ls = System.getProperty( "line.separator" );
         Properties properties = getBuildProperties();
-        StringBuilder version = new StringBuilder();
-        version.append( createMavenVersionString( properties ) ).append( ls );
+        StringBuilder version = new StringBuilder( 256 );
+        version.append( buffer().strong( createMavenVersionString( properties ) ) ).append( ls );
         version.append( reduce(
             properties.getProperty( "distributionShortName" ) + " home: " + System.getProperty( "maven.home",
                                                                                                 "<unknown Maven "

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/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 9da7c4d..8455848 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
@@ -19,6 +19,8 @@ package org.apache.maven.cli;
  * under the License.
  */
 
+import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
+
 import com.google.common.base.Charsets;
 import com.google.common.io.Files;
 import com.google.inject.AbstractModule;
@@ -62,6 +64,8 @@ import org.apache.maven.model.building.ModelProcessor;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.properties.internal.EnvironmentUtils;
 import org.apache.maven.properties.internal.SystemProperties;
+import org.apache.maven.shared.utils.logging.MessageBuilder;
+import org.apache.maven.shared.utils.logging.MessageUtils;
 import org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest;
 import org.apache.maven.toolchain.building.ToolchainsBuilder;
 import org.apache.maven.toolchain.building.ToolchainsBuildingResult;
@@ -107,6 +111,8 @@ import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
 import java.util.StringTokenizer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 // TODO: push all common bits back to plexus cli and prepare for transition to Guice. We don't need 50 ways to make CLIs
 
@@ -196,7 +202,12 @@ public class MavenCli
     public static int main( String[] args, ClassWorld classWorld )
     {
         MavenCli cli = new MavenCli();
-        return cli.doMain( new CliRequest( args, classWorld ) );
+
+        MessageUtils.systemInstall();
+        int result = cli.doMain( new CliRequest( args, classWorld ) );
+        MessageUtils.systemUninstall();
+
+        return result;
     }
 
     // TODO: need to externalize CliRequest
@@ -206,7 +217,11 @@ public class MavenCli
         return cli.doMain( new CliRequest( args, classWorld ) );
     }
 
-    // This supports painless invocation by the Verifier during embedded execution of the core ITs
+    /**
+     * This supports painless invocation by the Verifier during embedded execution of the core ITs.
+     * See <a href="http://maven.apache.org/shared/maven-verifier/xref/org/apache/maven/it/Embedded3xLauncher.html">
+     * <code>Embedded3xLauncher</code> in <code>maven-verifier</code></a>
+     */
     public int doMain( String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr )
     {
         PrintStream oldout = System.out;
@@ -450,11 +465,18 @@ 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 ) )
+        {
+            MessageUtils.setColorEnabled( false );
+        }
+
         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
             {
@@ -499,6 +521,26 @@ public class MavenCli
         {
             slf4jLogger.info( "Enabling strict checksum verification on all artifact downloads." );
         }
+
+        if ( slf4jLogger.isDebugEnabled() )
+        {
+            slf4jLogger.debug( "Message scheme: " + ( MessageUtils.isColorEnabled() ? "color" : "plain" ) );
+            if ( MessageUtils.isColorEnabled() )
+            {
+                MessageBuilder buff = MessageUtils.buffer();
+                buff.a( "Message styles: " );
+                buff.debug( "debug" ).a( ' ' );
+                buff.info( "info" ).a( ' ' );
+                buff.warning( "warning" ).a( ' ' );
+                buff.error( "error" ).a( ' ' );
+                buff.success( "success" ).a( ' ' );
+                buff.failure( "failure" ).a( ' ' );
+                buff.strong( "strong" ).a( ' ' );
+                buff.mojo( "mojo" ).a( ' ' );
+                buff.project( "project" );
+                slf4jLogger.debug( buff.toString() );
+            }
+        }
     }
 
     private void properties( CliRequest cliRequest )
@@ -890,11 +932,13 @@ public class MavenCli
 
             if ( !cliRequest.showErrors )
             {
-                slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the -e switch." );
+                slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the "
+                    + buffer().strong( "-e" ) + " switch." );
             }
             if ( !slf4jLogger.isDebugEnabled() )
             {
-                slf4jLogger.error( "Re-run Maven using the -X switch to enable full debug logging." );
+                slf4jLogger.error( "Re-run Maven using the " + buffer().strong( "-X" )
+                    + " switch to enable full debug logging." );
             }
 
             if ( !references.isEmpty() )
@@ -905,7 +949,7 @@ public class MavenCli
 
                 for ( Map.Entry<String, String> entry : references.entrySet() )
                 {
-                    slf4jLogger.error( entry.getValue() + " " + entry.getKey() );
+                    slf4jLogger.error( buffer().strong( entry.getValue() ) + " " + entry.getKey() );
                 }
             }
 
@@ -913,7 +957,8 @@ public class MavenCli
             {
                 slf4jLogger.error( "" );
                 slf4jLogger.error( "After correcting the problems, you can resume the build with the command" );
-                slf4jLogger.error( "  mvn <goals> -rf :" + project.getArtifactId() );
+                slf4jLogger.error( buffer().a( "  " ).strong( "mvn <goals> -rf :"
+                                + project.getArtifactId() ).toString() );
             }
 
             if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( cliRequest.request.getReactorFailureBehavior() ) )
@@ -954,19 +999,37 @@ public class MavenCli
         {
             if ( msg.indexOf( '\n' ) < 0 )
             {
-                msg += " -> " + referenceKey;
+                msg += " -> " + buffer().strong( referenceKey );
             }
             else
             {
-                msg += "\n-> " + referenceKey;
+                msg += "\n-> " + buffer().strong( referenceKey );
             }
         }
 
         String[] lines = msg.split( "(\r\n)|(\r)|(\n)" );
+        String currentColor = "";
 
         for ( int i = 0; i < lines.length; i++ )
         {
-            String line = indent + lines[i].trim();
+            // add eventual current color inherited from previous line 
+            String line = currentColor + lines[i];
+
+            // look for last ANSI escape sequence to check if nextColor
+            Matcher matcher = LAST_ANSI_SEQUENCE.matcher( line );
+            String nextColor = "";
+            if ( matcher.find() )
+            {
+                nextColor = matcher.group( 1 );
+                if ( ANSI_RESET.equals( nextColor ) )
+                {
+                    // last ANSI escape code is reset: no next color
+                    nextColor = "";
+                }
+            }
+
+            // effective line, with indent and reset if end is colored
+            line = indent + line + ( "".equals( nextColor ) ? "" : ANSI_RESET );
 
             if ( ( i == lines.length - 1 ) && ( showErrors
                 || ( summary.getException() instanceof InternalErrorException ) ) )
@@ -977,6 +1040,8 @@ public class MavenCli
             {
                 slf4jLogger.error( line );
             }
+
+            currentColor = nextColor;
         }
 
         indent += "  ";
@@ -987,6 +1052,10 @@ public class MavenCli
         }
     }
 
+    private static final Pattern LAST_ANSI_SEQUENCE = Pattern.compile( "(\u001B\\[[;\\d]*[ -/]*[@-~])[^\u001B]*$" );
+
+    private static final String ANSI_RESET = "\u001B\u005Bm";
+
     @SuppressWarnings( "checkstyle:methodlength" )
     private void configure( CliRequest cliRequest )
         throws Exception

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/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 a0eab13..25ec38d 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
@@ -21,6 +21,7 @@ package org.apache.maven.cli.event;
 
 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 org.apache.commons.lang3.Validate;
 import org.apache.maven.execution.AbstractExecutionListener;
@@ -33,6 +34,7 @@ import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.utils.logging.MessageBuilder;
 import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -74,6 +76,16 @@ public class ExecutionEventLogger
         return buffer.toString();
     }
 
+    private void infoLine( char c )
+    {
+        infoMain( chars( c, LINE_LENGTH ) );
+    }
+
+    private void infoMain( String msg )
+    {
+        logger.info( buffer().strong( msg ).toString() );
+    }
+
     @Override
     public void projectDiscoveryStarted( ExecutionEvent event )
     {
@@ -88,9 +100,9 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() && event.getSession().getProjects().size() > 1 )
         {
-            logger.info( chars( '-', LINE_LENGTH ) );
+            infoLine( '-' );
 
-            logger.info( "Reactor Build Order:" );
+            infoMain( "Reactor Build Order:" );
 
             logger.info( "" );
 
@@ -115,15 +127,15 @@ public class ExecutionEventLogger
 
             logStats( event.getSession() );
 
-            logger.info( chars( '-', LINE_LENGTH ) );
+            infoLine( '-' );
         }
     }
 
     private void logReactorSummary( MavenSession session )
     {
-        logger.info( chars( '-', LINE_LENGTH ) );
+        infoLine( '-' );
 
-        logger.info( "Reactor Summary:" );
+        infoMain( "Reactor Summary:" );
 
         logger.info( "" );
 
@@ -149,11 +161,12 @@ public class ExecutionEventLogger
 
             if ( buildSummary == null )
             {
-                buffer.append( "SKIPPED" );
+                buffer.append( buffer().warning( "SKIPPED" ) );
             }
             else if ( buildSummary instanceof BuildSuccess )
             {
-                buffer.append( "SUCCESS [" );
+                buffer.append( buffer().success( "SUCCESS" ) );
+                buffer.append( " [" );
                 String buildTimeDuration = formatDuration( buildSummary.getTime() );
                 int padSize = MAX_PADDED_BUILD_TIME_DURATION_LENGTH - buildTimeDuration.length();
                 if ( padSize > 0 )
@@ -165,7 +178,8 @@ public class ExecutionEventLogger
             }
             else if ( buildSummary instanceof BuildFailure )
             {
-                buffer.append( "FAILURE [" );
+                buffer.append( buffer().failure( "FAILURE" ) );
+                buffer.append( " [" );
                 String buildTimeDuration = formatDuration( buildSummary.getTime() );
                 int padSize = MAX_PADDED_BUILD_TIME_DURATION_LENGTH - buildTimeDuration.length();
                 if ( padSize > 0 )
@@ -182,21 +196,23 @@ public class ExecutionEventLogger
 
     private void logResult( MavenSession session )
     {
-        logger.info( chars( '-', LINE_LENGTH ) );
+        infoLine( '-' );
+        MessageBuilder buffer = buffer();
 
         if ( session.getResult().hasExceptions() )
         {
-            logger.info( "BUILD FAILURE" );
+            buffer.failure( "BUILD FAILURE" );
         }
         else
         {
-            logger.info( "BUILD SUCCESS" );
+            buffer.success( "BUILD SUCCESS" );
         }
+        logger.info( buffer.toString() );
     }
 
     private void logStats( MavenSession session )
     {
-        logger.info( chars( '-', LINE_LENGTH ) );
+        infoLine( '-' );
 
         long finish = System.currentTimeMillis();
 
@@ -222,13 +238,13 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() )
         {
-            logger.info( chars( ' ', LINE_LENGTH ) );
-            logger.info( chars( '-', LINE_LENGTH ) );
+            logger.info( "" );
+            infoLine( '-' );
 
-            logger.info( "Skipping " + event.getProject().getName() );
+            infoMain( "Skipping " + event.getProject().getName() );
             logger.info( "This project has been banned from the build due to previous failures." );
 
-            logger.info( chars( '-', LINE_LENGTH ) );
+            infoLine( '-' );
         }
     }
 
@@ -237,12 +253,12 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() )
         {
-            logger.info( chars( ' ', LINE_LENGTH ) );
-            logger.info( chars( '-', LINE_LENGTH ) );
+            logger.info( "" );
+            infoLine( '-' );
 
-            logger.info( "Building " + event.getProject().getName() + " " + event.getProject().getVersion() );
+            infoMain( "Building " + event.getProject().getName() + " " + event.getProject().getVersion() );
 
-            logger.info( chars( '-', LINE_LENGTH ) );
+            infoLine( '-' );
         }
     }
 
@@ -264,14 +280,13 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() )
         {
-            StringBuilder buffer = new StringBuilder( 128 );
+            logger.info( "" );
 
-            buffer.append( "--- " );
+            MessageBuilder buffer = buffer().strong( "--- " );
             append( buffer, event.getMojoExecution() );
             append( buffer, event.getProject() );
-            buffer.append( " ---" );
+            buffer.strong( " ---" );
 
-            logger.info( "" );
             logger.info( buffer.toString() );
         }
     }
@@ -285,16 +300,15 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() )
         {
-            StringBuilder buffer = new StringBuilder( 128 );
+            logger.info( "" );
 
-            buffer.append( ">>> " );
+            MessageBuilder buffer = buffer().strong( ">>> " );
             append( buffer, event.getMojoExecution() );
-            buffer.append( " > " );
+            buffer.strong( " > " );
             appendForkInfo( buffer, event.getMojoExecution().getMojoDescriptor() );
             append( buffer, event.getProject() );
-            buffer.append( " >>>" );
+            buffer.strong( " >>>" );
 
-            logger.info( "" );
             logger.info( buffer.toString() );
         }
     }
@@ -310,56 +324,56 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() )
         {
-            StringBuilder buffer = new StringBuilder( 128 );
+            logger.info( "" );
 
-            buffer.append( "<<< " );
+            MessageBuilder buffer = buffer().strong( "<<< " );
             append( buffer, event.getMojoExecution() );
-            buffer.append( " < " );
+            buffer.strong( " < " );
             appendForkInfo( buffer, event.getMojoExecution().getMojoDescriptor() );
             append( buffer, event.getProject() );
-            buffer.append( " <<<" );
+            buffer.strong( " <<<" );
 
-            logger.info( "" );
             logger.info( buffer.toString() );
 
             logger.info( "" );
         }
     }
 
-    private void append( StringBuilder buffer, MojoExecution me )
+    private void append( MessageBuilder buffer, MojoExecution me )
     {
-        buffer.append( me.getArtifactId() ).append( ':' ).append( me.getVersion() );
-        buffer.append( ':' ).append( me.getGoal() );
+        buffer.mojo( me.getArtifactId() + ':' + me.getVersion() + ':' + me.getGoal() );
         if ( me.getExecutionId() != null )
         {
-            buffer.append( " (" ).append( me.getExecutionId() ).append( ')' );
+            buffer.a( ' ' ).strong( '(' + me.getExecutionId() + ')' );
         }
     }
 
-    private void appendForkInfo( StringBuilder buffer, MojoDescriptor md )
+    private void appendForkInfo( MessageBuilder buffer, MojoDescriptor md )
     {
+        StringBuilder buff = new StringBuilder();
         if ( StringUtils.isNotEmpty( md.getExecutePhase() ) )
         {
             // forked phase
             if ( StringUtils.isNotEmpty( md.getExecuteLifecycle() ) )
             {
-                buffer.append( '[' );
-                buffer.append( md.getExecuteLifecycle() );
-                buffer.append( ']' );
+                buff.append( '[' );
+                buff.append( md.getExecuteLifecycle() );
+                buff.append( ']' );
             }
-            buffer.append( md.getExecutePhase() );
+            buff.append( md.getExecutePhase() );
         }
         else
         {
             // forked goal
-            buffer.append( ':' );
-            buffer.append( md.getExecuteGoal() );
+            buff.append( ':' );
+            buff.append( md.getExecuteGoal() );
         }
+        buffer.strong( buff.toString() );
     }
 
-    private void append( StringBuilder buffer, MavenProject project )
+    private void append( MessageBuilder buffer, MavenProject project )
     {
-        buffer.append( " @ " ).append( project.getArtifactId() );
+        buffer.a( " @ " ).project( project.getArtifactId() );
     }
 
     @Override
@@ -367,13 +381,12 @@ public class ExecutionEventLogger
     {
         if ( logger.isInfoEnabled() && event.getMojoExecution().getForkedExecutions().size() > 1 )
         {
-            logger.info( chars( ' ', LINE_LENGTH ) );
-            logger.info( chars( '>', LINE_LENGTH ) );
+            logger.info( "" );
+            infoLine( '>' );
 
-            logger.info( "Forking " + event.getProject().getName() + " " + event.getProject().getVersion() );
+            infoMain( "Forking " + event.getProject().getName() + " " + event.getProject().getVersion() );
 
-            logger.info( chars( '>', LINE_LENGTH ) );
+            infoLine( '>' );
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/maven-embedder/src/site/apt/index.apt.vm
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/index.apt.vm b/maven-embedder/src/site/apt/index.apt.vm
index 519fdae..17220c9 100644
--- a/maven-embedder/src/site/apt/index.apt.vm
+++ b/maven-embedder/src/site/apt/index.apt.vm
@@ -40,3 +40,8 @@ ${project.name}
    * <<<.mvn/maven.config>>> containing Maven command-line parameter,
 
    * <<<.mvn/extensions.xml>>> containing {{{./core-extensions.html}a list of extensions}}.
+
+ * since 3.5.0, output is colorized by default, with color disabled in batch mode: see
+   {{{/shared/maven-shared-utils/apidocs/org/apache/maven/shared/utils/logging/package-summary.html}styled message API}}
+   for more details.
+   
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/b80915b8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8ea9b29..f8b67aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -267,6 +267,16 @@
         <version>${plexusInterpolationVersion}</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.maven.shared</groupId>
+        <artifactId>maven-shared-utils</artifactId>
+        <version>3.1.0</version>
+      </dependency>
+      <dependency>
+        <groupId>org.fusesource.jansi</groupId>
+        <artifactId>jansi</artifactId>
+        <version>1.13</version>
+      </dependency>
+      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>${slf4jVersion}</version>


[44/50] maven git commit: [MNG-5829] mvn shell script fails with syntax error on Solaris 10

Posted by sc...@apache.org.
[MNG-5829] mvn shell script fails with syntax error on Solaris 10

Use backticks instead of $(..) for the scripting added in MNG-5767.
Solaris's /bin/sh isn't POSIX-compliant enough to recognise the first
form.

This closes #50.


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

Branch: refs/heads/MNG-5359
Commit: 1d9708a954e2d764f6ba933c4e9ba117afa9b4c4
Parents: 8c7ce55
Author: Joseph Walton <jo...@kafsemo.org>
Authored: Mon Jan 30 11:01:49 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 12:56:36 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn      | 12 ++++++------
 apache-maven/src/bin/mvnDebug |  2 +-
 apache-maven/src/bin/mvnyjp   |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/1d9708a9/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 3a4dc26..4a7f610 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -192,14 +192,14 @@ fi
 find_maven_basedir() {
   local basedir
   local wdir
-  basedir="$(pwd)"
-  wdir="$(pwd)"
+  basedir="`pwd`"
+  wdir="`pwd`"
   while [ "$wdir" != '/' ] ; do
     if [ -d "$wdir"/.mvn ] ; then
       basedir=$wdir
       break
     fi
-    wdir="$(cd "$wdir/.."; pwd)"
+    wdir="`cd "$wdir/.."; pwd`"
   done
   echo "${basedir}"
 }
@@ -207,12 +207,12 @@ find_maven_basedir() {
 # concatenates all lines of a file
 concat_lines() {
   if [ -f "$1" ]; then
-    echo "$(tr -s '\n' ' ' < "$1")"
+    echo "`tr -s '\n' ' ' < "$1"`"
   fi
 }
 
-MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}"
+MAVEN_OPTS="`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config"` $MAVEN_OPTS"
 
 # For Cygwin, switch project base directory path to Windows format before
 # executing Maven otherwise this will cause Maven not to consider it.

http://git-wip-us.apache.org/repos/asf/maven/blob/1d9708a9/apache-maven/src/bin/mvnDebug
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index 8d6e6a1..be495ff 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -31,4 +31,4 @@ MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,addre
 
 echo Preparing to execute Maven in debug mode
 
-env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" "$(dirname "$0")/mvn" "$@"
+env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" "`dirname "$0"`/mvn" "$@"

http://git-wip-us.apache.org/repos/asf/maven/blob/1d9708a9/apache-maven/src/bin/mvnyjp
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index b2dbe1d..a35eabf 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -32,4 +32,4 @@ if [ ! -f "$YJPLIB" ]; then
   exit 1
 fi
 
-env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" "$(dirname "$0")/mvn" "$@"
+env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" "`dirname "$0"`/mvn" "$@"


[19/50] maven git commit: improved documentation

Posted by sc...@apache.org.
improved documentation

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

Branch: refs/heads/MNG-5359
Commit: 512fa6a45b73663ed5b5e0e896539d1084da36f3
Parents: 0b684af
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sun Oct 2 10:02:21 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:07:55 2017 +0100

----------------------------------------------------------------------
 maven-core/project-builder.txt                  |   1 -
 .../src/main/java/org/apache/maven/Maven.java   |   3 +
 .../java/org/apache/maven/SessionScoped.java    |   4 +-
 .../apache/maven/execution/MavenSession.java    |   2 +
 .../maven/execution/ProjectDependencyGraph.java |   1 +
 .../org/apache/maven/graph/GraphBuilder.java    |   5 +
 maven-core/src/site/apt/index.apt               |  23 ++-
 .../apt/scripting-support/marmalade-support.apt | 196 -------------------
 8 files changed, 26 insertions(+), 209 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/project-builder.txt
----------------------------------------------------------------------
diff --git a/maven-core/project-builder.txt b/maven-core/project-builder.txt
deleted file mode 100644
index a9aab65..0000000
--- a/maven-core/project-builder.txt
+++ /dev/null
@@ -1 +0,0 @@
-Maven Project Builder and Maven Model Builder

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/main/java/org/apache/maven/Maven.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/Maven.java b/maven-core/src/main/java/org/apache/maven/Maven.java
index 8563847..69f9fca 100644
--- a/maven-core/src/main/java/org/apache/maven/Maven.java
+++ b/maven-core/src/main/java/org/apache/maven/Maven.java
@@ -23,7 +23,10 @@ import org.apache.maven.execution.MavenExecutionRequest;
 import org.apache.maven.execution.MavenExecutionResult;
 
 /**
+ * The main Maven execution entry point, which will execute a full Maven execution session.
+ *
  * @author Jason van Zyl
+ * @see org.apache.maven.execution.MavenSession
  */
 public interface Maven
 {

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/main/java/org/apache/maven/SessionScoped.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/SessionScoped.java b/maven-core/src/main/java/org/apache/maven/SessionScoped.java
index 63b1eb7..7738938 100644
--- a/maven-core/src/main/java/org/apache/maven/SessionScoped.java
+++ b/maven-core/src/main/java/org/apache/maven/SessionScoped.java
@@ -28,8 +28,8 @@ import java.lang.annotation.Target;
 import com.google.inject.ScopeAnnotation;
 
 /**
- * Indicates that annotated component should be instantiated before session starts and discarded after session execution
- * completes.
+ * Indicates that annotated component should be instantiated before session execution starts
+ * and discarded after session execution completes.
  *
  * @author Jason van Zyl
  * @since 3.2.0

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
index 864c49ad..d69bbba 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
@@ -39,6 +39,8 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
 import org.eclipse.aether.RepositorySystemSession;
 
 /**
+ * A Maven execution session.
+ *
  * @author Jason van Zyl
  */
 public class MavenSession

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java b/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java
index 1db277d..0d5584b 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java
@@ -27,6 +27,7 @@ import org.apache.maven.project.MavenProject;
  * Describes the inter-dependencies between projects in the reactor.
  *
  * @author Benjamin Bentmann
+ * @since 3.0-alpha
  */
 public interface ProjectDependencyGraph
 {

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/main/java/org/apache/maven/graph/GraphBuilder.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/graph/GraphBuilder.java b/maven-core/src/main/java/org/apache/maven/graph/GraphBuilder.java
index fb7c4f2..0f584d9 100644
--- a/maven-core/src/main/java/org/apache/maven/graph/GraphBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/graph/GraphBuilder.java
@@ -23,6 +23,11 @@ import org.apache.maven.execution.MavenSession;
 import org.apache.maven.execution.ProjectDependencyGraph;
 import org.apache.maven.model.building.Result;
 
+/**
+ * Builds the {@link ProjectDependencyGraph inter-dependencies graph} between projects in the reactor.
+ *
+ * @since 3.0-alpha
+ */
 public interface GraphBuilder
 {
     String HINT = "graphBuilder";

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
index 966b57c..1e7a68e 100644
--- a/maven-core/src/site/apt/index.apt
+++ b/maven-core/src/site/apt/index.apt
@@ -27,14 +27,25 @@ Maven Core
 
  Maven Core classes managing the whole build process.
 
-* Useful entry points
+* Reference Documentation
 
  * {{{./lifecycles.html}lifecycles}} and {{{./default-bindings.html}plugin bindings to <<<default>>> lifecycle}},
 
  * {{{./artifact-handlers.html}default artifact handlers}},
 
+ * {{{./extension.html}extension descriptor}} and {{{./core-extensions.html}core extensions}},
+
+ * {{{/guides/mini/guide-maven-classloading.html}classloader hierarchy}} done by <<<ClassRealmManager>>> component
+ ({{{./apidocs/org/apache/maven/classrealm/ClassRealmManager.html}javadoc}}),
+ with its <<<DefaultClassRealmManager>>> implementation
+ ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}), using
+ {{{https://codehaus-plexus.github.io/plexus-classworlds/}Plexus Classworlds}},
+
+* Useful entry points
+
  * <<<Maven>>> component ({{{./apidocs/org/apache/maven/Maven.html}javadoc}}),
- with its <<<DefaultMaven>>> implementation ({{{./xref/org/apache/maven/DefaultMaven.html}source}}),
+ with its <<<DefaultMaven>>> implementation ({{{./xref/org/apache/maven/DefaultMaven.html}source}}), to drive
+ a full <<<MavenSession>>> execution ({{{./apidocs/org/apache/maven/execution/MavenSession.html}javadoc}}
 
  * <<<ProjectBuilder>>> component ({{{./apidocs/org/apache/maven/project/ProjectBuilder.html}javadoc}}),
  with its <<<DefaultProjectBuilder>>> implementation
@@ -47,14 +58,6 @@ Maven Core
  * {{{./apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html}PluginParameterExpressionEvaluator}}, used to
  evaluate plugin parameters values during Mojo configuration,
 
- * {{{/guides/mini/guide-maven-classloading.html}classloader hierarchy}} done by <<<ClassRealmManager>>> component
- ({{{./apidocs/org/apache/maven/classrealm/ClassRealmManager.html}javadoc}}),
- with its <<<DefaultClassRealmManager>>> implementation
- ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}), using
- {{{https://codehaus-plexus.github.io/plexus-classworlds/}Plexus Classworlds}},
-
- * {{{./extension.html}extension descriptor}} and {{{./core-extensions.html}core extensions}},
-
  * <<<ExceptionHandler>>> component ({{{./apidocs/org/apache/maven/exception/ExceptionHandler.html}javadoc}}),
  with its <<<DefaultExceptionHandler>>> implementation
  ({{{./xref/org/apache/maven/exception/DefaultExceptionHandler.html}source}}), use to transform exception into useful end-user messages.

http://git-wip-us.apache.org/repos/asf/maven/blob/512fa6a4/maven-core/src/site/apt/scripting-support/marmalade-support.apt
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/scripting-support/marmalade-support.apt b/maven-core/src/site/apt/scripting-support/marmalade-support.apt
deleted file mode 100644
index 7a80966..0000000
--- a/maven-core/src/site/apt/scripting-support/marmalade-support.apt
+++ /dev/null
@@ -1,196 +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.
-
-  ---
-  Marmalade Mojo Support - Notes
-  ---
-  John Casey
-  ---
-  07-Feb-2005
-  ---
-
-Marmalade Support
-
-*Abstract
-
-  This document will track the design and implementation issues involved in
-  adding support to m2 for marmalade-based mojos.
-
-*Design Notes
-
-  [[1]] <<Marmalade mojo descriptor specification.>>
-
-        As in all mojo specifications, it is ideal that the descriptor for
-        a marmalade-based mojo be inline with the source code. This centralizes
-        all maintenance related to a single mojo to a single point of maintenance.
-
-        The following is what I'm thinking as of now:
-
-        - a marmalade-based mojo should look something like:
-
-+---+
-        <mojo xmlns="m2:mojo" xmlns:marmalade-control="marmalade:marmalade-control" marmalade-control:el="none">
-
-          <metadata>
-            <id>mmld</id>
-            <name>mmldCompile</name>
-            <lifecyclePhase>compile</lifecyclePhase>
-            <description>Used to compile marmalade scripts into java beans.</description>
-
-            <requiresDependencyResolution/>
-            <instantiationStrategy/>
-            <executionStrategy/>
-
-            <parameters>
-
-              <parameter>
-                <name>classpath</name>
-                <description>The compilation classpath</description>
-                <type>java.util.List</type>
-                <expression>#pom.artifacts</expression>
-
-                <required/>
-                <validator/>
-                <default/>
-
-              </parameter>
-
-            </parameters>
-
-          </metadata>
-
-          <execute>
-            <!-- Do some stuff. -->
-          </execute>
-
-        </mojo>
-+---+
-[NOTE] All empty elements above signify optional elements, usage specification.
-
-  [[2]] <<Marmalade mojo packager.>>
-
-        The marmalade mojo packager will:
-
-        [[a]] Locate all *.mmld files within the scripts directory of the project.
-
-              The scripts directory should be tied to the script language within
-              the POM. Until we have multiple language support in the POM, we'll
-              use something like: <<<xpath(build/marmaladeSourceDirectory)>>>.
-
-        [[b]] For each script found:
-
-              [[i]]   Execute the script with "gatherMetadata=true" in the context.
-
-              [[ii]]  Retrieve the mojo descriptor from the resulting "metadata"
-                      variable in the context.
-
-              [[iii]] Cache the mojo descriptor in aggregator for subsequent
-                      output to plugin descriptor file.
-
-        [[c]] Copy all scripts to the target directory. Preserve relative paths.
-
-        [[d]] <<Process Disjoint:>> <Allow other mojo-descriptor collectors to
-              run, aggregating their descriptors in similar fashion to [b.iii]
-              above.>
-
-        [[e]] Use the project's dependencies and other info to form the plugin
-              descriptor's header (non-mojo-specific info).
-
-        [[f]] Use the PluginGenerator from maven-plugin-tools to generate a
-              META-INF/plexus/plugin.xml to the target directory.
-
-        [[g]] Continue with lifecycle.
-
-              This may include compilation of java helper classes, etc. and
-              plugin-artifact packaging, presumably via 'jar:jar' or similar.
-
-  [[3]] <<Marmalade mojo loader.>>
-
-        The marmalade mojo loader will:
-
-        [[a]] Retrieve the implementation spec (this is the path of the script,
-              relative to the root of the plugin filesystem...jar, etc.) to
-              $path.
-
-        [[b]] Use the context classloader to retrieve a reader to $path.
-
-        [[c]] Build the ScriptBuilder corresponding to the script.
-
-        [[d]] Create a new MarmaladeMojo instance which adapts the mojo calling
-              semantics to the creation/execution of a marmalade script.
-
-              Execution involves:
-
-              [[i]]   Creating a new MarmaladeScript instance.
-
-              [[ii]]  Creating an execution context which references all I/O
-                      from the main Maven execution thread, and embeds:
-
-                      - #request == MavenExecutionRequest
-
-                      - #response == MavenExecutionResponse
-
-                      - Any globally configured environmental constraints, such
-                        as a global preserve-whitespace setting
-
-              [[iii]] Execution of the script using the execution context.
-
-              [[iv]]  Export of the resulting context, minus any surviving input
-                      variables, to the MavenExecutionResponse's out-params.
-
-*Implementation Issues
-
-  [[1]] How do we make Maven smart enough to switch loader implementations based
-        on some sub-type of maven-plugin?
-
-        This is important, since the default mojo loader will not be smart
-        enough to do the job, and embedding this behavior in that loader is not
-        scalable or extensible enough to accommodate future expansion into the
-        realms of jython, groovy, etc...
-
-        <<UPDATE:07-FEB-2005>>
-
-        We'll plan on using some sort of language specification in the mojo
-        descriptor to determine which mojo loader to use, then we'll populate
-        the PluginLoader/PluginManager with a map of known languages->loaders.
-
-  [[2]] How do we make the plugin:install process smart enough to switch
-        generator implementations based on some sub-type of maven-plugin?
-
-        This is closely related to [1] above.
-
-        <<UPDATE:07-FEB-2005>>
-
-        See update in [3].
-
-  [[3]] Do we want to allow mixed-bag plugin implementations?
-
-        These might include a mix of standard-java and marmalade mojos. It
-        strikes me that many  marmalade-based mojos may use beans/tags that are
-        actually adapter classes for other third-party APIs (why they wouldn't
-        implement everything as java mojos in this cases is beyond me). If they
-        have java source inside the plugin source directory, we should probably
-        compile it and bundle it with the plugin scripts; but what if this source
-        also has mojo annotations? This will have implications for [1] and [2]
-        above.
-
-        <<UPDATE:07-FEB-2005>>
-
-        We will plan on allowing this sort of implementation, and simply start
-        by applying all known generators which have a source directory set in
-        the POM (or later, have a <language/> section, maybe). At any rate,
-        helper classes will be allowed for script-based mojos.


[18/50] maven git commit: added core extensions documentation

Posted by sc...@apache.org.
added core extensions documentation

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

Branch: refs/heads/MNG-5359
Commit: 0b684af45ee85381a06a20cbdddb6b3fa0ff3b46
Parents: 9d432fb
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sat Jun 25 18:58:01 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:04:31 2017 +0100

----------------------------------------------------------------------
 .../main/resources/META-INF/maven/extension.xml |  7 +++--
 maven-core/src/site/apt/core-extensions.apt.vm  | 30 ++++++++++++++++++++
 maven-core/src/site/apt/index.apt               |  2 +-
 maven-core/src/site/site.xml                    |  1 +
 4 files changed, 36 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/0b684af4/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 07e60aa..f9cf07a 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -18,7 +18,7 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-
+<!-- START SNIPPET: core-extension -->
 <extension>
   <exportedPackages>
     <!-- maven-* -->
@@ -161,7 +161,7 @@ under the License.
     <exportedArtifact>org.fusesource.jansi:jansi</exportedArtifact>
 
     <!--
-      | We must also filter out the old or NoClassDefFoundErrors will surface  
+      | We must also filter out the old Aether or NoClassDefFoundErrors will surface  
      -->
     <exportedArtifact>org.sonatype.aether:aether-api</exportedArtifact>
     <exportedArtifact>org.sonatype.aether:aether-spi</exportedArtifact>
@@ -174,4 +174,5 @@ under the License.
       | wagon from their plugin realm. 
      -->
   </exportedArtifacts>
-</extension>
\ No newline at end of file
+</extension>
+<!-- END SNIPPET: core-extension -->

http://git-wip-us.apache.org/repos/asf/maven/blob/0b684af4/maven-core/src/site/apt/core-extensions.apt.vm
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/core-extensions.apt.vm b/maven-core/src/site/apt/core-extensions.apt.vm
new file mode 100644
index 0000000..3d7abca
--- /dev/null
+++ b/maven-core/src/site/apt/core-extensions.apt.vm
@@ -0,0 +1,30 @@
+~~ 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.
+
+ ---
+ Maven Core Extensions Reference
+ ---
+ Herv� Boutemy
+ ---
+ 2016-06-25
+ ---
+
+Maven Core Extensions Reference
+
+  Maven core provides default extensions as defined in <<</META-INF/maven/extension.xml>>>:
+
+%{snippet|id=core-extension|file=${project.basedir}/src/main/resources/META-INF/maven/extension.xml}

http://git-wip-us.apache.org/repos/asf/maven/blob/0b684af4/maven-core/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
index 61d1772..966b57c 100644
--- a/maven-core/src/site/apt/index.apt
+++ b/maven-core/src/site/apt/index.apt
@@ -53,7 +53,7 @@ Maven Core
  ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}), using
  {{{https://codehaus-plexus.github.io/plexus-classworlds/}Plexus Classworlds}},
 
- * {{{./extension.html}extension descriptor}},
+ * {{{./extension.html}extension descriptor}} and {{{./core-extensions.html}core extensions}},
 
  * <<<ExceptionHandler>>> component ({{{./apidocs/org/apache/maven/exception/ExceptionHandler.html}javadoc}}),
  with its <<<DefaultExceptionHandler>>> implementation

http://git-wip-us.apache.org/repos/asf/maven/blob/0b684af4/maven-core/src/site/site.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/site/site.xml b/maven-core/src/site/site.xml
index 2c38d2a..9eb3ad0 100644
--- a/maven-core/src/site/site.xml
+++ b/maven-core/src/site/site.xml
@@ -34,6 +34,7 @@ under the License.
       <item name="Lifecycles" href="lifecycles.html"/>
       <item name="Plugin Bindings to Default Lifecycle" href="default-bindings.html"/>
       <item name="Artifact Handlers" href="artifact-handlers.html"/>
+      <item name="Core Extensions" href="core-extensions.html"/>
     </menu>
 
     <menu ref="parent"/>


[35/50] maven git commit: [MNG-5607] Don't use M2_HOME in mvn shell/command scripts anymore

Posted by sc...@apache.org.
[MNG-5607] Don't use M2_HOME in mvn shell/command scripts anymore

* Variable has been removed and replaced with an internal one which
  cannot be overriden from outside. From now on, it is an
  implementation detail which it should have been from the beginning.
* Cleaned up license header and style of the variable description
  section graciously borrowed from the Tomcat start scripts.


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

Branch: refs/heads/MNG-5359
Commit: 065281c43d7435be204aa963e1f94d1128bb5351
Parents: 4337d18
Author: Michael Osipov <mi...@apache.org>
Authored: Thu Apr 14 22:41:07 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jan 29 16:53:44 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn                        | 94 +++++++++-----------
 apache-maven/src/bin/mvn.cmd                    | 63 +++++--------
 apache-maven/src/bin/mvnDebug                   | 25 ++----
 apache-maven/src/bin/mvnDebug.cmd               | 16 ++--
 apache-maven/src/bin/mvnyjp                     | 23 ++---
 .../java/org/apache/maven/cli/MavenCli.java     |  3 +-
 6 files changed, 90 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/065281c4/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 567e469..3a4dc26 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -1,5 +1,5 @@
 #!/bin/sh
-# ----------------------------------------------------------------------------
+
 # 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
@@ -16,23 +16,16 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# ----------------------------------------------------------------------------
 
-# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
+# -----------------------------------------------------------------------------
+# Apache Maven Startup Script
 #
-# Required ENV vars:
-# ------------------
-#   JAVA_HOME - location of a JDK home dir
+# Environment Variable Prerequisites
 #
-# Optional ENV vars
-# -----------------
-#   M2_HOME - location of maven2's installed home dir
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
-#     e.g. to debug Maven itself, use
-#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#   MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
+#   MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
+# -----------------------------------------------------------------------------
 
 if [ -z "$MAVEN_SKIP_RC" ] ; then
 
@@ -46,12 +39,12 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
 
 fi
 
-# OS specific support.  $var _must_ be set to either true or false.
+# OS specific support. $var _must_ be set to either true or false.
 cygwin=false;
 darwin=false;
-mingw=false
+mingw=false;
 case "`uname`" in
-  CYGWIN*) cygwin=true ;;
+  CYGWIN*) cygwin=true;;
   MINGW*) mingw=true;;
   Darwin*) darwin=true
            #
@@ -94,46 +87,43 @@ if [ -z "$JAVA_HOME" ] ; then
   fi
 fi
 
-if [ -z "$M2_HOME" ] ; then
-  ## resolve links - $0 may be a link to maven's home
-  PRG="$0"
+## resolve links - $0 may be a link to Maven's home
+PRG="$0"
 
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-      PRG="$link"
-    else
-      PRG="`dirname "$PRG"`/$link"
-    fi
-  done
+# need this for relative symlinks
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG="`dirname "$PRG"`/$link"
+  fi
+done
 
-  saveddir=`pwd`
+saveddir=`pwd`
 
-  M2_HOME=`dirname "$PRG"`/..
+MAVEN_HOME=`dirname "$PRG"`/..
 
-  # make it fully qualified
-  M2_HOME=`cd "$M2_HOME" && pwd`
+# make it fully qualified
+MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
 
-  cd "$saveddir"
-  # echo Using m2 at $M2_HOME
-fi
+cd "$saveddir"
 
-# For Cygwin, ensure paths are in UNIX format before anything is touched
+# For Cygwin, ensure paths are in Unix format before anything is touched
 if $cygwin ; then
-  [ -n "$M2_HOME" ] &&
-    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$MAVEN_HOME" ] &&
+    MAVEN_HOME=`cygpath --unix "$MAVEN_HOME"`
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
     CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
 fi
 
-# For Migwn, ensure paths are in UNIX format before anything is touched
+# For MinGW, ensure paths are in Unix format before anything is touched
 if $mingw ; then
-  [ -n "$M2_HOME" ] &&
-    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$MAVEN_HOME" ] &&
+    MAVEN_HOME="`(cd "$MAVEN_HOME"; pwd)`"
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
   # TODO classpath?
@@ -182,13 +172,13 @@ if [ -z "$JAVA_HOME" ] ; then
   echo "Warning: JAVA_HOME environment variable is not set."
 fi
 
-CLASSWORLDS_JAR=`echo "${M2_HOME}"/boot/plexus-classworlds-*.jar`
+CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
 CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
 # For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-  [ -n "$M2_HOME" ] &&
-    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+if $cygwin ; then
+  [ -n "$MAVEN_HOME" ] &&
+    MAVEN_HOME=`cygpath --path --windows "$MAVEN_HOME"`
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
@@ -225,8 +215,8 @@ MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
 MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
 
 # For Cygwin, switch project base directory path to Windows format before
-# executing Maven. Otherwise this will cause Maven not to consider it.
-if $cygwin; then
+# executing Maven otherwise this will cause Maven not to consider it.
+if $cygwin ; then
   [ -n "$MAVEN_PROJECTBASEDIR" ] &&
   MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
 fi
@@ -242,7 +232,7 @@ exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \
   -classpath "${CLASSWORLDS_JAR}" \
-  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
-  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  "-Dclassworlds.conf=${MAVEN_HOME}/bin/m2.conf" \
+  "-Dmaven.home=${MAVEN_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
   "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/ext" \
   ${CLASSWORLDS_LAUNCHER} "$@"

http://git-wip-us.apache.org/repos/asf/maven/blob/065281c4/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 5ad99ae..3f170c3 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -1,4 +1,3 @@
-@REM ----------------------------------------------------------------------------
 @REM Licensed to the Apache Software Foundation (ASF) under one
 @REM or more contributor license agreements.  See the NOTICE file
 @REM distributed with this work for additional information
@@ -15,23 +14,18 @@
 @REM KIND, either express or implied.  See the License for the
 @REM specific language governing permissions and limitations
 @REM under the License.
-@REM ----------------------------------------------------------------------------
 
-@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
+@REM -----------------------------------------------------------------------------
+@REM Apache Maven Startup Script
 @REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
+@REM Environment Variable Prerequisites
 @REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM     e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-@REM ----------------------------------------------------------------------------
+@REM   JAVA_HOME          Must point at your Java Development Kit installation.
+@REM   MAVEN_BATCH_ECHO  (Optional) Set to 'on' to enable the echoing of the batch commands.
+@REM   MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
+@REM   MAVEN_OPTS        (Optional) Java runtime options used when Maven is executed.
+@REM   MAVEN_SKIP_RC     (Optional) Flag to disable loading of mavenrc files.
+@REM -----------------------------------------------------------------------------
 
 @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
 @echo off
@@ -77,34 +71,19 @@ echo.
 goto error
 
 :chkMHome
-if not "%M2_HOME%"=="" goto valMHome
-
-SET "M2_HOME=%~dp0.."
-if not "%M2_HOME%"=="" goto valMHome
-
-echo.
-echo Error: M2_HOME not found in your environment. >&2
-echo Please set the M2_HOME variable in your environment to match the >&2
-echo location of the Maven installation. >&2
-echo.
+set "MAVEN_HOME=%~dp0.."
+if not "%MAVEN_HOME%"=="" goto valMHome
 goto error
 
 :valMHome
 
 :stripMHome
-if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd
-set "M2_HOME=%M2_HOME:~0,-1%"
+if not "_%MAVEN_HOME:~-1%"=="_\" goto checkMCmd
+set "MAVEN_HOME=%MAVEN_HOME:~0,-1%"
 goto stripMHome
 
 :checkMCmd
-if exist "%M2_HOME%\bin\mvn.cmd" goto init
-
-echo.
-echo Error: M2_HOME is set to an invalid directory. >&2
-echo M2_HOME = "%M2_HOME%" >&2
-echo Please set the M2_HOME variable in your environment to match the >&2
-echo location of the Maven installation >&2
-echo.
+if exist "%MAVEN_HOME%\bin\mvn.cmd" goto init
 goto error
 @REM ==== END VALIDATION ====
 
@@ -112,16 +91,16 @@ goto error
 
 set MAVEN_CMD_LINE_ARGS=%*
 
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Find the project basedir, i.e., the directory that contains the folder ".mvn".
 @REM Fallback to current working directory if not found.
 
 set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
 
 set EXEC_DIR=%CD%
 set WDIR=%EXEC_DIR%
 :findBaseDir
-IF EXIST "%WDIR%\.mvn" goto baseDirFound
+if exist "%WDIR%\.mvn" goto baseDirFound
 cd ..
 IF "%WDIR%"=="%CD%" goto baseDirNotFound
 set WDIR=%CD%
@@ -140,7 +119,7 @@ cd "%EXEC_DIR%"
 
 :endDetectBaseDir
 
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+if not exist "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
 
 @setlocal EnableExtensions EnableDelayedExpansion
 for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@@ -148,13 +127,13 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
 
 :endReadAdditionalConfig
 
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
 
-for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
+for %%i in ("%MAVEN_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
 
 set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" "-Dmaven.home=%MAVEN_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
 if ERRORLEVEL 1 goto error
 goto end
 

http://git-wip-us.apache.org/repos/asf/maven/blob/065281c4/apache-maven/src/bin/mvnDebug
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index a1077ce..09f48d9 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -1,5 +1,5 @@
 #!/bin/sh
-# ----------------------------------------------------------------------------
+
 # 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
@@ -16,26 +16,19 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# ----------------------------------------------------------------------------
 
-# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
+# -----------------------------------------------------------------------------
+# Apache Maven Debug Script
 #
-# Required ENV vars:
-# ------------------
-#   JAVA_HOME - location of a JDK home dir
+# Environment Variable Prerequisites
 #
-# Optional ENV vars
-# -----------------
-#   M2_HOME - location of maven2's installed home dir
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
-#     e.g. to debug Maven itself, use
-#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#   MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
+#   MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
+# -----------------------------------------------------------------------------
 
 MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
 
-echo Preparing to Execute Maven in Debug Mode
+echo Preparing to execute Maven in debug mode
 
 env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"

http://git-wip-us.apache.org/repos/asf/maven/blob/065281c4/apache-maven/src/bin/mvnDebug.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnDebug.cmd b/apache-maven/src/bin/mvnDebug.cmd
index 1f0d3bf..5f9a20a 100644
--- a/apache-maven/src/bin/mvnDebug.cmd
+++ b/apache-maven/src/bin/mvnDebug.cmd
@@ -1,4 +1,3 @@
-@REM ----------------------------------------------------------------------------
 @REM Licensed to the Apache Software Foundation (ASF) under one
 @REM or more contributor license agreements.  See the NOTICE file
 @REM distributed with this work for additional information
@@ -15,15 +14,18 @@
 @REM KIND, either express or implied.  See the License for the
 @REM specific language governing permissions and limitations
 @REM under the License.
-@REM ----------------------------------------------------------------------------
 
-@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script to run mvn.cmd with the following additional
-@REM Java VM settings:
+@REM -----------------------------------------------------------------------------
+@REM Apache Maven Debug Script
 @REM
-@REM     -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM Environment Variable Prerequisites
 @REM
-@REM ----------------------------------------------------------------------------
+@REM   JAVA_HOME          Must point at your Java Development Kit installation.
+@REM   MAVEN_BATCH_ECHO  (Optional) Set to 'on' to enable the echoing of the batch commands.
+@REM   MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
+@REM   MAVEN_OPTS        (Optional) Java runtime options used when Maven is executed.
+@REM   MAVEN_SKIP_RC     (Optional) Flag to disable loading of mavenrc files.
+@REM -----------------------------------------------------------------------------
 
 @setlocal
 @set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

http://git-wip-us.apache.org/repos/asf/maven/blob/065281c4/apache-maven/src/bin/mvnyjp
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index ef4f8e1..e08f77e 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -1,5 +1,5 @@
 #!/bin/sh
-# ----------------------------------------------------------------------------
+
 # 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
@@ -16,23 +16,16 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# ----------------------------------------------------------------------------
 
-# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
+# -----------------------------------------------------------------------------
+# Apache Maven YourKit Profiler Startup Script
 #
-# Required ENV vars:
-# ------------------
-#   JAVA_HOME - location of a JDK home dir
+# Environment Variable Prerequisites
 #
-# Optional ENV vars
-# -----------------
-#   M2_HOME - location of maven2's installed home dir
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
-#     e.g. to debug Maven itself, use
-#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#   MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
+#   MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
+# -----------------------------------------------------------------------------
 
 if [ ! -f "$YJPLIB" ]; then
   echo "Error: Unable to autodetect the YJP library location. Please set YJPLIB variable" >&2

http://git-wip-us.apache.org/repos/asf/maven/blob/065281c4/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 c0b0dcf..633d533 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
@@ -346,8 +346,7 @@ public class MavenCli
             if ( basedirProperty == null )
             {
                 System.err.format(
-                    "-D%s system property is not set." + " Check $M2_HOME environment variable and mvn script match.",
-                    MULTIMODULE_PROJECT_DIRECTORY );
+                    "-D%s system property is not set.", MULTIMODULE_PROJECT_DIRECTORY );
                 throw new ExitException( 1 );
             }
             File basedir = basedirProperty != null ? new File( basedirProperty ) : new File( "" );


[45/50] maven git commit: [MNG-5852] mvn shell script invokes /bin/sh but requires Bash functions

Posted by sc...@apache.org.
[MNG-5852] mvn shell script invokes /bin/sh but requires Bash functions

'local' is not POSIX, but supported by most shells. However, it's not
supported by Solaris's /bin/sh, so use a subshell instead.

This closes #50.


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

Branch: refs/heads/MNG-5359
Commit: 135102022763eaa62fa1d0125adab7ff207ef2f4
Parents: 1d9708a
Author: Joseph Walton <jo...@kafsemo.org>
Authored: Mon Jan 30 11:13:16 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 12:56:36 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/13510202/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 4a7f610..172f43b 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -190,8 +190,7 @@ fi
 # traverses directory structure from process work directory to filesystem root
 # first directory with .mvn subdirectory is considered project base directory
 find_maven_basedir() {
-  local basedir
-  local wdir
+(
   basedir="`pwd`"
   wdir="`pwd`"
   while [ "$wdir" != '/' ] ; do
@@ -202,6 +201,7 @@ find_maven_basedir() {
     wdir="`cd "$wdir/.."; pwd`"
   done
   echo "${basedir}"
+)
 }
 
 # concatenates all lines of a file


[23/50] maven git commit: added core its to projects' sources

Posted by sc...@apache.org.
added core its to projects' sources


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

Branch: refs/heads/MNG-5359
Commit: 311fc62b7daca1d63596e2202598a0fd3e4d77e2
Parents: 4547ff7
Author: Herv� Boutemy <hb...@apache.org>
Authored: Wed Nov 16 14:41:06 2016 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Wed Jan 25 00:09:42 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/311fc62b/doap_Maven.rdf
----------------------------------------------------------------------
diff --git a/doap_Maven.rdf b/doap_Maven.rdf
index a50b68f..9a043ce 100644
--- a/doap_Maven.rdf
+++ b/doap_Maven.rdf
@@ -190,6 +190,12 @@ under the License.
         <browse rdf:resource="https://git-wip-us.apache.org/repos/asf/maven.git"/>
       </GitRepository>
     </repository>
+    <repository>
+      <GitRepository>
+        <location rdf:resource="https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git"/>
+        <browse rdf:resource="https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git"/>
+      </GitRepository>
+    </repository>
     <maintainer>
       <foaf:Person>
         <foaf:name>Apache Maven PMC</foaf:name>


[48/50] maven git commit: [MNG-6001] Replace %HOME% with %USERPROFILE% in mvn.cmd

Posted by sc...@apache.org.
[MNG-6001] Replace %HOME% with %USERPROFILE% in mvn.cmd


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

Branch: refs/heads/MNG-5359
Commit: d426bf9c6e59f893499c623c3434ce8f61200d9f
Parents: 1bc69ff
Author: Michael Osipov <mi...@apache.org>
Authored: Fri Apr 15 13:06:24 2016 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 13:23:07 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn.cmd | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/d426bf9c/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 0c2fd4b..aab3085 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -32,14 +32,11 @@
 @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
 @if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
 
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-
 @REM Execute a user defined script before this one
 if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
 @REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat"
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd"
 :skipRcPre
 
 @setlocal
@@ -143,8 +140,8 @@ set ERROR_CODE=1
 
 if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
 @REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
 :skipRcPost
 
 @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'


[47/50] maven git commit: [MNG-5963] mvn.cmd does not return ERROR_CODE

Posted by sc...@apache.org.
[MNG-5963] mvn.cmd does not return ERROR_CODE


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

Branch: refs/heads/MNG-5359
Commit: 1bc69ff93eb8bde73bf4b9872b78eb6f6be4865d
Parents: 842b07b
Author: Michael Osipov <mi...@apache.org>
Authored: Wed Feb 3 23:13:55 2016 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 13:14:16 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/maven/blob/1bc69ff9/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 467269a..0c2fd4b 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -46,9 +46,6 @@ if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
 
 set ERROR_CODE=0
 
-@REM To isolate internal variables from possible post scripts, we use another setlocal
-@setlocal
-
 @REM ==== START VALIDATION ====
 if not "%JAVA_HOME%" == "" goto OkJHome