michael-o commented on a change in pull request #423:
URL: https://github.com/apache/maven/pull/423#discussion_r550349032
##########
File path:
maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java
##########
@@ -108,15 +109,20 @@ public MavenExecutionPlan resolveBuildPlan( MavenSession
session, MavenProject p
// With Maven 4's build/consumer the POM will always rewrite during
distribution.
// The maven-gpg-plugin uses the original POM, causing an invalid
signature.
// Fail as long as there's no solution available yet
- Optional<MojoExecution> gpgMojo =
executionPlan.getMojoExecutions().stream()
- .filter( m -> "maven-gpg-plugin".equals( m.getArtifactId() )
- && "org.apache.maven.plugins".equals(
m.getGroupId() ) )
- .findAny();
-
- if ( gpgMojo.isPresent() )
+ if ( Features.buildConsumer().isActive() )
{
- throw new LifecycleExecutionException( "The maven-gpg-plugin is
not supported by Maven 4."
- + " Verify if there is a compatible signing solution or use
Maven 3" );
+ Optional<MojoExecution> gpgMojo =
executionPlan.getMojoExecutions().stream()
+ .filter( m -> "maven-gpg-plugin".equals(
m.getArtifactId() )
+ && "org.apache.maven.plugins".equals(
m.getGroupId() ) )
+ .findAny();
+
+ if ( gpgMojo.isPresent() )
+ {
+ throw new LifecycleExecutionException( "The maven-gpg-plugin
is not supported by Maven 4."
+ + " Verify if there is a compatible signing solution"
+ + " or add -D" + Features.buildConsumer().propertyName() +
"=false"
+ + " or use Maven 3" );
Review comment:
Sentence ends here. Add a full stop.
##########
File path:
maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java
##########
@@ -108,15 +109,20 @@ public MavenExecutionPlan resolveBuildPlan( MavenSession
session, MavenProject p
// With Maven 4's build/consumer the POM will always rewrite during
distribution.
// The maven-gpg-plugin uses the original POM, causing an invalid
signature.
// Fail as long as there's no solution available yet
- Optional<MojoExecution> gpgMojo =
executionPlan.getMojoExecutions().stream()
- .filter( m -> "maven-gpg-plugin".equals( m.getArtifactId() )
- && "org.apache.maven.plugins".equals(
m.getGroupId() ) )
- .findAny();
-
- if ( gpgMojo.isPresent() )
+ if ( Features.buildConsumer().isActive() )
{
- throw new LifecycleExecutionException( "The maven-gpg-plugin is
not supported by Maven 4."
- + " Verify if there is a compatible signing solution or use
Maven 3" );
+ Optional<MojoExecution> gpgMojo =
executionPlan.getMojoExecutions().stream()
+ .filter( m -> "maven-gpg-plugin".equals(
m.getArtifactId() )
+ && "org.apache.maven.plugins".equals(
m.getGroupId() ) )
+ .findAny();
+
+ if ( gpgMojo.isPresent() )
+ {
+ throw new LifecycleExecutionException( "The maven-gpg-plugin
is not supported by Maven 4."
+ + " Verify if there is a compatible signing solution"
+ + " or add -D" + Features.buildConsumer().propertyName() +
"=false"
Review comment:
the first "or" should be replaced with a comma.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]