views:

16

answers:

1

Hello!

I wonder if it is possible to filter out files from WEB-INF/classes with maven-war-plugin?

I have the following java package structure:

src/main/java/
package1.client.*
package2.client.*
package2.server.*

When building the project I do not want any .client.* classes in my WEB-INF/classes folder. (It's a GWT project).

Is this possible?

Thanks in advance!

Niclas

A: 

When building the project I do not want any .client.* classes in my WEB-INF/classes folder. Is this possible?

The following should work:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.0.2</version>
  <configuration>
    <excludes>**/client/*.class</excludes>
  </configuration>
</plugin>
Pascal Thivent
Hello there! The solution doesn't work. Tried with version 2.1 and also with the mapping \*\*/client/\*\*. Any other idea of what could work?
Niclas
@Niclas I don't know what "doesn't work" mean. I tried the above snippet before posting and it works for me.
Pascal Thivent
@Pascal. Sorry.. Maybe I explained it a little bad. What I meant is that the classes that should be filtered out still appears in the target/project..-SNAPSHOT/WEB-INF/classes
Niclas