0

my issue is that I'm trying to use a variable which is defined inside the parent pom to use it as the version number for the child pom. The only thing special here is that the variable is defined inside a profile of the parent. But when the project deploys to the nexus server, it doesn't change the ${versionstring} section in the pom nor as the filename. (Which it should do)

Hope someone has an idea. Thanks for reading. :)

--- Visual setup ---

parent:

<version>${versionstring}</version>

<properties>
  <projectVersion>1.0</versionstring>
</properties>

<profiles>
  <profile>
    <id>example</id>
    <properties>
      <versionstring>${projectVersion}-SNAPSHOT</versionstring>
    </properties>
  </profile>
</profiles>

child:

<version>${versionstring}</version>

<parent>
  <artifactId>***</artifactId>
  <groupId>***</groupId>
  <version>1.14.0.0-SNAPSHOT</version>
</parent>
Nitwel
  • 79
  • 7
  • 2
    Only special properties can go to the version tag of the POM. Try `${revision}`. – J Fabian Meier Sep 21 '19 at 15:35
  • could have added a link :) see: https://stackoverflow.com/questions/10582054/maven-project-version-inheritance-do-i-have-to-specify-the-parent-version/51969067#51969067 – wemu Sep 21 '19 at 19:39
  • I think I got it fixed but still have to test it, to make sure if it works. I'll poste an update with my solution, if I got one. – Nitwel Sep 21 '19 at 22:50

0 Answers0