相关疑难解决方法(0)

如何消除"maven-enforcer-plugin(目标"强制执行")被m2e"eclipse警告忽略?

我正在使用maven和eclipse m2e配置一个多模块父子maven项目,我正在使用来自eclipse Juno SR1的最新资料,即m2e 1.2.0

父pom使用enforcer插件,因此父pom.xml在其插件部分中具有以下内容

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <version>1.1.1</version>
    <executions>

        <!-- Enforce that all versions of a transative dependency must converge. -->
        <execution>
            <id>enforce</id>
            <configuration>
                <rules>
                    <DependencyConvergence />
                </rules>
            </configuration>
            <goals>
                <goal>enforce</goal>
            </goals>
        </execution>

        <!-- Black list certain jars -->
        <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
                <goal>enforce</goal>
            </goals>
            <configuration>
                <rules>
                    <bannedDependencies>
                        <excludes>
                            <exclude>
                                commons-logging:commons-logging
                            </exclude>
                        </excludes>
                    </bannedDependencies>
                </rules>
                <fail>true</fail>
            </configuration>
        </execution>

    </executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)

每个子项目都有一条错误消息说 maven-enforcer-plugin (goal "enforce") is ignored by m2e.

  • 这条消息是什么意思?
  • 如何配置以消除此消息?
  • 我是否需要配置eclipse项目设置或pom.xml设置?

eclipse m2eclipse maven-3 maven m2e

44
推荐指数
1
解决办法
3万
查看次数

"忽略InnerClasses属性"警告正在杀死Eclipse

我有几个导入的jar在项目构建时在Eclipse中出现此错误:

[2011-04-08 16:31:48 - MokbeeAndroid] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(net.sf.antcontrib.logic.ForEach$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it …
Run Code Online (Sandbox Code Playgroud)

eclipse apache jar maven

13
推荐指数
2
解决办法
7570
查看次数

标签 统计

eclipse ×2

maven ×2

apache ×1

jar ×1

m2e ×1

m2eclipse ×1

maven-3 ×1