mvn 打包war 报错war包出现错误

扫一扫体验手机阅读
Sonatype Nexus以war包方式部署时始终报错
www.MyException.Cn & 发布于: 11:45:33 & 浏览:135次Sonatype Nexus以war包形式部署时始终报错,最后由此文章发现线索得以解决(还得靠google啊)这两天以在tomcat上部署war包的形式跑nexus,总是报错,在自己机器上安装JDK7都不行,但在别人的机器上就可以运行(我后来安装和他们一模一样的JDK,但也不行),他们有的是JDK1.6的跑nexus-2.4.war都没问题。我开始怀疑是不是我安装了两套JDK影响的,因为在两个仅安装一个JDK的(并且从未卸载过)同事机器上跑是没问题,而我和另一个同事安装过两个JDK的都报同样的错误,但是在还有一个同事机器上安装两套JDK却没问题。折腾蒙了,最后在google上搜索异常,找到了这篇英文文章,从他发现是nexus工作目录sonatype-work问题找到灵感。于是搜了一下如何修改war包中nexus的sonatype-work,在解压的war包中修改nexus-2.4\WEB-INF目录下的plexus.properties文件,将里面nexus-work对应的值改掉,放在tomcat中,启动,成功!修改sonatype-work目录的方法如下:最近搭建Maven本地私服,下载了内置Jetty的Nexus,发现按照网上介绍的方法尝试迁移Nexus的工作目录,发现有时有效,有时又无效,经过一下午的研究后,最终确定下面的解决方案。。一、如果下载的是WAR包版,请修改:%Nexus_HOME%/conf/nexus.propertiesnexus-work=二、如果下载的是内置Jetty版,请修改:1、start-nexus方式启动%Nexus_HOME%/conf/nexus.propertiesnexus-work=2、console-nexus方式启动直接添加环境变量PLEXUS_NEXUS_WORK建议:如果不建议有一个dos窗口的话,添加环境变量后,每次使用console-nexus的方式启动,好处是每次升级Nexus后不用修改配置文件。Update, 26-02: Brian Demers from Sonatype pointed out in the comments that Maven 2.0.10 and later are forwards-compatible with changes in the metadata format. If your Maven 2 version is one of the recommended versions on the download page, you will not have this problem.Two days, in fact. Yesterday evening, after my colleagues went home, I brought down our Nexus 1.8.0.1 instance to upgrade it to 1.9 without interrupting their work. The
for Nexus 1.9 contains the following instruction:Sonatype has changed how the lucene indexes are stored on disk, it is required that users reindex all repositories in their nexus server to start benefitting from the changes (and for search to work properly).Inconspicuous enough. Furthermore, clicking through from the
reveals:[] – Add full support for the new maven 3 snapshot metadataWhat it doesn’t reveal is that the rebuild metadata command in the repository administration screen, which would appear to be proper housekeeping at a time when you’re reindexing the repositories, now generates Maven 3 style metadata and inadvertently breaks compatibility with Maven 2 (update: older versions). This is where the fun begins.The funHaving upgraded Nexus to 1.9 and having rebuilt metadata en reindexed repositories, my Jenkins builds started failing:123456[INFO] ------------------------------------[ERROR] BUILD ERROR[INFO] ------------------------------------[INFO] Error retrieving previous build number for artifact 'myGroup:myArtifact:pom': Cannot read metadata from \'/home/maven/maven-repository/myGroup/myArtifact/1.8.0-SNAPSHOT/maven-metadata-nexus-snapshots.xml': \expected START_TAG or END_TAG not TEXT (position: TEXT seen ...&extension&pom&/... @14:25)Wouldn’t you know it, Maven 2 builds cannot handle the new metadata format.(I feel it’s worth mentioning that when
releases a new version, everything Just Works . They have their act together in a fantastic way.)Attempted fix: downgrade NexusMy previous Nexus version is still on the file system. To downgrade, all I had to do is stop Nexus, revert symlink, start Nexus.12jvm 1 & &|
18:30:28 ERROR [er_start_runner] - o.s.n.DefaultNexus & & & & & &- Could not start Nexus, user configuration exception!jvm 1 & &| org.sonatype.configuration.upgrade.UnsupportedConfigurationVersionException: Unsupported configuration file in /home/maven/nexus-oss-webapp-1.8.0.1/./../sonatype-work/nexus/conf/nexus.xml with version: 1.4.4. Cannot upgrade.Oh crap. Well at least the error message is perfectly clear. Even better, there turns out to be a nexus.xml.bak in the conf directory. For the first time that evening, I mutter something vaguely grateful about Sonatype. Now, let me just copy the entire conf directory to a safe location, restore that backup config file and try again.12jvm 1 & &|
18:39:21 INFO &[er_start_runner] - o.s.n.c.a.DefaultNe~ & & & & &- Loading Nexus Configuration...jvm 1 & &|
18:39:21 INFO &[er_start_runner] - o.s.n.c.s.StaticCon~ & & & & &- Configuration loaded succesfully.…so far so good…1234567891011121314jvm 1 & &|
18:39:22 ERROR [er_start_runner] - o.s.g.b.r.NamedClass & & & & &- Error injecting: org.sonatype.nexus.DefaultNexusjvm 1 & &| com.google.inject.ProvisionException: Guice provision errors:jvm 1 & &|jvm 1 & &| 1) Error starting: class org.sonatype.nexus.DefaultNexusjvm 1 & &| & while locating org.sonatype.nexus.DefaultNexus(truncated)jvm 1 & &| Caused by: java.lang.NullPointerExceptionjvm 1 & &| & & &at org.sonatype.security.configuration.DefaultSecurityConfigurationManager.getRealms(DefaultSecurityConfigurationManager.java:104)jvm 1 & &| & & &at org.sonatype.security.DefaultSecuritySystem.getRealmsFromConfigSource(DefaultSecuritySystem.java:202)jvm 1 & &| & & &at org.sonatype.security.DefaultSecuritySystem.start(DefaultSecuritySystem.java:846)jvm 1 & &| & & &at org.sonatype.nexus.DefaultNexus.startService(DefaultNexus.java:682)jvm 1 & &| & & &at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:647)… oh bugger.Restore the configuration for Nexus 1.9 and start that. I’m now in a stable, but useless situation where Nexus 1.9 is running and my Maven 2 builds are failing. It’s 19:20, I’ll return tomorrow.Attempted fix: -Dmaven.metadata.legacy=trueResearching this issue, I came across , which mentions a maven.metadata.legacy system property. This looks hopeful, assuming that Nexus and Maven 2/3 share parts of their code base. I brought down Nexus, added -Dmaven.metadata.legacy=true to wrapper.conf. Restart nexus, rebuild metadata for my snapshots repository. Fingers crossed……but no luck, the metadata is still in Maven 3 format. It is now noon the next day and my Maven builds are still broken.As I’m writing this, I realize that I didn’t try deleting the existing metadata files before running the Rebuild Metadata command. After going through all this, I didn’t feel like finding out, so if you’re in a position to verify this, please do so and leave a note in the comments.Attempted fix: making Maven 2 understand the Maven 3 metadata formatI think
prompted the change in metadata XML format, applied to maven-artifact version 3.0. I know enough about Maven’s internals from earlier troubleshooting to I quickly abandon any hope of backporting this to Maven 2.Back to getting Nexus 1.8.0.1 to workI decided to pick up where I left off last night. I stopped Nexus,(线索在这里). Here’s the original one:1234567891011121314&?xmlversion="1.0"?&&security-configuration&&version&2.0.3&/version&&enabled&true&/enabled&&anonymousAccessEnabled&true&/anonymousAccessEnabled&&anonymousUsername&&/anonymousUsername&&anonymousPassword&&/anonymousPassword&&realms&&realm&NexusLdapAuthenticationRealm&/realm&&realm&XmlAuthenticatingRealm&/realm&&realm&XmlAuthorizingRealm&/realm&&/realms&&securityManager&web&/securityManager&&/security-configuration&The &securityManager& element and the NexusLdapAuthenticationRealm were absent in the fresh config. I restored my original sonatype-work directory and removed these two lines. Nexus 1.8.0.1 now starts up successfully! It is now three in the afternoon, I needed some good news by now.I went into the web interface and re-enabled LDAP on the Administration/Server page. This restored the NexusLdapAuthenticationRealm in my XML file, meaning that the &securityManager& element is what prevented my downgraded Nexus from starting. The very first Nexus version I installed on our build server was 1.7.1. The securityManager element must be a relic of that version, although this doesn’t explain why this didn’t previously prevent Nexus from starting up.Did that fix my Maven builds?Not at first sight. The Rebuild Metadata task in Nexus 1.8.0.1 skips any existing metadata files. Once I figured that out I nuked these on the filesytem with a quick find /home/maven/sonatype-work/nexus/storage/snapshots -name "maven-metadata.xm*" -delete. After another Rebuild Metadata, I finally have my repository metadata in Maven 2 format.Did that fix my Maven builds? Nope, because the Maven 3-style metadata files were still in my local repository. This removing them from the local repository with another quick find command got my Maven 2 builds working again.Getting some satisfaction1rm -rf nexus-oss-webapp-1.9Suck on that, you empty-headed animal food trough wiper! I fart in your general direction!Lessons learnedWith Maven 3 around, installing stuff from Sonatype when you’re still on (update: an outdated) Maven 2 version is a dangerous proposition. Nexus 1.9 has proven to be incompatible with Maven 2, unintentionally I’m sure. Not upgrading Nexus is easier than downgrading it. I refuse to run a DTAP chain for my development support tooling, so I’ll just refrain from updating Nexus altogether from here on.I’ll use Jenkins to satisfy my keeping-stuff-up-to-date compulsions. &!--end post--&&!-- Comments --&Comments (13)
<span type="1" blog_id="1389330" userid='
6篇文章,3972人气,0粉丝
大数据时代的微服务之路
¥51.00435人订阅
<span type="1" blog_id="1389330" userid='愿有前程可奔赴,亦有岁月可回首
maven打war包出错解决
在用maven打包时,出现过如下两个错误:
错误1:程序包javax.servlet不存在,程序包javax.servlet.http不存在
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)。。。
出现原因:java编译器没有找到软件包javax.servlet。
解决方法:在pom.xml中添加以下依赖包
&javax.servlet&
&servlet-api&
&provided&
&javax.servlet&
&javax.servlet-api&
&provided&
待依赖下载完成后,右键——&maven——&Update Projects…
有时候jsp页面也会报错误,也是相关javax.servlet.http 找不到,一种方法是采用上述方法,在pom中添加依赖;第二种方法如下:
在项目上右键——&Build Path——&Configure Build Path,然后如图:
依次Next就可以了。
二、错误二
[ERROR] COMPILATION ERROR :
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] BUILD FAILURE
[INFO] Total time: 3.764 s
[INFO] Finished at: 2018-03-19T15:14:00+08:00
[INFO] Final Memory: 11M/110M
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project book-donation: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
1.错误原因:eclipse默认选择jre运行程序,而maven的install要求使用jdk,因此报编译环境找不到的错误。
2.解决方法:将jre改为jdk
3.详细步骤:
项目右键——&Build Path——&Configure Build Path…,打开窗口后,按照如下图步骤进行选择,此步骤是将jre换为jdk
完成后,先更新一下maven项目(右键——&maven——&Update Projects…),再clean以下项目(右键——&Run As…——&Maven Clean),最后再打包(右键——&Run As…——&Maven install)。
没有更多推荐了,maven打war包注意之xml、properties文件没打进去解决方法
maven项目在ide中编译出的war包一般不会有很多问题。
但是经过集成环境打war包会出现war包中打不进xml、properties等文件。这样打war包不会报错,但是war包放进tomcat中部署就报错了。
在pom.xml的build节点配置src/main/java和src/main/resources
&src/main/java&
&**/*.xml&
&src/main/resources&
1.打包后war包目录
将war包放入E:\tomcat7\webapps目录下,启动tomcat
没找到me/gacl/mapping这个文件夹
集成环境打包没有将src/main/java目录下的.xml文件打包进去
在pom.xml的build节点配置src/main/java
&src/main/java&
&**/*.xml&
2.打包后war包目录
将war包放入E:\tomcat7\webapps目录下,启动tomcat
root cause
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:spring/spring-mvc.xml]
Offending resource: ServletContext resource [/WEB-INF/spring-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring/spring-mvc.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/spring-mvc.xml] cannot be opened because it does not exist
spring/spring-mvc.xml文件不存在,
集成环境打包没有将src/main/java目录下的.xml文件和.properties文件打包进去
在pom.xml的build节点配置src/main/java
&src/main/resources&
没有更多推荐了,maven项目生成的war包在tomcat下运行报错
maven项目在tomcat中运行 主要会有两种错误:
一是依赖包冲突
二是slf4j包错误
信息: Deploying web application archive D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT.war
2014-11-18 17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2014-11-18 17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\javax.servlet.jsp-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
2014-11-18 17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
2014-11-18 17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2014-11-18 17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2014-11-18 17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\tomcat-servlet-api-8.0.15.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
信息: Deploying web application archive D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT.war
17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\javax.servlet.jsp-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
17:17:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\tomcat-servlet-api-8.0.15.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/MLjava/lang/SILjava/lang/S[Ljava/lang/OLjava/lang/T)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:272)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/MLjava/lang/SILjava/lang/S[Ljava/lang/OLjava/lang/T)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:272)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)我们来分析原因和尝试解决:
依赖包冲突
在Maven1中,需要把依赖所需要的包每个列出。这对于使用类似如的用户来说所操的心太多了,而且也不方便。在Maven2及以上版本中实现了传递依赖,如此对于Hibernate所依赖的包,Maven2会自动下载,开发人员只需关心Hibernate即可。所以可以看出列出所需要的每个jar是在maven1中的功能,Maven2以上版本认为自动下载是一种改进。
这样就产生了一个问题:Maven2以上版本虽然把编译时需要的jar都下载了,但并不是所有编译需要的jar在打成war包后运行时也需要。所以也就发现有许多的jar是不需要的,以至war包比较大。还会产生冲突。
类包冲突的一个很大的原因即产类包之间的间接依赖引起的。每个显式声明的类包都会依赖于一些其它的隐式类包,这些隐式的类包会被maven间接引入进来,因而可能造成一个我们不想要的类包的载入,严重的甚至会引起类包之间的冲突。
servlet-api.jar
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
信息: validateJarFile(D:\tomcat7\webapps\ipFilterM-0.0.1-SNAPSHOT\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
造成这种情况的原因很可能是以下两种情况:
一、项目的WEB-INF/lib下有servlet-api.jar,与Tomcat自带的servlet-api.jar冲突了。
二、项目的WEB-INF/lib下有包含javax.servlet包的其他JAR包(如WebLogic 8.1的weblogic.jar),造成与Tomcat自带的servlet-api.jar的冲突。
因为Tomcat的WebappClassLoader加载JAR包时会进行校验,一旦发现上述冲突就会报出上面的异常。
直接引用的包
要加上provided标签
maven的dependency中有一个tag是&scope&option&/scope&,其option有以下几个值:
compile, 缺省值,适用于所有阶段,会随着项目一起发布。
provided,类似compile,期望JDK、容器或使用者会提供这个依赖。如servlet-api-2.3.jar。
runtime, 在运行时使用,如JDBC驱动,适用运行和阶段。
如plexus-utils-1.1.jar
只在测试时使用,用于编译和运行测试代码。不会随项目发布。如Junit-3.8.1.jar
system, 类似provided,需要显式提供包含依赖的jar,Maven不会在Repository中查找它。
javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
&dependency&
&groupId&org.glassfish&/groupId&
&artifactId&javax.servlet&/artifactId&
&version&3.0.1&/version&
&/dependency&
&dependency&
&groupId&org.glassfish&/groupId&
&artifactId&javax.servlet&/artifactId&
&version&3.0.1&/version&
&/dependency&
在pom.xml中是直接引用的,则改为:
&dependency&
&groupId&org.glassfish&/groupId&
&artifactId&javax.servlet&/artifactId&
&version&3.0.1&/version&
&scope&provided&/scope&
&/dependency&
&dependency&
&groupId&org.glassfish&/groupId&
&artifactId&javax.servlet&/artifactId&
&version&3.0.1&/version&
&scope&provided&/scope&
&/dependency&
间接引用包
间接冲突解决方法一新建一个provided冲突包
新建一个冲突包,加上provided标签
例如:servlet-api-2.3.jar
在pom.xml中没有它的信息,是其它包间接引用了它
则我们新建如下:
&dependency&
&groupId&javax.servlet&/groupId&
&artifactId&servlet-api&/artifactId&
&version&2.3&/version&
&scope&provided&/scope&
&/dependency&
&dependency&
&groupId&javax.servlet&/groupId&
&artifactId&servlet-api&/artifactId&
&version&2.3&/version&
&scope&provided&/scope&
&/dependency&
间接冲突解决方法二把冲突包依赖排除在外
这种情况下同一类型的包只保留一个最高级的,其他有冲突的低级包全部要排除在外
项目里要用到commons-logging。它有几个依赖,其中有一个是servlet-api-2.3.jar。现在我需要用到容器内的servlet-api的异步功能,编译的时候却总是自动引用默认的2.3版本。请问哪位有经验处理这样的冲突,可以屏蔽掉servlet-api-2.3.jar这个依赖包。
如果你的工程是用maven管理的话,可以在commons-logging的依赖里把servlet-api-2.3去除掉,再加入你所需要的版本的servlet-api依赖。大概的例子如下:
&!--如果你的工程是用maven管理的话,可以在commons-logging的依赖里把servlet-api-2.3去除掉,再加入你所需要的版本的servlet-api依赖。大概的例子如下:
&dependency&
&groupId&commons-logging&/groupId&
&artifactId&commons-logging&/artifactId&
&version&1.1.1&/version&
&exclusions&
&exclusion&
&groupId&javax.servlet&/groupId&
&artifactId&servlet-api&/artifactId&
&/exclusion&
&/exclusions&
&/dependency&
&dependency&
&groupId&org.mortbay.jetty&/groupId&
&artifactId&servlet-api-2.5&/artifactId&
&version&6.1.14&/version&
&scope&provided&/scope&
&/dependency&
&!-- 指定scope为provided可以避免在发布的时候把servlet-api包拷到lib目录下。 --&
&!--如果你的工程是用maven管理的话,可以在commons-logging的依赖里把servlet-api-2.3去除掉,再加入你所需要的版本的servlet-api依赖。大概的例子如下:
&dependency&
&groupId&commons-logging&/groupId&
&artifactId&commons-logging&/artifactId&
&version&1.1.1&/version&
&exclusions&
&exclusion&
&groupId&javax.servlet&/groupId&
&artifactId&servlet-api&/artifactId&
&/exclusion&
&/exclusions&
&/dependency&
&dependency&
&groupId&org.mortbay.jetty&/groupId&
&artifactId&servlet-api-2.5&/artifactId&
&version&6.1.14&/version&
&scope&provided&/scope&
&/dependency&
&!-- 指定scope为provided可以避免在发布的时候把servlet-api包拷到lib目录下。 --&
新增一个 冲突包的
provided的dependency
针对每一个冲突包,要在它上级的包里都加上exclusions把冲突包排除在外
新增和排除 都能在myeclipse中可视化操作
找间接依赖的包的两个方法
在myeclipse的视图中查找
在cmd命令行中进入该项目的pom.xml所在位置:
mvn dependency:tree
mvn dependency:tree
稍等一会我们就可以看到扫描出的依赖树了,在里面我们可以看到包的依赖关系
我扫描出的依赖树如下:
.0.8/maven-model-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.
0.8/maven-model-2.0.8.pom (4 KB at 2.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project
/2.0.8/maven-project-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/
2.0.8/maven-project-2.0.8.pom (3 KB at 4.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-setting
s/2.0.8/maven-settings-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings
/2.0.8/maven-settings-2.0.8.pom (3 KB at 3.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile
/2.0.8/maven-profile-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/
2.0.8/maven-profile-2.0.8.pom (2 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifac
t-manager/2.0.8/maven-artifact-manager-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact
-manager/2.0.8/maven-artifact-manager-2.0.8.pom (3 KB at 6.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-reposit
ory-metadata/2.0.8/maven-repository-metadata-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-reposito
ry-metadata/2.0.8/maven-repository-metadata-2.0.8.pom (2 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
registry/2.0.8/maven-plugin-registry-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-r
egistry/2.0.8/maven-plugin-registry-2.0.8.pom (2 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
api/2.0.8/maven-plugin-api-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-a
pi/2.0.8/maven-plugin-api-2.0.8.pom (2 KB at 3.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-uti
ls/2.1/plexus-utils-2.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
s/2.1/plexus-utils-2.1.pom (4 KB at 1.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
invoker/2.0.11/maven-invoker-2.0.11.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-i
nvoker/2.0.11/maven-invoker-2.0.11.pom (5 KB at 2.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mav
en-reporting-api/3.0/maven-reporting-api-3.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mav
en-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-c
ore/1.0/doxia-core-1.0.jar
Downloading: https://repo.maven.apache.org/maven2/commons-validator/commons-vali
dator/1.2.0/commons-validator-1.2.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
doxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mave
n-reporting-api/3.0/maven-reporting-api-3.0.jar (11 KB at 5.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-beanutils/commons-bean
utils/1.7.0/commons-beanutils-1.7.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mave
n-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar (21 KB at 3.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-digester/commons-diges
ter/1.6/commons-digester-1.6.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-d
oxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar (41 KB at 6.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-logging/commons-loggin
g/1.0.4/commons-logging-1.0.4.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-logging/commons-logging
/1.0.4/commons-logging-1.0.4.jar (38 KB at 2.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar
Downloaded: https://repo.maven.apache.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar (64
KB at 6.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-s
ink-api/1.0/doxia-sink-api-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-si
nk-api/1.0/doxia-sink-api-1.0.jar (10 KB at 16.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-s
ite-renderer/1.0/doxia-site-renderer-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-si
te-renderer/1.0/doxia-site-renderer-1.0.jar (46 KB at 38.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18
n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18n
/1.0-beta-7/plexus-i18n-1.0-beta-7.jar (11 KB at 17.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-vel
ocity/1.1.7/plexus-velocity-1.1.7.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velo
city/1.1.7/plexus-velocity-1.1.7.jar (8 KB at 12.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1
.5/velocity-1.5.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanu
tils/1.7.0/commons-beanutils-1.7.0.jar (185 KB at 5.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-d
ecoration-model/1.0/doxia-decoration-model-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1.
5/velocity-1.5.jar (383 KB at 58.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-apt/1.0/doxia-module-apt-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-de
coration-model/1.0/doxia-decoration-model-1.0.jar (48 KB at 30.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-fml/1.0/doxia-module-fml-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-apt/1.0/doxia-module-apt-1.0.jar (46 KB at 48.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-xdoc/1.0/doxia-module-xdoc-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-fml/1.0/doxia-module-fml-1.0.jar (19 KB at 20.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-xhtml/1.0/doxia-module-xhtml-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-xdoc/1.0/doxia-module-xdoc-1.0.jar (28 KB at 29.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-arc
hiver/2.3/plexus-archiver-2.3.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-validator/commons-valid
ator/1.2.0/commons-validator-1.2.0.jar (89 KB at 2.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-uti
ls/3.0.9/plexus-utils-3.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-xhtml/1.0/doxia-module-xhtml-1.0.jar (22 KB at 22.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-m
anagement/1.2.1/file-management-1.2.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-co
re/1.0/doxia-core-1.0.jar (54 KB at 1.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
shared-io/1.1/maven-shared-io-1.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-arch
iver/2.3/plexus-archiver-2.3.jar (183 KB at 55.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/
2.0.6/plexus-io-2.0.6.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-ma
nagement/1.2.1/file-management-1.2.1.jar (37 KB at 12.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
dependency-analyzer/1.4/maven-dependency-analyzer-1.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-s
hared-io/1.1/maven-shared-io-1.1.jar (39 KB at 14.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/asm/asm/3.3.1/asm-3.3.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-d
ependency-analyzer/1.4/maven-dependency-analyzer-1.4.jar (27 KB at 20.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
dependency-tree/2.1/maven-dependency-tree-2.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2
.0.6/plexus-io-2.0.6.jar (57 KB at 29.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util
/0.9.0.M2/aether-util-0.9.0.M2.jar
Downloaded: https://repo.maven.apache.org/maven2/asm/asm/3.3.1/asm-3.3.1.jar (43
KB at 22.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-digester/commons-digest
er/1.6/commons-digester-1.6.jar (165 KB at 3.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
invoker/2.0.11/maven-invoker-2.0.11.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-c
ommon-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar (31 KB at 26.1
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-d
ependency-tree/2.1/maven-dependency-tree-2.1.jar (59 KB at 20.3 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-i
nvoker/2.0.11/maven-invoker-2.0.11.jar (29 KB at 18.5 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util/
0.9.0.M2/aether-util-0.9.0.M2.jar (131 KB at 19.3 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
s/3.0.9/plexus-utils-3.0.9.jar (227 KB at 11.2 KB/sec)
[INFO] ipFilterM:ipFilterM:war:0.0.1-SNAPSHOT
[INFO] +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:provided
[INFO] +- javax.activation:activation:jar:1.1:compile
[INFO] +- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.13:compile
+- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:comp
+- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:comp
+- jaxen:jaxen:jar:1.1.3:compile
\- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:comp
[INFO] +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.13:compile
\- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
[INFO] +- org.apache.ws.commons.axiom:axiom-dom:jar:1.2.13:compile
[INFO] +- org.apache.axis2:axis2-adb:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-adb-codegen:jar:1.6.2:compile
\- commons-cli:commons-cli:jar:1.2:compile
[INFO] +- ant:ant:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-codegen:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-fastinfoset:jar:1.6.2:compile
\- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.7:compile
[INFO] +- org.apache.axis2:axis2-java2wsdl:jar:1.6.2:compile
\- org.apache.ant:ant:jar:1.7.0:compile
[INFO] +- org.apache.axis2:axis2-ant-plugin:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-clustering:jar:1.6.2:compile
+- org.apache.tomcat:tribes:jar:6.0.16:compile
\- org.apache.tomcat:juli:jar:6.0.16:compile
[INFO] +- org.apache.axis2:axis2-jibx:jar:1.6.2:compile
+- org.jibx:jibx-bind:jar:1.2:compile
\- org.jibx:jibx-run:jar:1.2:compile
[INFO] +- org.apache.axis2:axis2-json:jar:1.6.2:compile
\- org.codehaus.jettison:jettison:jar:1.0-RC2:compile
[INFO] +- org.apache.axis2:axis2-kernel:jar:1.6.2:compile
+- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.2:c
+- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1:compile
+- javax.servlet:servlet-api:jar:2.3:compile
\- javax.ws.rs:jsr311-api:jar:1.0:compile
[INFO] +- org.apache.axis2:axis2-mtompolicy:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-saaj:jar:1.6.2:compile
\- org.apache.geronimo.specs:geronimo-saaj_1.3_spec:jar:1.0.1:compile
[INFO] +- org.apache.axis2:axis2-soapmonitor-servlet:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-spring:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-transport-http:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-transport-local:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-xmlbeans:jar:1.6.2:compile
+- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile
\- org.apache.ant:ant-launcher:jar:1.7.0:compile
[INFO] +- bcel:bcel:jar:5.1:compile
\- regexp:regexp:jar:1.2:compile
[INFO] +- net.sf.jmatchparser:jMatchParser-icu4j-chardet:jar:0.1:compile
\- com.ibm.icu:icu4j:jar:4.8.1.1:compile
[INFO] +- com.github.sebhoss:common-annotations:jar:1.0.0:compile
\- com.google.code.findbugs:jsr305:jar:2.0.1:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] +- commons-codec:commons-codec:jar:1.6:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- commons-discovery:commons-discovery:jar:0.4:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3:compile
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- dom4j:dom4j:jar:1.6.1:compile
\- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] +- net.sourceforge.htmlcleaner:htmlcleaner:jar:2.2:compile
\- org.jdom:jdom:jar:1.1:compile
[INFO] +- org.freemarker:freemarker:jar:2.3.19:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.2.5:compile
[INFO] +- org.apache.httpcomponents:httpclient-cache:jar:4.2.5:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.2.4:compile
[INFO] +- gov.nist.math:jama:jar:1.0.3:compile
[INFO] +- javassist:javassist:jar:3.11.0.GA:compile
[INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.3:compile
[INFO] +- org.jsoup:jsoup:jar:1.7.2:compile
[INFO] +- junit:junit:jar:4.11:compile
\- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.apache.lucene:lucene-core:jar:4.3.1:compile
[INFO] +- org.mongodb:mongo-java-driver:jar:2.10.1:compile
[INFO] +- org.apache.neethi:neethi:jar:3.0.2:compile
\- org.codehaus.woodstox:woodstox-core-asl:jar:4.0.8:compile
+- javax.xml.stream:stax-api:jar:1.0-2:compile
\- org.codehaus.woodstox:stax2-api:jar:3.0.2:compile
[INFO] +- ognl:ognl:jar:3.0.6:compile
[INFO] +- org.apache.poi:poi:jar:3.9:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.2.1:compile
\- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- org.quartz-scheduler:quartz-jobs:jar:2.2.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- org.slf4j:slf4j-simple:jar:1.7.5:compile
[INFO] +- org.springframework:spring-beans:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-commons:jar:1.5.0.RELEASE:compile
\- org.slf4j:jcl-over-slf4j:jar:1.7.1:runtime
[INFO] +- org.springframework.data:spring-data-mongodb:jar:1.2.0.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-mongodb-cross-store:jar:1.2.0.REL
EASE:compile
+- org.aspectj:aspectjrt:jar:1.7.1:compile
+- cglib:cglib:jar:2.2:compile
\- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Fin
al:compile
[INFO] +- org.springframework.data:spring-data-mongodb-log4j:jar:1.2.0.RELEASE:c
[INFO] +- org.aspectj:aspectjweaver:jar:1.8.0:compile
[INFO] +- org.springframework:spring-expression:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.0.0.RELEASE:compile
+- aopalliance:aopalliance:jar:1.0:compile
\- org.springframework:spring-jdbc:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.0.0.RELEASE:compile
[INFO] +- org.apache.struts:struts2-core:jar:2.3.15.1:compile
[INFO] +- org.apache.struts:struts2-json-plugin:jar:2.3.15.1:compile
[INFO] +- org.apache.struts:struts2-spring-plugin:jar:2.3.15.1:compile
[INFO] +- org.apache.woden:woden-api:jar:1.0M9:compile
[INFO] +- org.apache.woden:woden-impl-commons:jar:1.0M9:compile
[INFO] +- org.apache.woden:woden-impl-dom:jar:1.0M9:compile
[INFO] +- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] +- xalan:xalan:jar:2.7.0:compile
[INFO] +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile
[INFO] \- org.apache.struts.xwork:xwork-core:jar:2.3.15.1:compile
+- asm:asm:jar:3.3:compile
\- asm:asm-commons:jar:3.3:compile
\- asm:asm-tree:jar:3.3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:27 min
[INFO] Finished at: T19:37:06+08:00
[INFO] Final Memory: 14M/33M
[INFO] ------------------------------------------------------------------------
D:\workspace\ipFilterM&
.0.8/maven-model-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.
0.8/maven-model-2.0.8.pom (4 KB at 2.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project
/2.0.8/maven-project-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/
2.0.8/maven-project-2.0.8.pom (3 KB at 4.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-setting
s/2.0.8/maven-settings-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings
/2.0.8/maven-settings-2.0.8.pom (3 KB at 3.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile
/2.0.8/maven-profile-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/
2.0.8/maven-profile-2.0.8.pom (2 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifac
t-manager/2.0.8/maven-artifact-manager-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact
-manager/2.0.8/maven-artifact-manager-2.0.8.pom (3 KB at 6.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-reposit
ory-metadata/2.0.8/maven-repository-metadata-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-reposito
ry-metadata/2.0.8/maven-repository-metadata-2.0.8.pom (2 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
registry/2.0.8/maven-plugin-registry-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-r
egistry/2.0.8/maven-plugin-registry-2.0.8.pom (2 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
api/2.0.8/maven-plugin-api-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-a
pi/2.0.8/maven-plugin-api-2.0.8.pom (2 KB at 3.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-uti
ls/2.1/plexus-utils-2.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
s/2.1/plexus-utils-2.1.pom (4 KB at 1.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
invoker/2.0.11/maven-invoker-2.0.11.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-i
nvoker/2.0.11/maven-invoker-2.0.11.pom (5 KB at 2.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mav
en-reporting-api/3.0/maven-reporting-api-3.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mav
en-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-c
ore/1.0/doxia-core-1.0.jar
Downloading: https://repo.maven.apache.org/maven2/commons-validator/commons-vali
dator/1.2.0/commons-validator-1.2.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
doxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mave
n-reporting-api/3.0/maven-reporting-api-3.0.jar (11 KB at 5.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-beanutils/commons-bean
utils/1.7.0/commons-beanutils-1.7.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/mave
n-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar (21 KB at 3.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-digester/commons-diges
ter/1.6/commons-digester-1.6.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-d
oxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar (41 KB at 6.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-logging/commons-loggin
g/1.0.4/commons-logging-1.0.4.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-logging/commons-logging
/1.0.4/commons-logging-1.0.4.jar (38 KB at 2.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar
Downloaded: https://repo.maven.apache.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar (64
KB at 6.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-s
ink-api/1.0/doxia-sink-api-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-si
nk-api/1.0/doxia-sink-api-1.0.jar (10 KB at 16.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-s
ite-renderer/1.0/doxia-site-renderer-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-si
te-renderer/1.0/doxia-site-renderer-1.0.jar (46 KB at 38.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18
n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18n
/1.0-beta-7/plexus-i18n-1.0-beta-7.jar (11 KB at 17.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-vel
ocity/1.1.7/plexus-velocity-1.1.7.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velo
city/1.1.7/plexus-velocity-1.1.7.jar (8 KB at 12.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1
.5/velocity-1.5.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanu
tils/1.7.0/commons-beanutils-1.7.0.jar (185 KB at 5.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-d
ecoration-model/1.0/doxia-decoration-model-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1.
5/velocity-1.5.jar (383 KB at 58.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-apt/1.0/doxia-module-apt-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-de
coration-model/1.0/doxia-decoration-model-1.0.jar (48 KB at 30.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-fml/1.0/doxia-module-fml-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-apt/1.0/doxia-module-apt-1.0.jar (46 KB at 48.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-xdoc/1.0/doxia-module-xdoc-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-fml/1.0/doxia-module-fml-1.0.jar (19 KB at 20.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-m
odule-xhtml/1.0/doxia-module-xhtml-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-xdoc/1.0/doxia-module-xdoc-1.0.jar (28 KB at 29.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-arc
hiver/2.3/plexus-archiver-2.3.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-validator/commons-valid
ator/1.2.0/commons-validator-1.2.0.jar (89 KB at 2.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-uti
ls/3.0.9/plexus-utils-3.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-mo
dule-xhtml/1.0/doxia-module-xhtml-1.0.jar (22 KB at 22.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-m
anagement/1.2.1/file-management-1.2.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-co
re/1.0/doxia-core-1.0.jar (54 KB at 1.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
shared-io/1.1/maven-shared-io-1.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-arch
iver/2.3/plexus-archiver-2.3.jar (183 KB at 55.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/
2.0.6/plexus-io-2.0.6.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-ma
nagement/1.2.1/file-management-1.2.1.jar (37 KB at 12.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
dependency-analyzer/1.4/maven-dependency-analyzer-1.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-s
hared-io/1.1/maven-shared-io-1.1.jar (39 KB at 14.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/asm/asm/3.3.1/asm-3.3.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-d
ependency-analyzer/1.4/maven-dependency-analyzer-1.4.jar (27 KB at 20.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
dependency-tree/2.1/maven-dependency-tree-2.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2
.0.6/plexus-io-2.0.6.jar (57 KB at 29.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util
/0.9.0.M2/aether-util-0.9.0.M2.jar
Downloaded: https://repo.maven.apache.org/maven2/asm/asm/3.3.1/asm-3.3.1.jar (43
KB at 22.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-digester/commons-digest
er/1.6/commons-digester-1.6.jar (165 KB at 3.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
invoker/2.0.11/maven-invoker-2.0.11.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-c
ommon-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar (31 KB at 26.1
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-d
ependency-tree/2.1/maven-dependency-tree-2.1.jar (59 KB at 20.3 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-i
nvoker/2.0.11/maven-invoker-2.0.11.jar (29 KB at 18.5 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util/
0.9.0.M2/aether-util-0.9.0.M2.jar (131 KB at 19.3 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
s/3.0.9/plexus-utils-3.0.9.jar (227 KB at 11.2 KB/sec)
[INFO] ipFilterM:ipFilterM:war:0.0.1-SNAPSHOT
[INFO] +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:provided
[INFO] +- javax.activation:activation:jar:1.1:compile
[INFO] +- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.13:compile
+- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:comp
+- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:comp
+- jaxen:jaxen:jar:1.1.3:compile
\- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:comp
[INFO] +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.13:compile
\- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
[INFO] +- org.apache.ws.commons.axiom:axiom-dom:jar:1.2.13:compile
[INFO] +- org.apache.axis2:axis2-adb:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-adb-codegen:jar:1.6.2:compile
\- commons-cli:commons-cli:jar:1.2:compile
[INFO] +- ant:ant:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-codegen:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-fastinfoset:jar:1.6.2:compile
\- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.7:compile
[INFO] +- org.apache.axis2:axis2-java2wsdl:jar:1.6.2:compile
\- org.apache.ant:ant:jar:1.7.0:compile
[INFO] +- org.apache.axis2:axis2-ant-plugin:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-clustering:jar:1.6.2:compile
+- org.apache.tomcat:tribes:jar:6.0.16:compile
\- org.apache.tomcat:juli:jar:6.0.16:compile
[INFO] +- org.apache.axis2:axis2-jibx:jar:1.6.2:compile
+- org.jibx:jibx-bind:jar:1.2:compile
\- org.jibx:jibx-run:jar:1.2:compile
[INFO] +- org.apache.axis2:axis2-json:jar:1.6.2:compile
\- org.codehaus.jettison:jettison:jar:1.0-RC2:compile
[INFO] +- org.apache.axis2:axis2-kernel:jar:1.6.2:compile
+- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.2:c
+- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1:compile
+- javax.servlet:servlet-api:jar:2.3:compile
\- javax.ws.rs:jsr311-api:jar:1.0:compile
[INFO] +- org.apache.axis2:axis2-mtompolicy:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-saaj:jar:1.6.2:compile
\- org.apache.geronimo.specs:geronimo-saaj_1.3_spec:jar:1.0.1:compile
[INFO] +- org.apache.axis2:axis2-soapmonitor-servlet:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-spring:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-transport-http:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-transport-local:jar:1.6.2:compile
[INFO] +- org.apache.axis2:axis2-xmlbeans:jar:1.6.2:compile
+- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile
\- org.apache.ant:ant-launcher:jar:1.7.0:compile
[INFO] +- bcel:bcel:jar:5.1:compile
\- regexp:regexp:jar:1.2:compile
[INFO] +- net.sf.jmatchparser:jMatchParser-icu4j-chardet:jar:0.1:compile
\- com.ibm.icu:icu4j:jar:4.8.1.1:compile
[INFO] +- com.github.sebhoss:common-annotations:jar:1.0.0:compile
\- com.google.code.findbugs:jsr305:jar:2.0.1:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] +- commons-codec:commons-codec:jar:1.6:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- commons-discovery:commons-discovery:jar:0.4:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3:compile
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- dom4j:dom4j:jar:1.6.1:compile
\- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] +- net.sourceforge.htmlcleaner:htmlcleaner:jar:2.2:compile
\- org.jdom:jdom:jar:1.1:compile
[INFO] +- org.freemarker:freemarker:jar:2.3.19:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.2.5:compile
[INFO] +- org.apache.httpcomponents:httpclient-cache:jar:4.2.5:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.2.4:compile
[INFO] +- gov.nist.math:jama:jar:1.0.3:compile
[INFO] +- javassist:javassist:jar:3.11.0.GA:compile
[INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.3:compile
[INFO] +- org.jsoup:jsoup:jar:1.7.2:compile
[INFO] +- junit:junit:jar:4.11:compile
\- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.apache.lucene:lucene-core:jar:4.3.1:compile
[INFO] +- org.mongodb:mongo-java-driver:jar:2.10.1:compile
[INFO] +- org.apache.neethi:neethi:jar:3.0.2:compile
\- org.codehaus.woodstox:woodstox-core-asl:jar:4.0.8:compile
+- javax.xml.stream:stax-api:jar:1.0-2:compile
\- org.codehaus.woodstox:stax2-api:jar:3.0.2:compile
[INFO] +- ognl:ognl:jar:3.0.6:compile
[INFO] +- org.apache.poi:poi:jar:3.9:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.2.1:compile
\- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- org.quartz-scheduler:quartz-jobs:jar:2.2.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- org.slf4j:slf4j-simple:jar:1.7.5:compile
[INFO] +- org.springframework:spring-beans:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-commons:jar:1.5.0.RELEASE:compile
\- org.slf4j:jcl-over-slf4j:jar:1.7.1:runtime
[INFO] +- org.springframework.data:spring-data-mongodb:jar:1.2.0.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-mongodb-cross-store:jar:1.2.0.REL
EASE:compile
+- org.aspectj:aspectjrt:jar:1.7.1:compile
+- cglib:cglib:jar:2.2:compile
\- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Fin
al:compile
[INFO] +- org.springframework.data:spring-data-mongodb-log4j:jar:1.2.0.RELEASE:c
[INFO] +- org.aspectj:aspectjweaver:jar:1.8.0:compile
[INFO] +- org.springframework:spring-expression:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.0.0.RELEASE:compile
+- aopalliance:aopalliance:jar:1.0:compile
\- org.springframework:spring-jdbc:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.0.0.RELEASE:compile
[INFO] +- org.apache.struts:struts2-core:jar:2.3.15.1:compile
[INFO] +- org.apache.struts:struts2-json-plugin:jar:2.3.15.1:compile
[INFO] +- org.apache.struts:struts2-spring-plugin:jar:2.3.15.1:compile
[INFO] +- org.apache.woden:woden-api:jar:1.0M9:compile
[INFO] +- org.apache.woden:woden-impl-commons:jar:1.0M9:compile
[INFO] +- org.apache.woden:woden-impl-dom:jar:1.0M9:compile
[INFO] +- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] +- xalan:xalan:jar:2.7.0:compile
[INFO] +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile
[INFO] \- org.apache.struts.xwork:xwork-core:jar:2.3.15.1:compile
+- asm:asm:jar:3.3:compile
\- asm:asm-commons:jar:3.3:compile
\- asm:asm-tree:jar:3.3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:27 min
[INFO] Finished at: T19:37:06+08:00
[INFO] Final Memory: 14M/33M
[INFO] ------------------------------------------------------------------------
D:\workspace\ipFilterM&
根据以上方法依次解决每个包的依赖冲突后,该问题解决。
slf4j包错误
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/MLjava/lang/SILjava/lang/S[Ljava/lang/OLjava/lang/T)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:225)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:319)
at com.alibaba.citrus.webx.context.WebxComponentsLoader.initWebApplicationContext(WebxComponentsLoader.java:117)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/MLjava/lang/SILjava/lang/S[Ljava/lang/OLjava/lang/T)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:225)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:319)
at com.alibaba.citrus.webx.context.WebxComponentsLoader.initWebApplicationContext(WebxComponentsLoader.java:117)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
slf4j错误本质上也是包的冲突错误,编译时和运行时采用了不一样的jar.它的报错信息说的是 在这个类中找不到对应的方法,这是因为 slf4j包不同的版本,方法名不一样导致的。比如tomcat默认的使用某一版本的sjf4j包,但我们引入了一个新版本的包,这时候tomcat就会去找新版本的包,当然就找不到这个方法。
我们在myeclipse的pom.xml视图中也能看到这样的冲突,如图:
那么解决的方法跟上述的依赖包类似
把冲突的包provided,看看依赖库里,只要是有slf4j字母的包全部provided,重新发布war后,war包解压出来的工程lib中已经没有slf4j字母的包了,那就ok了。
没有更多推荐了,}

我要回帖

更多关于 mvn install war 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信