[1/2] maven git commit: [MNG-6258] Upgrade to Maven Resolver 1.1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1/2] maven git commit: [MNG-6258] Upgrade to Maven Resolver 1.1.0

Michael Osipov-2
Repository: maven
Updated Branches:
  refs/heads/master a1fe42199 -> b10025751


[MNG-6258] Upgrade to Maven Resolver 1.1.0


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

Branch: refs/heads/master
Commit: e520324c8d45e2465cf8aeafb4d57cef30250136
Parents: a1fe421
Author: Michael Osipov <[hidden email]>
Authored: Wed Jul 12 19:50:09 2017 +0200
Committer: Michael Osipov <[hidden email]>
Committed: Wed Jul 12 19:50:09 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/maven/blob/e520324c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d6f165c..78c375f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@ under the License.
     <cipherVersion>1.7</cipherVersion>
     <modelloVersion>1.9.1</modelloVersion>
     <jxpathVersion>1.3</jxpathVersion>
-    <resolverVersion>1.0.3</resolverVersion>
+    <resolverVersion>1.1.0</resolverVersion>
     <slf4jVersion>1.7.22</slf4jVersion>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
     <!-- Control the name of the distribution and information output by mvn -->

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[2/2] maven git commit: [MNG-5457] Show repository id when downloading or uploading from/to a remote repository

Michael Osipov-2
[MNG-5457] Show repository id when downloading or uploading from/to a remote repository


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

Branch: refs/heads/master
Commit: b1002575177abd1108fe50f457cceb9c7c3cf7d8
Parents: e520324
Author: Michael Osipov <[hidden email]>
Authored: Fri Jul 15 23:26:56 2016 +0200
Committer: Michael Osipov <[hidden email]>
Committed: Wed Jul 12 20:10:47 2017 +0200

----------------------------------------------------------------------
 .../transfer/AbstractMavenTransferListener.java | 31 +++++++++++++-------
 .../transfer/Slf4jMavenTransferListener.java    | 31 +++++++++++++-------
 2 files changed, 42 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b1002575/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 21822be..2b13879 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
@@ -217,9 +217,15 @@ public abstract class AbstractMavenTransferListener
     public void transferInitiated( TransferEvent event )
     {
         String action = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
+        String direction = event.getRequestType() == TransferEvent.RequestType.PUT ? "to" : "from";
 
         TransferResource resource = event.getResource();
-        out.println( action + ": " + resource.getRepositoryUrl() + resource.getResourceName() );
+        StringBuilder message = new StringBuilder();
+        message.append( action ).append( ' ' ).append( direction ).append( ' ' ).append( resource.getRepositoryId() );
+        message.append( ": " );
+        message.append( resource.getRepositoryUrl() ).append( resource.getResourceName() );
+
+        out.println( message.toString() );
     }
 
     @Override
@@ -228,30 +234,35 @@ public abstract class AbstractMavenTransferListener
     {
         TransferResource resource = event.getResource();
         // TODO This needs to be colorized
-        out.println( "[WARNING] " + event.getException().getMessage() + " for " + resource.getRepositoryUrl()
-            + resource.getResourceName() );
+        out.println( "[WARNING] " + event.getException().getMessage() + " from " + resource.getRepositoryId() + " for "
+            + resource.getRepositoryUrl() + resource.getResourceName() );
     }
 
     @Override
     public void transferSucceeded( TransferEvent event )
     {
+        String action = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
+        String direction = event.getRequestType() == TransferEvent.RequestType.PUT ? "to" : "from";
+
         TransferResource resource = event.getResource();
         long contentLength = event.getTransferredBytes();
-
         FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
-        String result = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
-        String len = format.format( contentLength );
 
-        String throughput = "";
+        StringBuilder message = new StringBuilder();
+        message.append( action ).append( ' ' ).append( direction ).append( ' ' ).append( resource.getRepositoryId() );
+        message.append( ": " );
+        message.append( resource.getRepositoryUrl() ).append( resource.getResourceName() );
+        message.append( " (" ).append( format.format( contentLength ) );
+
         long duration = System.currentTimeMillis() - resource.getTransferStartTime();
         if ( duration > 0L )
         {
             double bytesPerSecond = contentLength / ( duration / 1000.0 );
-            throughput = " at " + format.format( (long) bytesPerSecond ) + "/s";
+            message.append( " at " ).append( format.format( (long) bytesPerSecond ) ).append( "/s" );
         }
 
-        out.println( result + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
-            + throughput + ")" );
+        message.append( ')' );
+        out.println( message.toString() );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/b1002575/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 ac5333e..5c97acb 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
@@ -50,9 +50,15 @@ public class Slf4jMavenTransferListener
     public void transferInitiated( TransferEvent event )
     {
         String action = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
+        String direction = event.getRequestType() == TransferEvent.RequestType.PUT ? "to" : "from";
 
         TransferResource resource = event.getResource();
-        out.info( action + ": " + resource.getRepositoryUrl() + resource.getResourceName() );
+        StringBuilder message = new StringBuilder();
+        message.append( action ).append( ' ' ).append( direction ).append( ' ' ).append( resource.getRepositoryId() );
+        message.append( ": " );
+        message.append( resource.getRepositoryUrl() ).append( resource.getResourceName() );
+
+        out.info( message.toString() );
     }
 
     @Override
@@ -60,30 +66,35 @@ public class Slf4jMavenTransferListener
         throws TransferCancelledException
     {
         TransferResource resource = event.getResource();
-        out.warn( event.getException().getMessage() + " for " + resource.getRepositoryUrl()
-            + resource.getResourceName() );
+        out.warn( event.getException().getMessage() + " from " + resource.getRepositoryId() + " for "
+            + resource.getRepositoryUrl() + resource.getResourceName() );
     }
 
     @Override
     public void transferSucceeded( TransferEvent event )
     {
+        String action = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
+        String direction = event.getRequestType() == TransferEvent.RequestType.PUT ? "to" : "from";
+
         TransferResource resource = event.getResource();
         long contentLength = event.getTransferredBytes();
-
         FileSizeFormat format = new FileSizeFormat( Locale.ENGLISH );
-        String result = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" );
-        String len = format.format( contentLength );
 
-        String throughput = "";
+        StringBuilder message = new StringBuilder();
+        message.append( action ).append( ' ' ).append( direction ).append( ' ' ).append( resource.getRepositoryId() );
+        message.append( ": " );
+        message.append( resource.getRepositoryUrl() ).append( resource.getResourceName() );
+        message.append( " (" ).append( format.format( contentLength ) );
+
         long duration = System.currentTimeMillis() - resource.getTransferStartTime();
         if ( duration > 0L )
         {
             double bytesPerSecond = contentLength / ( duration / 1000.0 );
-            throughput = " at " + format.format( (long) bytesPerSecond ) + "/s";
+            message.append( " at " ).append( format.format( (long) bytesPerSecond ) ).append( "/s" );
         }
 
-        out.info( result + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len
-            + throughput + ")" );
+        message.append( ')' );
+        out.info( message.toString() );
     }
 
 }

Loading...