You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/07/03 10:00:00 UTC
[jira] [Commented] (MDEPLOY-311) Regression in 3.0.0: deploy-file: -Dpackaging is not considered during artifact upload
[ https://issues.apache.org/jira/browse/MDEPLOY-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739563#comment-17739563 ]
ASF GitHub Bot commented on MDEPLOY-311:
----------------------------------------
sratz opened a new pull request, #42:
URL: https://github.com/apache/maven-deploy-plugin/pull/42
Fixes a regression introduced in
16541da43c51237cf7183c4500a576108ad946b8 [MDEPLOY-296] which caused the `-Dpackaging` property to be ignored when uploading the artifact. Instead, the packaging type during upload was always derived from the file name.
---
Following this checklist to help us incorporate your
contribution quickly and easily:
- [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MDEPLOY) filed
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
- [X] Each commit in the pull request should have a meaningful subject line and body.
- [X] Format the pull request title like `[MDEPLOY-XXX] - Fixes bug in ApproximateQuantiles`,
where you replace `MDEPLOY-XXX` with the appropriate JIRA issue. Best practice
is to use the JIRA issue title in the pull request title and in the first line of the
commit message.
- [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
be performed on your pull request automatically.
- [X] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
> Regression in 3.0.0: deploy-file: -Dpackaging is not considered during artifact upload
> --------------------------------------------------------------------------------------
>
> Key: MDEPLOY-311
> URL: https://issues.apache.org/jira/browse/MDEPLOY-311
> Project: Maven Deploy Plugin
> Issue Type: Bug
> Components: deploy:deploy-file
> Affects Versions: 3.0.0, 3.1.0, 3.1.1
> Reporter: Sebastian Ratz
> Priority: Major
>
> Regression in [https://github.com/apache/maven-deploy-plugin/pull/26]
>
> Property passed via {{-Dpackaging}} is not considered anymore during upload. Instead, packaging is always derived from the file name.
>
> To reproduce:
>
> {{$ mvn -Dfile=foo.zip -DgroupId=com.bar -Dclassifier=baz -DrepositoryId=deploy.snapshots -DartifactId=foo -D{*}packaging=alterantivepackaging{*} -Dversion=1.0.0-SNAPSHOT deploy:{*}3.0.0-M2{*}:deploy-file -Durl=file:./repo}}
> {{...}}
> {{Uploading to deploy.snapshots: file:./repo/com/bar/foo/1.0.0-SNAPSHOT/foo-1.0.0-20230703.093021-2-baz{*}.alterantivepackaging{*}}}
> {{...}}
>
> {{$ mvn -Dfile=foo.zip -DgroupId=com.bar -Dclassifier=baz -DrepositoryId=deploy.snapshots -DartifactId=foo -Dpackaging=alterantivepackaging -Dversion=1.0.0-SNAPSHOT deploy:{*}3.0.0{*}:deploy-file -Durl=file:./repo}}
> {{...}}
> {{Uploading to deploy.snapshots: file:./repo/com/bar/foo/1.0.0-SNAPSHOT/foo-1.0.0-20230703.093125-3-baz.zip}}
> {{...}}
>
> The problematic line is
> [https://github.com/apache/maven-deploy-plugin/blob/707ab61615606053eb816e7c96d1fc276a80a47f/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java#L278C58-L278C96]
> Here,
> {{packaging}}
> should be used instead of
> {{isFilePom ? "pom" : getExtension(file)}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)