Idea 8.1, Maven and maven-war-plugin webResources


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:

|--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:

              <directory> mymodule/src/main/webapp/profile1</directory>

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



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

Is there another way to do this?


1 comment
Comment actions Permalink


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.

Anton Makeev


Please sign in to leave a comment.