m2e无法执行wro4j插件

时间:2012-11-02 15:15:42

标签: m2eclipse m2e wro4j

我想在项目中使用wro4j maven插件。我使用mvn命令行工作,但不在Eclipse / m2e中工作。

我尝试了生命周期映射自定义和wroj4j-m2e集成插件。

以下是生命周期映射自定义的错误:

  

目标执行默认值ro.isdc.wro4j:wro4j-maven-plugin:1.6.0:运行失败:插件ro.isdc.wro4j:wro4j-maven-plugin:1.6.0或其中一个依赖项无法已解决:无法收集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
  • eclipse版本:Juno Service Release 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>

0 个答案:

没有答案