You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/09/24 04:56:22 UTC

[maven] branch MNG-6391 updated (26cf168 -> ff79d6e)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch MNG-6391
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 26cf168  [MNG-6391] - Printout version of last built module in reactor build
     add 8bc3c20  [MNG-6311] Implement class-level ModelCache in DefaultProjectBuilder to solve slow pom resolutions
     add 10388b3  [MNG-6478] upgraded parent to 33 for sha512 checksum on release
     add ce6cc5d  [MNG-6414] Add more Apache license header patterns to skip downloading Apache license
     add 2e8e09f  [MNG-5951] add an option to avoid path addition to inherited URLs
     add 532eb24  [MNG-6358] indented code for better understanding
     add ed8bc6b  [MNG-6358] improved licenses sources for inclusion
     add 91fa89e  [MNG-6479] Upgrade XMLUnit to 2.2.1 (#183)
     add c3dfa0f  [MNG-6480] get non-Apache license from local resource
     add 421164e  Excluded the license files cause they do not contain a license of themselfs.
     new ff79d6e  [MNG-6391] - Printout version of last built module in reactor build

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (26cf168)
            \
             N -- N -- N   refs/heads/MNG-6391 (ff79d6e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 apache-maven/pom.xml                               |  27 ++
 .../main/appended-resources/META-INF/LICENSE.vm    |  63 ++--
 .../main/appended-resources/licenses/CDDL-1.0.txt  | 384 +++++++++++++++++++++
 .../main/appended-resources/licenses/EPL-1.0.txt   | 210 +++++++++++
 .../src/main/appended-resources/licenses/MIT.txt   |  14 +
 .../maven/project/DefaultProjectBuilder.java       |  21 +-
 .../apache/maven/project/ReactorModelCache.java    |   8 +-
 maven-model-builder/pom.xml                        |  10 +-
 .../inheritance/DefaultInheritanceAssembler.java   |   5 +-
 .../apache/maven/model/merge/MavenModelMerger.java |  12 +-
 .../DefaultInheritanceAssemblerTest.java           |  76 ++--
 ...lat-urls-child.xml => no-append-urls-child.xml} |   0
 ...urls-parent.xml => no-append-urls-expected.xml} |  21 +-
 ...t-urls-parent.xml => no-append-urls-parent.xml} |  11 +-
 .../inheritance/plugin-configuration-expected.xml  |   2 +-
 maven-model/src/main/mdo/maven.mdo                 | 100 +++++-
 pom.xml                                            |  20 +-
 17 files changed, 880 insertions(+), 104 deletions(-)
 create mode 100644 apache-maven/src/main/appended-resources/licenses/CDDL-1.0.txt
 create mode 100644 apache-maven/src/main/appended-resources/licenses/EPL-1.0.txt
 create mode 100644 apache-maven/src/main/appended-resources/licenses/MIT.txt
 copy maven-model-builder/src/test/resources/poms/inheritance/{flat-urls-child.xml => no-append-urls-child.xml} (100%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{tricky-flat-artifactId-urls-parent.xml => no-append-urls-expected.xml} (78%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{flat-urls-parent.xml => no-append-urls-parent.xml} (81%)


[maven] 01/01: [MNG-6391] - Printout version of last built module in reactor build

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MNG-6391
in repository https://gitbox.apache.org/repos/asf/maven.git

commit ff79d6e0c73caba31fdfd57718dfdda3932248b0
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Wed Apr 11 19:42:38 2018 +0200

    [MNG-6391] - Printout version of last built module in reactor build
---
 .../maven/cli/event/ExecutionEventLogger.java      | 37 ++++++++++++++++++----
 1 file changed, 31 insertions(+), 6 deletions(-)

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 00c9164..c96cda9 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
@@ -141,19 +141,45 @@ public class ExecutionEventLogger
         }
     }
 
+    private boolean isSingleVersionedReactor( MavenSession session )
+    {
+        boolean result = true;
+
+        MavenProject topProject = session.getTopLevelProject();
+        List<MavenProject> sortedProjects = session.getProjectDependencyGraph().getSortedProjects();
+        for ( MavenProject mavenProject : sortedProjects )
+        {
+            if ( !topProject.getVersion().equals( mavenProject.getVersion() ) )
+            {
+                result = false;
+                break;
+            }
+        }
+
+        return result;
+    }
+
     private void logReactorSummary( MavenSession session )
     {
+        boolean isSingleVersion = isSingleVersionedReactor( session );
+
         infoLine( '-' );
 
-        infoMain( "Reactor Summary:" );
+        StringBuilder summary = new StringBuilder( "Reactor Summary" );
+        if ( isSingleVersion )
+        {
+            summary.append( " (" );
+            summary.append( session.getTopLevelProject().getVersion() );
+            summary.append( ")" );
+        }
+        summary.append( ":" );
+        infoMain( summary.toString() );
 
         logger.info( "" );
 
         MavenExecutionResult result = session.getResult();
 
         List<MavenProject> projects = session.getProjects();
-        MavenProject lastProject = projects.get( projects.size() - 1 );
-        MavenProject topProject = session.getTopLevelProject();
 
         for ( MavenProject project : projects )
         {
@@ -162,8 +188,7 @@ public class ExecutionEventLogger
             buffer.append( project.getName() );
             buffer.append( ' ' );
 
-            if ( topProject.equals( project ) || lastProject.equals( project )
-                || !topProject.getVersion().equals( project.getVersion() ) )
+            if ( !isSingleVersion )
             {
                 buffer.append( project.getVersion() );
                 buffer.append( ' ' );
@@ -241,7 +266,7 @@ public class ExecutionEventLogger
 
         String wallClock = session.getRequest().getDegreeOfConcurrency() > 1 ? " (Wall Clock)" : "";
 
-        logger.info( "Total time: " + formatDuration( time ) + wallClock );
+        logger.info( "Total time:  " + formatDuration( time ) + wallClock );
 
         logger.info( "Finished at: " + formatTimestamp( finish ) );
     }