开发者

excluding some classes from web-inf/classes

开发者 https://www.devze.com 2023-04-01 07:55 出处:网络
I u开发者_C百科se maven-war-plugin to build WAR, and I need to exclude several WAR classes from web-inf/classes (that\'s GWT classes, they shouldn\'t get to server deployment).

I u开发者_C百科se maven-war-plugin to build WAR, and I need to exclude several WAR classes from web-inf/classes (that's GWT classes, they shouldn't get to server deployment).

How can I do it in maven? I tried "warSourceExcludes", "packagingExcludes" with no success.

Any simple and creative solution in maven is acceptable, I need it for a test project.

thanks


Configuring packagingExcludes for the maven-war-plugin works for me:

<build>
  <plugins>
    <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <version>2.1</version>
      <configuration>
        <packagingExcludes>WEB-INF/classes/**</packagingExcludes>
      </configuration>
    </plugin>
  </plugins>
</build>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号