You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/12/12 20:07:58 UTC

[GitHub] jsoref closed pull request #47: [MENFORCER-323] - Improve output of "Some plugins are missing valid versions" error

jsoref closed pull request #47: [MENFORCER-323] - Improve output of "Some plugins are missing valid versions" error
URL: https://github.com/apache/maven-enforcer/pull/47
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
index f3df358..b63af6e 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
@@ -265,7 +265,7 @@ public void execute( EnforcerRuleHelper helper )
                 newMsg.append( "Some plugins are missing valid versions:" );
                 if ( banLatest || banRelease || banSnapshots || banTimestamps )
                 {
-                    newMsg.append( "(" );
+                    newMsg.append( " (" );
                     if ( banLatest )
                     {
                         newMsg.append( "LATEST " );
@@ -278,8 +278,9 @@ public void execute( EnforcerRuleHelper helper )
                     {
                         newMsg.append( "SNAPSHOT " );
                     }
-                    newMsg.append( "are not allowed )\n" );
+                    newMsg.append( "are not allowed)" );
                 }
+                newMsg.append( "\n" );
                 for ( Plugin plugin : failures )
                 {
                     newMsg.append( plugin.getGroupId() );
@@ -1262,4 +1263,4 @@ public final void setAdditionalPlugins( List<String> additionalPlugins )
     {
         return additionalPlugins;
     }
-}
\ No newline at end of file
+}
diff --git a/maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/verify.groovy b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/verify.groovy
index 865bfeb..d098917 100644
--- a/maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/verify.groovy
+++ b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/verify.groovy
@@ -18,4 +18,4 @@
  */
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.text.contains( '[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:' )
-assert buildLog.text.contains( 'Some plugins are missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed )' )
+assert buildLog.text.contains( 'Some plugins are missing valid versions: (LATEST RELEASE SNAPSHOT are not allowed)' )


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services