Maven profile filters applied to web deployment?

Hi

I am working on a maven-based web project. The pom includes the maven-war-plugin, which is configured to apply profile filters.

I would like (need?) IDEA to apply the profile's properties to the files included in the filtering when deploying to my tomcat run configuration. But I can't figure out how to do this?

Here are the relevant parts of my pom:

the plugin:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1-alpha-1</version>
                <configuration>
                    <warName>${project.build.finalName}</warName>
                    <outputDirectory>${war.output}</outputDirectory>
                    <webappDirectory>${war.output}/${project.build.finalName}</webappDirectory>
                    <webResources>
                        <resource>
                            <directory>conf/serverProperties</directory>
                            <filtering>true</filtering>
                            <includes>
                                <include>WEB-INF/log4j.properties</include>
                                <include>WEB-INF/classes/release.properties</include>
                                <include>WEB-INF/classes/config.properties</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>


and the profile:

        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <build.id>dev</build.id>
            </properties>
            <build>
                <filters>
                    <filter>
                        conf/serverProperties/dev.properties
                    </filter>
                </filters>
            </build>
        </profile>


Can anyone help me please?

8 comments
Comment actions Permalink

Hi,

Indeed, web resource filtering is not supported at the moment. We'll do our best to add the support as soon as possible.

Thanks,
Anton Makeev

0
Comment actions Permalink

I just downloaded the Intellij Ultimate 9 demo and it seems that web resource filtering is still not supported.  Is there a workaround?

0
Comment actions Permalink

Has this been implemented yet?
I'm using 9.0.3 (paid-for), and can't see any obvious Maven profile options in the "Before launch" section when configuring a Tomcat Run configuration.

0
Comment actions Permalink

Any chance this is already fixed in Intellij IDEA 10?

0
Comment actions Permalink

Any updates on this issue?

0
Comment actions Permalink

Any news on that? Please add web resource filtering!

0
Comment actions Permalink

Unfortunetelly web resources filtering may be implemented in 12.0 only

0
Comment actions Permalink

I'm having this same issue in 12.1.1, are you all going to implement this or not, if not, what is the suggested work-around?

0

Please sign in to leave a comment.