Google закрытие компилятора с Maven
Я пытаюсь минимизировать мой JS-файл с помощью компилятора Google Closure
Я использовал следующий простой файл POM
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx</groupId>
<artifactId>closurecompiler</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>closurecompiler Maven Webapp</name>
<url>http://maven.apache.org</url>
<build>
<finalName>closurecompilertest</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler</artifactId>
<version>r1810</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>target/builddependency</outputDirectory>
<destFileName>closure-compiler.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.0.12</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>target/builddependency</outputDirectory>
<destFileName>args4j.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>r07</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>target/builddependency</outputDirectory>
<destFileName>guava.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<echo
message="Minifying JS files. This takes a few minutes, please be patient" />
<apply executable="java" failOnError="true">
<arg line="-cp target/builddependency/args4j.jar;target/builddependency/guava.jar;target/builddependency/closure-compiler.jar com.google.javascript.jscomp.CommandLineRunner --compilation_level WHITESPACE_ONLY --charset UTF-8 --js " />
<fileset dir="src/main/webapp/js/" includes="*.js" />
<redirector>
<outputmapper id="out" type="glob" from="*.js" to="target/cc/*.js" />
</redirector>
</apply>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
я поместил три js-файла в источник, и когда я проверяю выходную папку, я получаю пустые файлы без какого-либо содержимого
Эта же команда прекрасно работает, если она запускается в командной строке. Любая идея, почему я получаю пустой файл?