I want to change the value of different properties during the maven build. Maven Change a value in a file based on profile I also tried many other but it never works, and i don't understand why...
Here is my pom.xml
<profiles>
<profile>
<id>dev</id>
<activation>
<property>
<name>environment</name>
<value>dev</value>
</property>
</activation>
<properties>
<aem.url.prop>hugoL</aem.url.prop>
</properties>
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
I have a maven based project and here what is under src/main/resources in a file named front-config.properties:
After, i run the following command:
"mvn clean install -DskipTests -Pdev" or
"mvn clean install -DskipTests -Denvironment=dev"
I keep having my token inside the properties file, it never gets replaced...
If someone could help me, thanks in advance !