I got the following profile in my maven pom:
<profiles>
<profile>
<id>local</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<profiles>
<profile>local</profile>
</profiles>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
which is fine for starting application, but if i want to build the application as follow
mvn clean install -Plocal
my @SpringBootTest
fails due to:
No active profile set, falling back to default profiles: default
also tried:
<profile>
<id>local</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>-Dspring.profiles.active=local</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
what am I missing?
ps mvn spring-boot:run -Plocal
works no problem there ...
also no intrested in
mvn clean install -Dspring.profiles.active=local
i know this works but just not intrested as profiles contain more than just profiles for us!