GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MDEPLOY-311] Regression in 3.0.0: deploy-file: -Dpackaging is not considered during artifact upload · Issue #576 · apache/maven-deploy-plugin

[MDEPLOY-311] Regression in 3.0.0: deploy-file: -Dpackaging is not considered during artifact upload #576

New issue
Copy link
New issue
Copy link
Closed
Closed
[MDEPLOY-311] Regression in 3.0.0: deploy-file: -Dpackaging is not considered during artifact upload#576
Copy link
Assignees
cstamas
Labels
bugSomething isn't workingpriority:majorMajor loss of function
Milestone
3.1.3

Description

@jira-importer
jira-importer
opened on Jul 3, 2023
Issue body actions

Sebastian Ratz opened MDEPLOY-311 and commented

Regression in #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)


Affects: 3.0.0, 3.1.0, 3.1.1

Issue Links:

  • MDEPLOY-297 [REGRESSION] deploy-file no longer honor 'packaging' parameter
    ("fixes")
  • MDEPLOY-321 -Dpackaging= is ignored when using mvn deploy:deploy-file
    ("fixes")

Remote Links:

  • GitHub Pull Request #42
  • GitHub Pull Request #71

1 votes, 3 watchers

Activity

  1. jira-importer
    closed this as completedon Aug 15, 2024
  2. jira-importer
    assigned
    cstamas
    on Apr 2, 2025
  3. radoslawrolka
    added a commit that references this issue on Apr 30, 2026

    lock the mvn cli version used in publisher (#327)

    35e4619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @cstamas
    cstamas

Labels

bugSomething isn't workingpriority:majorMajor loss of function

Type

No type

Projects

No projects

    Milestone

    • 3.1.3

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.