slachiewicz opened a new pull request, #753: URL: https://github.com/apache/maven-deploy-plugin/pull/753
On a pom-packaged project, `jar:jar deploy` uploads the JAR under the `.pom` name, because `processProject` swaps in `project.getArtifact()`'s file when it has the POM's coordinates. This drops that swap, so the POM always comes from `new ProjectArtifact(project)`, that is `project.getFile()`, as it did up to 3.1.1. The swap arrived with MDEPLOY-313 in 3.1.2. Removing it is the same change as apache/maven-install-plugin#457, so install and deploy agree again. It also covers any other packaging plugin (ear, ejb, shade, assembly) that sets the main artifact file on a pom project. #203 reported this symptom and was closed in favour of the core-side guard MNG-8138. Until that guard exists, deploy publishes a `.pom` that is a ZIP and breaks every consumer of the release. The `maven-deploy-plugin-4.x` branch takes its artifacts from the Maven 4 `ProjectManager`, has no such swap, and is not changed here. Verified: `DeployMojoTest#testDeployPomProjectAfterJarJarDeploysPom` fails without the fix (the deployed `.pom` is the 178-byte JAR) → passes with it; `mvn -Prun-its verify` on Maven 3.9.16 → green. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
