Usage

Without pom.xml change

To Check every js :

 $> mvn net.sf.alchim:yuicompressor-maven-plugin:jslint
 

With pom.xml change

To Check every js :

<project>
...
  <build>
    <plugins>
...
      <plugin>
        <groupId>net.sf.alchim</groupId>
        <artifactId>yuicompressor-maven-plugin</artifactId>
        <executions>
            <execution>
                <goals>
                    <goal>jslint</goal>
                </goals>
            </execution>
        </executions>
      </plugin>
...
    </plugins>
  </build>
...
</project>
 

To check and compress every js and css files except already compressed files like *.pack.js files and compressed.css :

<project>
...
  <build>
    <plugins>
...
        <plugin>
            <groupId>net.sf.alchim</groupId>
            <artifactId>yuicompressor-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>jslint</goal>
                        <goal>compress</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <excludes>
                    <exclude>**/*.pack.js</exclude>
                    <exclude>**/compressed.css</exclude>
                </excludes>
            </configuration>
        </plugin>
...
    </plugins>
  </build>
...
</project>