0
を指定されているのmaven pom.xml
構築セッションyuicompressor-のmaven-pluginのインストールMVNで働くか、ここで相
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArgument></compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>${project.artifactId}</warName>
<warSourceExcludes>**/*.js,**/*.css</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<jswarn>false</jswarn>
<nosuffix>true</nosuffix>
<linebreakpos>-1</linebreakpos>
<excludes>
<exclude>**/*.min.js</exclude>
<exclude>**/*.min.css</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
をし、実行していないとき(指定相れる)があるmvn install
またはmvn pre-package
無yuicompressor-maven-プラグイン作業ログ。
$mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building gif-www 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gif-www ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ gif-www ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ gif-www ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/ximing/work/gifmiao/gif-www/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ gif-www ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ gif-www ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ gif-www ---
[INFO] Packaging webapp
[INFO] Assembling webapp [gif-www] in [/home/ximing/work/gifmiao/gif-www/target/gif-www-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/ximing/work/gifmiao/gif-www/src/main/webapp]
[INFO] Webapp assembled in [170 msecs]
[INFO] Building war: /home/ximing/work/gifmiao/gif-www/target/gif-www.war
[INFO] WEB-INF/web.xml already added, skipping
が、yuicompressorログを取得することができますmvn yuicompressor:compress
を使用すると、プラグインが動作していることを示しています。
また、圧縮ファイルとjsファイルをwarファイルにパッケージする方法もわかりません(同じファイル名でHTMLテンプレートにインクルードコードを微調整する必要はありません)。一日中これについて作業している、誰かが私に手がかりを与える?