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 2020/12/11 19:08:14 UTC

[GitHub] [maven-deploy-plugin] cstamas commented on a change in pull request #12: [MDEPLOY-279] Better validation for alt deploy repository mojo parameter

cstamas commented on a change in pull request #12:
URL: https://github.com/apache/maven-deploy-plugin/pull/12#discussion_r541172518



##########
File path: src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
##########
@@ -248,19 +249,40 @@ else if ( !ArtifactUtils.isSnapshot( project.getVersion() ) && altReleaseDeploym
         {
             getLog().info( "Using alternate deployment repository " + altDeploymentRepo );
 
-            Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher( altDeploymentRepo );
+            Matcher matcher = ALT_LEGACY_REPO_SYNTAX_PATTERN.matcher( altDeploymentRepo );
 
-            if ( !matcher.matches() )
+            if ( matcher.matches() )
             {
-                throw new MojoFailureException( altDeploymentRepo, "Invalid syntax for repository.",
-                                                "Invalid syntax for alternative repository. Use \"id::url\"." );
+                getLog().warn( "Legacy form of alternate deployment parameter used, update parameter to match plugin version." );

Review comment:
       Idea: Maybe move this log below, and use `id` and `url` to show end user to what it should update. And not show this very same warn if legacy layout is NOT `"default"` but fail Mojo with exception...




----------------------------------------------------------------
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:
users@infra.apache.org