logo YUI Compressor Maven Mojo

To compress (Minify + Ofuscate) Javascript files and CSS files (using YUI Compressor from Julien Lecomte) and/or to check Javascript files with jslint.

homepage:
fresh index:
last release: 1 decade ago, first release: 1 decade ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org




This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
yuicompressor:jslint (phase: process-resources)

Check JS files with jslint.

yuicompressor:compress (phase: process-resources)

Apply compression on JS and CSS (using YUI Compressor).

Often used code snippets:

<plugin>
  <groupId>net.sf.alchim</groupId>
  <artifactId>yuicompressor-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>compress</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <linebreakpos>-1</linebreakpos>
    <jswarn>false</jswarn>
    <nomunge>true</nomunge>
    <excludes>
      <exclude>**/*.xml</exclude>
      <exclude>**/*-min*</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>net.sf.alchim</groupId>
  <artifactId>yuicompressor-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>compress</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <linebreakpos>-1</linebreakpos>
    <jswarn>false</jswarn>
    <nomunge>true</nomunge>
    <excludes>
      <exclude>${min.resources}/**</exclude>
      <exclude>**/*.xml</exclude>
      <exclude>**/*-min*</exclude>
      <exclude>**/*-test.js</exclude>
      <exclude>**/*-tests.js</exclude>
    </excludes>
    <outputDirectory>${min.resources}</outputDirectory>
  </configuration>
</plugin>
<plugin>
  <groupId>net.sf.alchim</groupId>
  <artifactId>yuicompressor-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>compress</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <linebreakpos>-1</linebreakpos>
    <jswarn>false</jswarn>
    <excludes>
      <exclude>**/*.xml</exclude>
      <exclude>**/*-min*</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>net.sf.alchim</groupId>
  <artifactId>yuicompressor-maven-plugin</artifactId>
  <version>0.7.1</version>
  <executions>
    <execution>
      <goals>
        <goal>compress</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <linebreakpos>-1</linebreakpos>
    <jswarn>false</jswarn>
    <excludes>
      <exclude>**/*.xml</exclude>
      <exclude>**/*.vm</exclude>
      <exclude>**/*.properties</exclude>
      <exclude>**/*min.*</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>net.sf.alchim</groupId>
  <artifactId>yuicompressor-maven-plugin</artifactId>
  <version>0.7.1</version>
  <executions>
    <execution>
      <goals>
        <goal>compress</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <suffix>-min</suffix>
    <jswarn>false</jswarn>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2018. All rights reserved. Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení | 4npm - npm search | monitored using: sitemonitoring
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.