You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "shoffmeister (via GitHub)" <gi...@apache.org> on 2026/03/08 15:10:33 UTC

[I] deploy-file incompatible with "CI-friendly" versions [maven-deploy-plugin]

shoffmeister opened a new issue, #649:
URL: https://github.com/apache/maven-deploy-plugin/issues/649

   ### Affected version
   
   3.1.4
   
   ### Bug description
   
   The `deploy-file` goal is very helpful in trying to use an embedded POM whenever it is present (only) with a JAR. To that extent, indeed, #583 / https://issues.apache.org/jira/browse/MDEPLOY-178 seems to have been resolved.
   
   Alas, the implementation is not compatible with Maven CI Friendly Versions, 
   https://maven.apache.org/guides/mini/guide-maven-ci-friendly.html
   
   Fundamentally, when using Maven CI Friendly Versions, the `<version>` element of the `pom.xml` does not contain the _final_ version of the artifact, but will contain variables (properties) for substitution - for instance ${revision} -, yielding
   ```
       <version>${revision}</version>
   ```
   as the version.
   
   And that is something that `deploy-file` does not like, for obvious reasons.
   
   Instead of (only) looking at the `pom.xml` content, `deploy-file` should also look at the content found in the adjacent file `pom.properties` which contains
   ```
   artifactId=test-artifact
   groupId=test.groupid
   version=1.2.3
   ```
   i.e. the _resolved_ version information (having built with `mvn -Drevision=1.2.3` clean package)
   
   Thinking further ahead, it may even better if `deploy-file` _preferred_ any content in `pom.properties` over whatever is found in `pom.xml`?


-- 
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-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] deploy-file incompatible with "CI-friendly" versions [maven-deploy-plugin]

Posted by "shoffmeister (via GitHub)" <gi...@apache.org>.
shoffmeister commented on issue #649:
URL: https://github.com/apache/maven-deploy-plugin/issues/649#issuecomment-4019579079

   ... and then there is the Flatten Maven Plugin at https://www.mojohaus.org/flatten-maven-plugin/usage.html which I now recall being "almost mandatory" for use with Maven CI Friendly Versions.
   
   Perhaps adding a note to the documentation pointing to the Flatten Maven Plugin is something that could add value?


-- 
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-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org