java - Spring boot parent-version as property on profile -
i'm read lot of threads can't solution. have same error this.
need input "spring-boot-starter-parent" version on property in severals profiles.
we using maven 3.3.9 version. 1 proyect without parent pom.
<parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>${spring.boot.version}</version> <relativepath/> <!-- lookup parent repository --> </parent>
and profiles on same pom.xml
<profiles> <profile> <id>local</id> <properties> <spring.boot.version>release</spring.boot.version> </properties> </profile> <profile> <id>dev</id> <activation> <activebydefault>true</activebydefault> </activation> <properties> <spring.boot.version>release</spring.boot.version> </properties> </profile> <profile> <id>tor</id> <properties> <spring.boot.version>1.4.0.release</spring.boot.version> </properties> </profile> <profile> <id>pro</id> <properties> <spring.boot.version>1.4.0.release</spring.boot.version> </properties> </profile> </profiles>
build part
<build> <!-- app .war name --> <finalname>${project.artifactid}</finalname> <plugins> <plugin> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-maven-plugin</artifactid> </plugin> <!-- surefire plugin (unit tests execution). usage: mvn test --> <plugin> <artifactid>maven-surefire-plugin</artifactid> <version>${maven.surefire.plugin.version}</version> <configuration> <excludes> <exclude>**/*integrationtest.java</exclude> </excludes> </configuration> </plugin> <!-- failsafe plugin (integration tests execution). usage: mvn integration-test --> <plugin> <artifactid>maven-failsafe-plugin</artifactid> <version>${maven.failsafe.plugin.version}</version> <configuration> <includes> <include>**/*integrationtest.java</include> </includes> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> <plugin> <groupid>org.apache.tomcat.maven</groupid> <artifactid>tomcat7-maven-plugin</artifactid> <version>2.2</version> <configuration> <path>/abcde</path> <mode>context</mode> <charset>utf-8</charset> <wardirectory>target/${project.artifactid}</wardirectory> </configuration> </plugin> </plugins> </build>
Comments
Post a Comment