Error importing Maven project into Eclipse: No Marketplace Entries found to Handle

Asked

Viewed 2,035 times

2

I am new to Javaweb programming and when installing the eclipse and importing my project created by Maven, accuses the error below:

No Marketplace Entries found to Handle Maven-antrun-plugin:1.8:run in Eclipse. Please see Help for more information.

What to do to resolve this issue?

This is the pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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>br.com.projetojee</groupId>
    <artifactId>programarjavaweb</artifactId>
    <version>1</version>
    <packaging>jar</packaging>

    <name>React.js Blank Project (from https://github.com/making/maven-reactjs-blank)</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>gulp</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="Gulp!" />
                                <exec executable="gulp">
                                    <arg value="build" />
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes/META-INF/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>dest</directory>
                                    <filtering>false</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
  • Are you importing as a Maven project or as an eclipse project? What version of the eclipse? If possible, include the pom.xml of the configuration of this plugin that presented error.

  • La la, the eclipse is the newest version 3.3JavaEE @Brunocésar

  • Okay, I already include an answer for you

  • The project did not include the two most important parts of the Maven.

  • Quiet, only with this I can simulate here and I already include a "solution" for you.

1 answer

1


This error happens because the Maven plugin in eclipse (m2eclipse) not having support for goal run in the life Cycle defined, generate-resources. To import, you can do it in two ways:

  • disregard the message and import as shown below:

Desconsiderar erro e importar projeto

  • add the following excerpt to your pom.xml (if you already have any plugin managed, include only the part of plugin, without pluginManagement and plugins):
<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.eclipse.m2e</groupId>
            <artifactId>lifecycle-mapping</artifactId>
            <version>1.0.0</version>
            <configuration>
                <lifecycleMappingMetadata>
                    <pluginExecutions>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-antrun-plugin</artifactId>
                                <versionRange>[1.8,)</versionRange>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <ignore />
                            </action>
                        </pluginExecution>
                    </pluginExecutions>
                </lifecycleMappingMetadata>
            </configuration>
        </plugin>
    </plugins>
</pluginManagement>

Even if you use the first approach you can include the second approach passage to your pom.xml so that no error is presented to you.

This plugin does nothing, has no effect on other Ides or by the command line, just inform the m2eclipse that is to disregard this life cycle, not being presented the error.

What are the consequences of this? Well, like the m2eclipse does not support these life cycles you will not be able to run them using the built-in Eclipse Mven, but it will not interfere with anything in your build itself. In case it has any impact and you need to perform this goal in the eclipse, an alternative is to change the life Cycle to another, as for example prepare-package, being like this:

<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.8</version>
    <executions>
        <execution>
            <id>gulp</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <target>
                    <echo message="Gulp!" />
                    <exec executable="gulp">
                        <arg value="build" />
                    </exec>
                </target>
            </configuration>
        </execution>
    </executions>
</plugin>

EDITION: including pom.xml complete

Considering the pom.xml including in question, it complete and amended would be as follows:

<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>br.com.projetojee</groupId>
    <artifactId>programarjavaweb</artifactId>
    <version>1</version>
    <packaging>jar</packaging>

    <name>React.js Blank Project (from https://github.com/making/maven-reactjs-blank)</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>gulp</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="Gulp!" />
                                <exec executable="gulp">
                                    <arg value="build" />
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes/META-INF/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>dest</directory>
                                    <filtering>false</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-antrun-plugin</artifactId>
                                        <versionRange>[1.8,)</versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
  • What part of the code I add the information would be able to put pom.xml with all the changes ?

  • @Renanrodrigues included, see if it helps you now

  • Thank you for your cooperation.

  • I only have one more question, it is normal not to show the package in src/main/java, because here it is empty.

  • @Renanrodrigues even when there are no packages in this folder the eclipse displays, there at Java Build Path. However, if there is no such directory it may be because it has not shown, it is not a required directory, only default

  • The yes, my question, is why I’m starting my studies, and I’m following a virtual class, where the teacher’s worked all legal, but mine is not the same.

  • @Renanrodrigues quiet, any doubt just ask =D

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.