Yuicompressor plugin execution does not apply to m2e

After a long search for the JavaScript compressor that I could use in Maven, I finally found it:

        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>yuicompressor-maven-plugin</artifactId>
            <version>1.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compress</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <jswarn>false</jswarn>
            </configuration>
        </plugin>

Now in the latest version of m2e in Eclipse I get the following error:

Plugin execution does not apply to life cycle configuration: net.alchim31.maven: yuicompressor-maven-plugin: 1.1: compress (execution: default, phase: technological resources)

Beautiful. I do not understand, this is just a plugin. Why can't I just name any old plugin that I have? What happened to this? How to fix it?

+3
source share
3 answers

See http://wiki.eclipse.org/M2E_plugin_execution_not_covered

, m2e 1.0 Maven "" (. M2E ) . " " " " , m2e pom.xml Eclipse Eclipse.

project pom.xml, Eclipse Maven m2e. " " ". m2e , , .

Plugin execution not covered by lifecycle configuration:
org.apache.maven.plugins:maven-antrun-plugin:1.3:run
   (execution: generate-sources-input, phase: generate-sources)

m2e groupId, artifactId, . : m2e - , .

+4

, , , . , Maven Project Builder eclipse. <ignore>, , <execute>. pom, , , javascript:

<pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>
                                        net.alchim31.maven
                                    </groupId>
                                    <artifactId>
                                        yuicompressor-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [1.1,)
                                    </versionRange>
                                    <goals>
                                        <goal>compress</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute></execute>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
+3

, ?

<plugin>
    <groupId>net.alchim31.maven</groupId>
    <artifactId>yuicompressor-maven-plugin</artifactId>
    <version>1.1</version>
    <executions>
        <execution>
            <id>compressyui</id>
            <phase>process-resources</phase>
            <goals>
                <goal>compress</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <jswarn>false</jswarn>
    </configuration>
</plugin>

, .

+1

All Articles