-
Notifications
You must be signed in to change notification settings - Fork 20
${project.version} variable not updated in plugin config #7
Comments
I'm not sure I follow, |
Hi, I created a sample project here that uses a simple ant task to copy the built jar. It uses https://github.com/dkirrane/my-project.git |
AHHH, I see, since this is a single execution of maven, it is possible that the property isn't getting interpolated in the context of plugins |
I have this same problem, and is a major stumbling block for us. |
OH, I see, you mean the runtime property, not the interpolated one. Any chance you can add a test case? It should be pretty easy to fix after that. |
…rder to demonstrate incorrect ${project.version} resolution (bdemers#7)
I've created pull request #8 in which I've updated the existing multi-module test to demonstrate this issue. What I did was to add a dependency between the level-one module and the level-three module in the multi-moule project. |
I bumped into this as well. Would it be easy to just expose a new property that can be used?
|
Uses slightly modified maven-external-version plugin to generate the project version from git describe. This avoids having to change the pom version in a separate PR. Unfortunately ${project.version} doesn't work in plugins, so we can't show the version name in the actual war file name anymore (this is a known issue: bdemers/maven-external-version#7). Seems like an ok trade-off to me though, I usually run with -Dfinal.war.name=cbioportal anyway.
Uses slightly modified maven-external-version plugin to generate the project version from git describe. This avoids having to change the pom version in a separate PR. Unfortunately ${project.version} doesn't work in plugins, so we can't show the version name in the actual war file name anymore (this is a known issue: bdemers/maven-external-version#7). Seems like an ok trade-off to me though, I usually run with -Dfinal.war.name=cbioportal anyway.
Uses slightly modified maven-external-version plugin to generate the project version from git describe. This avoids having to change the pom version in a separate PR. Unfortunately ${project.version} doesn't work in plugins, so we can't show the version name in the actual war file name anymore (this is a known issue: bdemers/maven-external-version#7). Seems like an ok trade-off to me though, I usually run with -Dfinal.war.name=cbioportal anyway.
Uses slightly modified maven-external-version plugin to generate the project version from git describe. This avoids having to change the pom version in a separate PR. Unfortunately ${project.version} doesn't work in plugins, so we can't show the version name in the actual war file name anymore (this is a known issue: bdemers/maven-external-version#7). Seems like an ok trade-off to me though, I usually run with -Dfinal.war.name=cbioportal anyway.
@nickcodefresh here are some quick fixes that might solve your issue. This updates versions in dependencies: This updates versions in build plugins: You can include it in your project through jitpack, see e.g.: It prolly isn't too hard to add properties as well to the new pom file if that's what you prefer, but haven't tried that. |
I've tried maven-external-version with a pom containing a few plugins like {{maven-dependency-plugin}} {{maven-antrun-plugin}} and {{exec-maven-plugin}}
If any of the plugins have ${project.version} in the configuration it will not get updated with the new version.
Is there a way around this or am I missing something.
The text was updated successfully, but these errors were encountered: