I'm using the following dependency as parent in my maven pom.xml
:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.6.RELEASE</version>
</parent>
If I define the version as property <version>${spring-boot.version}</version>
I'm getting the following error:
Project build error: Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:${spring-boot.version} from http://repo.spring.io/milestone was cached in the local repository, resolution will not be reattempted until the update interval of spring-milestones has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:${spring-boot.version} from/to spring-milestones (http://repo.spring.io/milestone): Illegal character in path at index 85: http://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/${spring-boot.version}/spring-boot-starter-parent-${spring-boot.version}.pom and 'parent.relativePath' points at wrong local POM
So is it not possible to define the parent version as maven property?
A parent pom. xml file (or super POM) in Maven is used to structure the project in order to avoid redundancies and duplicate configurations by using an inheritance between different pom. xml files. If any dependency or properties are configured in both - parent and child - pom.
Try updating Maven to 3.2.3
.
Check these release notes:
There was some work done this front in the latest versions of Maven and it should be possible to do it with version 3.2.1 (at least), but if you're upgrading Maven anyway, go with the latest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With