How to define parent version in maven as property?

I use the following dependency as a 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 a property of <version>${spring-boot.version}</version> , I get the following error:

Project build error: unsolvable parent POM: failure to transfer org.springframework.boot: spring-boot-starter-parent: P: $ {spring-boot.version} from http://repo.spring.io/milestone was cached in the local repository, the permission will not be reloaded until the spring interval of the Melstones is updated, or the update is forced. Original error: Failed to transfer artifact org.springframework.boot: spring-boot-starter-parent: R: $ {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 to an invalid local POM

So is it not possible to define the parent version as a maven property?

+7
spring spring-boot maven
source share
1 answer

Try updating Maven to 3.2.3 . Check out these release notes:

Some work has been done in recent versions of Maven, and this should be possible with version 3.2.1 (at least), but if you are updating Maven anyway, upgrade to the latest version.

+2
source share

All Articles