sratz commented on code in PR #42:
URL:
https://github.com/apache/maven-deploy-plugin/pull/42#discussion_r1314925033
##
src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java:
##
@@ -274,9 +274,7 @@ public void execute() throws MojoExecutionException,
MojoFailureException {
classifier = artifactType.getClassifier();
}
}
-Artifact mainArtifact = new DefaultArtifact(
-groupId, artifactId, classifier, isFilePom ? "pom" :
getExtension(file), version)
-.setFile(file);
+Artifact mainArtifact = new DefaultArtifact(groupId, artifactId,
classifier, packaging, version).setFile(file);
Review Comment:
> Please look at java doc:
https://maven.apache.org/resolver/apidocs/org/eclipse/aether/artifact/DefaultArtifact.html#%3Cinit%3E(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
>
> fourth parameter is a file extension not packaging
But for some reason, before 16541da43c51237cf7183c4500a576108ad946b8,
packaging _was_ used as the file extension. Are you saying that was never
intended and was a bug?
If so, is there any way to get the old behavior back in maven-deploy-plugin
3.0?
`artifactType.getExtension()` won't solve the problem, as this is only
working known `packaging`s. It does not cover the case
`-Dpackaging=completelarbitrary` where no `artifactType` is known.
I have uploaded an alternative proposal: If we have an `artifactType` use
its extension, otherwise fall back to `packaging` for unknown types.
--
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.
To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org