-
Notifications
You must be signed in to change notification settings - Fork 72
Description
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?