I have the following in my project's pom:
The maven2 build works fine both from command line and in TeamCity, com.mycompany.myproject:uber-pom:4 is downloaded from the repository. However, when I set the build number format to include %maven.project.version%
, this variable does not get resolved. Furthermore, the Maven 2 tab of build configuration reports an error:An error occurred during collecting Maven data: org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.mycompany.myproject:uber-pom for project: com.mycompany.myproject:project-name:jar:2.5.0-SNAPSHOT for project com.mycompany.myproject:project-name:jar:2.5.0-SNAPSHOT
A partial solution was to supply a <relativePath> in <parent> and modify the checkout rules so that the uber-pom
is checked out together with project-name
. This is not ideal though since I have to ensure that the version of uber-pom
that is checked out always matches the version specified in project-name
's pom -- otherwise the problem remains.
Is it a known problem and is there any solution or work-around?