Idea 8.1, Maven and maven-war-plugin webResources

Hi,

I've created a project based on a maven pom file. When I build the project in Idea, the packaged war is different.

My webapp folder is structured like this:

-webapp
|--common  (files common to all the profiles)
|--profile1 (files for profile1)
|--profile2 (files for profile2)

And here is the configuration of maven-war-plugin for the default profile:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <excludes>common/**,profile1/**,profile2/**</excludes>
          <webResources>
            <resource>
              <directory>mymodule/src/main/webapp/common</directory>
            </resource>
            <resource>
              <directory> mymodule/src/main/webapp/profile1</directory>
            </resource>
          </webResources>
        </configuration>
      </plugin>

The resulting war is exactly what is in the webapp folder:


|--common
|--profile1
|--profile2



 

So it seems that Idea doesn't take into account the webResources excludes/resource directory configuration.

Is there another way to do this?

Thanks.

1 comment
Comment actions Permalink

Hi,

Unfortunately, at the moment IDEA do not handle webResources by during its build process.
Try using mvn package command or rearranging your project structure.

I'll try to make up something to solve the problem in further eaps.

Thanks,
Anton Makeev

0

Please sign in to leave a comment.