maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r832729 - in /maven/maven-3/trunk: maven-core/src/main/java/org/apache/maven/exception/ maven-core/src/main/java/org/apache/maven/project/ maven-embedder/src/main/java/org/apache/maven/cli/
Date Wed, 04 Nov 2009 12:51:58 GMT
Author: bentmann
Date: Wed Nov  4 12:51:58 2009
New Revision: 832729

URL: http://svn.apache.org/viewvc?rev=832729&view=rev
Log:
[MNG-4426] No javac errors in console when error stacktraces are turned on

Modified:
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
    maven/maven-3/trunk/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java?rev=832729&r1=832728&r2=832729&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
Wed Nov  4 12:51:58 2009
@@ -212,9 +212,9 @@
                     {
                         exceptionMessage = longMessage;
                     }
-                    else
+                    else if ( !exceptionMessage.contains( longMessage ) )
                     {
-                        exceptionMessage = join( exceptionMessage, longMessage );
+                        exceptionMessage = join( exceptionMessage, '\n' + longMessage );
                     }
                 }
             }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java?rev=832729&r1=832728&r2=832729&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
Wed Nov  4 12:51:58 2009
@@ -235,7 +235,6 @@
         this.repositorySystem = repositorySystem;
     }
 
-    //TODO: need to integrate the effective scope and refactor it out of the MMS
     @Deprecated
     public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, String inheritedScope,
ArtifactFilter filter )
         throws InvalidDependencyVersionException

Modified: maven/maven-3/trunk/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java?rev=832729&r1=832728&r2=832729&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java (original)
+++ maven/maven-3/trunk/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java Wed
Nov  4 12:51:58 2009
@@ -481,18 +481,32 @@
             referenceKey = references.get( summary.getReference() );
             if ( referenceKey == null )
             {
-                referenceKey = "[" + references.size() + "]";
+                referenceKey = "[Help " + ( references.size() + 1 ) + "]";
                 references.put( summary.getReference(), referenceKey );
             }
         }
 
+        String msg = indent + summary.getMessage();
+
+        if ( StringUtils.isNotEmpty( referenceKey ) )
+        {
+            if ( msg.indexOf( '\n' ) < 0 )
+            {
+                msg += " -> " + referenceKey;
+            }
+            else
+            {
+                msg += '\n' + indent + "-> " + referenceKey;
+            }
+        }
+
         if ( showErrors )
         {
-            logger.error( indent + referenceKey, summary.getException() );
+            logger.error( msg, summary.getException() );
         }
         else
         {
-            logger.error( indent + summary.getMessage() + " " + referenceKey );
+            logger.error( msg );
         }
 
         indent += "  ";



Mime
View raw message