相关疑难解决方法(0)

摆脱POM未找到org.eclipse.m2e的警告:生命周期映射

为了使m2e 1.0正常工作,我必须指定生命周期映射:

    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.bsc.maven</groupId>
                                    <artifactId>maven-processor-plugin</artifactId>
                                    <versionRange>[2.0.2,)</versionRange>
                                    <goals>
                                        <goal>process</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>                         
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
Run Code Online (Sandbox Code Playgroud)

但后来我收到了这个警告:

 [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
 [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
Run Code Online (Sandbox Code Playgroud)

如果我运行一些特定的maven任务例如mvn clean install findbugs:findbugs(如果我只运行mvn clean install那么没有这样的消息)

我知道问题是这个POM不存在,因为它只被定义为保存映射信息.( …

java eclipse m2eclipse maven m2e

56
推荐指数
4
解决办法
4万
查看次数

使用maven Build Helper Maven插件

我正在尝试使用maven插件将maven java项目的源文件夹添加到Eclipse.

尝试使用org.codehaus.mojo插件时,我收到以下错误

未能执行目标org.codehaus.mojo:建立辅助性Maven的插件:1.7:添加源(默认CLI)项目应用程序框架:参数"来源"为目标org.codehaus.mojo:建立辅助-maven-plugin:1.7:add-source缺失或无效 - > [帮助1]

通过阅读http://mojo.codehaus.org/build-helper-maven-plugin/usage.html上的文档,这应该是正确的吗?文件夹target/sources/mygeneratedfiles on存在.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
        <execution>
         <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>target/sources/mygeneratedfiles</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)

maven m2e

14
推荐指数
1
解决办法
2万
查看次数

标签 统计

m2e ×2

maven ×2

eclipse ×1

java ×1

m2eclipse ×1