Usage

Without pom.xml change

To Check every js :

 $> mvn net.alchim31.maven:yuicompressor-maven-plugin:jslint
 

With pom.xml change

To Check every js :

<project>
...
  <build>
    <plugins>
...
      <plugin>
        <groupId>net.alchim31.maven</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.alchim31.maven</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>