image.png

    1. <profiles>
    2. <profile>
    3. <id>dev</id>
    4. <properties>
    5. <profiles.active>dev</profiles.active>
    6. </properties>
    7. <activation>
    8. <activeByDefault>true</activeByDefault>
    9. </activation>
    10. </profile>
    11. <profile>
    12. <id>test</id>
    13. <properties>
    14. <profiles.active>test</profiles.active>
    15. </properties>
    16. </profile>
    17. <profile>
    18. <id>pro</id>
    19. <properties>
    20. <profiles.active>pro</profiles.active>
    21. </properties>
    22. </profile>
    23. </profiles>
    1. <build>
    2. <finalName>${artifactId}-${profiles.active}</finalName>
    3. <plugins>
    4. <plugin>
    5. <groupId>org.springframework.boot</groupId>
    6. <artifactId>spring-boot-maven-plugin</artifactId>
    7. </plugin>
    8. </plugins>
    9. <resources>
    10. <resource>
    11. <directory>src/main/resources</directory>
    12. </resource>
    13. <resource>
    14. <directory>src/main/profiles/${profiles.active}</directory>
    15. </resource>
    16. </resources>
    17. </build>