Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.
davidB edited this page Feb 24, 2012 · 2 revisions

Why I'd have no minified files with 'mvn package' ?

Because :

  1. you set <nosuffix>true</nosuffix>
  2. your script in under src/main/webapp and maven-war-plugin copy every files from src/main/webapp to target (regardless timestamp,...)

Workarounds :

  • move your script dir out from webapp
      <plugin>
        <groupId>@project.groupId@</groupId>
        <artifactId>yuicompressor-maven-plugin</artifactId>
        ...
        <configuration>
          <!-- default ${project.build.sourceDirectory}/../js == src/main/js -->
          <sourceDirectory>src/main/javascript</sourceDirectory>
  • OR exclude "scripts" from the list of files to copy
     <!-- adapted from https://github.com/davidB/yuicompressor-maven-plugin/blob/master/src/it/demo01/pom.xml -->
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-war-plugin</artifactId>
       <configuration>
         <warSourceExcludes>scripts/**</warSourceExcludes>
       </configuration>
     </plugin>

Clone this wiki locally