プロジェクトで wro4j maven プラグインを使用したいと考えています。私は mvn コマンドラインを使用して作業していますが、Eclipse/m2e では作業していません。
ライフサイクル マッピングのカスタマイズと wroj4j-m2e 統合プラグインの両方を試しました。
ライフサイクル マッピングのカスタマイズに関するエラーは次のとおりです。
目標 ro.isdc.wro4j:wro4j-maven-plugin:1.6.0:run の実行のデフォルト: プラグイン ro.isdc.wro4j:wro4j-maven-plugin:1.6.0 またはその依存関係の 1 つを解決できませんでした: 失敗しましたro.isdc.wro4j:wro4j-maven-plugin:jar:1.6.0 () の依存関係を収集する (ro.isdc.wro4j:wro4j-maven-plugin:1.6.0:run:default:process-resources)
m2eclipse のログ (.plugins\org.eclipse.m2e.logback.configuration 内) は、Eclipse Maven プリファレンスでデバッグ出力が選択されていても、このエラーについて空です。
- m2e バージョン: 1.2.0.20120903-1050
- 日食バージョン: ジュノ サービス リリース 1
ここにpom.xml(抜粋)があります
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test-maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<wro4j.version>1.6.0</wro4j.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>${wro4j.version}</version>
<executions>
<execution>
<configuration>
<destinationFolder>${project.build.directory}/</destinationFolder>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
<wroFile>${basedir}/src/main/config/wro.xml</wroFile>
<extraConfigFile>${basedir}/src/main/config/wro.properties</extraConfigFile>
<targetGroups>gss</targetGroups>
<cssDestinationFolder>${project.build.directory}/${project.build.finalName}/styles/</cssDestinationFolder>
<jsDestinationFolder>${project.build.directory}/${project.build.finalName}/scripts/</jsDestinationFolder>
<contextFolder>${basedir}/src/main/</contextFolder>
<ignoreMissingResources>false</ignoreMissingResources>
<wroFile>${basedir}/src/main/config/wro.xml</wroFile>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<!-- configure #!@ m2eclipse -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<versionRange>[1.0,]</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>