Maven编译时变量替换

<profiles>
        
        <profile>
            <id>devid>
            <properties>
                <env>devenv>
            properties>
        profile>
        
        <profile>
            <id>qaid>
            <properties>
                <env>qaenv>
            properties>
        profile>
        
        <profile>
            <id>ppid>
            <properties>
                <env>ppenv>
            properties>
        profile>
        
        <profile>
            <id>prdid>
            <properties>
                <env>prdenv>
            properties>
        profile>
    profiles>
    <build>
        <filters>
            <filter>src/main/filters/application-${env}.propertiesfilter>
        filters>
        <resources>
            <resource>
                <directory>src/main/resourcesdirectory>
                <filtering>truefiltering>
            resource>
        resources>

        <plugins>
            <plugin>
                <groupId>org.scala-toolsgroupId>
                <artifactId>maven-scala-pluginartifactId>
                <version>2.15.1version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compilegoal>
                            <goal>testCompilegoal>
                        goals>
                    execution>
                executions>
            plugin>
        plugins>
    build>

你可能感兴趣的:(开发)