Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No marketplace entries found to handle yeoman-maven-plugin

I have recently installed and created an application with JHipster. When i run the app in terminal with "mvn spring-boot:run", the app runs without problem.

But when i import the project (as a maven project) into Eclipse, i have this error in my pom:

No marketplace entries found to handle yeoman-maven-plugin:0.4:build in Eclipse. Please see Help for more information.

Here is a screenshot of the error.

maven error

This is how this plugin is defined in the generated pom.xml by default:

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.trecloux</groupId>
                <artifactId>yeoman-maven-plugin</artifactId>
                <version>0.4</version>
                <executions>
                    <execution>
                        <id>run-grunt</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                        <configuration>
                            <skipTests>true</skipTests>
                            <buildTool>grunt</buildTool>
                            <buildArgs>compass:server --force</buildArgs>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <yeomanProjectDirectory>${project.basedir}</yeomanProjectDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>

How can i continue to manipulate, edit the generated project files in my Eclipse?

like image 443
akcasoy Avatar asked Apr 26 '15 08:04

akcasoy


2 Answers

Eclipse lifecycle-mapping issue is described here:

http://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html

There is not m2e connector for yeoman-maven-plugin

Recommended way to deal with this issue it to ignore executing this plugin by m2e:

<build>    
    <plugins>
        <pluginManagement>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>
                                        com.github.trecloux
                                    </groupId>
                                    <artifactId>
                                        yeoman-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [0.4,)
                                    </versionRange>
                                    <goals>
                                        <goal>build</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

Note that executing maven from Eclipse is not affected.

like image 194
Mateusz Balbus Avatar answered Oct 05 '22 09:10

Mateusz Balbus


As Mateusz Balbus said you have to modify the pom.xml, but with a small difference as we can find here :

            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>
                                                    com.github.trecloux
                                                </groupId>
                                                <artifactId>
                                                    yeoman-maven-plugin
                                                </artifactId>
                                                <versionRange>
                                                    [0.4,)
                                                </versionRange>
                                                <goals>
                                                    <goal>build</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore></ignore>
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
like image 33
Cristi B. Avatar answered Oct 05 '22 09:10

Cristi B.