sorry, i clicked send to early... so here is my full post:

Hi,

i am struggeling with profiles and resources. 

I have 
  src/main/resources/application.properties
  src/main/dev-resources/application.properties

my profiles in pom.xml

        <profiles>
                <profile>
                        <id>production</id>
                        <activation>
                                <activeByDefault>true</activeByDefault>
                        </activation>
                        <properties>
                                <env>production</env>
                        </properties>
                </profile>
                <profile>
                        <id>development</id>
                        <activation>
                                <property>
                                        <name>env</name>
                                        <value>development</value>
                                </property>
                        </activation>
                        <build>
                                <resources>
                                        <resource>
                                                
<directory>src/main/resources</directory>

                                                <!-- this exclude is needed, 
why? -->
                                                <excludes>
                                                        
<exclude>application.properties</exclude>
                                                </excludes>

                                        </resource>
                                        <resource>
                                                
<directory>src/main/development-resources</directory>
                                        </resource>
                                </resources>
                        </build>
                </profile>
        </profiles>

then i do 
$ mvn -Denv=development clean process-resources

and it shows me that my   src/main/dev-resources/application.properties was 
copied to target/classes/

If i drop exclude i see  src/main/resources/application.properties in 
target/classes

Why do i need to exclude it? It should be overwritten, shouldn't it?

kind regards,
Janning


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to