eclipse 使用maven 自动解决开源maven项目依赖包问题

1.eclipse help-> install new software

http://download.eclipse.org/technology/m2e/releases

选中安装项,next next 然后慢慢等。重启eclipse就好


2.被maven生成的项目中存在pom.xml 这个xml包含了项目需要的所有依赖名称。


3.首先新建一个项目,转换为maven项目,右键点项目或者pom.xml   -- maven--add dependence 然后输入pom.xml的group id ,artifact id, version 点ok等下下载即可。


问题1:Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin 

解决:在<project>标签下加上

  <build>

        <defaultGoal>compile</defaultGoal>
  
   <pluginManagement>  
    <plugins>  
        <!--This plugin's configuration is used to store Eclipse   
            m2e settings only. It has no influence on the Maven build itself. -->  
        <plugin>  
            <groupId>org.eclipse.m2e</groupId>  
            <artifactId>lifecycle-mapping</artifactId>  
            <version>1.0.0</version>  
            <configuration>  
                <lifecycleMappingMetadata>  
                    <pluginExecutions>  
                        <pluginExecution>  
                            <pluginExecutionFilter>  
                                <groupId>org.codehaus.mojo</groupId>  
                                <artifactId>aspectj-maven-plugin</artifactId>  
                                <versionRange>[1.0,)</versionRange>  
                                <goals>  
                                    <goal>test-compile</goal>  
                                    <goal>compile</goal>  
                                </goals>  
                            </pluginExecutionFilter>  
                            <action>  
                                <execute />  
                            </action>  
                        </pluginExecution>  
                    </pluginExecutions>  
                </lifecycleMappingMetadata>  
            </configuration>  
        </plugin>  
    </plugins>  
</pluginManagement> 
</build>


问题2

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) ofslf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.


slf4j-nop.jarslf4j-simple.jarslf4j-log4j12.jarslf4j-jdk14.jar

since 1.6.0 As of SLF4J version 1.6, in the absence of a binding, SLF4J will default to a no-operation (NOP) logger implementation.

You can download SLF4J bindings from the project download page


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值