4

在尝试编译我的基于 Maven 的 Web 应用程序时出现以下错误/异常......任何人都可以帮忙。使用 Eclipse 靛蓝编辑器

提前致谢。

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Ilex 2.3.08.01
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.312s
[INFO] Finished at: Mon Sep 24 15:27:58 UZT 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ilex: Could not resolve dependencies for project com.ilex:ilex:war:2.3.08.01: Failed to collect dependencies for [log4j:log4j:jar:1.2.16 (compile), commons-dbcp:commons-dbcp:jar:1.3 (compile), commons-dbutils:commons-dbutils:jar:1.3 (compile), commons-pool:commons-pool:jar:1.5.1 (compile), com.sun.xml.bind:jaxb-xjc:jar:2.2.2 (compile), struts:struts:jar:1.1 (compile), com.mind:mind-common-framework:jar:1.3.1 (compile), com.lowagie:itext:jar:2.1.7 (compile), com.lowagie:itext-rtf:jar:2.1.7 (compile), org.directwebremoting:dwr:jar:2.0.2 (compile), mysql:mysql-connector-java:jar:5.0.4 (provided), java4less:java4less:jar:1.0.0 (compile), jfree:jfreechart:jar:1.0.1 (compile), net.sourceforge.jtds:jtds:jar:1.2.4 (provided), jstl:jstl:jar:1.2 (compile), jasperreports:jasperreports:jar:3.1.0 (compile), javax.mail:mail:jar:1.4.1 (compile), net.sf.json-lib:json-lib:jar:jdk15:2.3 (compile), javax:javaee-api:jar:6.0 (provided), javax.activation:activation:jar:1.1 (compile), net.sf.flexjson:flexjson:jar:2.0 (compile), com.ilex:ilex-schemas:jar:1.0.0 (compile), commons-collections:commons-collections:jar:3.1 (compile), com.ilex:ilex-core-common:jar:1.0.0 (compile), com.ilex:ilex-core-dao:jar:1.0.0 (compile), com.ilex:ilex-core-logic:jar:1.0.0 (compile), com.sun.jersey:jersey-client:jar:1.6 (compile), org.apache.httpcomponents:httpclient:jar:4.0.1 (compile), org.apache.httpcomponents:httpmime:jar:4.2 (compile), org.apache.velocity:velocity:jar:1.6.2 (compile), commons-lang:commons-lang:jar:2.4 (compile)]: No versions available for commons-collections:commons-collections:jar:[2.1,) within specified range -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project ilex: Could not resolve dependencies for project com.ilex:ilex:war:2.3.08.01: Failed to collect dependencies for [log4j:log4j:jar:1.2.16 (compile), commons-dbcp:commons-dbcp:jar:1.3 (compile), commons-dbutils:commons-dbutils:jar:1.3 (compile), commons-pool:commons-pool:jar:1.5.1 (compile), com.sun.xml.bind:jaxb-xjc:jar:2.2.2 (compile), struts:struts:jar:1.1 (compile), com.mind:mind-common-framework:jar:1.3.1 (compile), com.lowagie:itext:jar:2.1.7 (compile), com.lowagie:itext-rtf:jar:2.1.7 (compile), org.directwebremoting:dwr:jar:2.0.2 (compile), mysql:mysql-connector-java:jar:5.0.4 (provided), java4less:java4less:jar:1.0.0 (compile), jfree:jfreechart:jar:1.0.1 (compile), net.sourceforge.jtds:jtds:jar:1.2.4 (provided), jstl:jstl:jar:1.2 (compile), jasperreports:jasperreports:jar:3.1.0 (compile), javax.mail:mail:jar:1.4.1 (compile), net.sf.json-lib:json-lib:jar:jdk15:2.3 (compile), javax:javaee-api:jar:6.0 (provided), javax.activation:activation:jar:1.1 (compile), net.sf.flexjson:flexjson:jar:2.0 (compile), com.ilex:ilex-schemas:jar:1.0.0 (compile), commons-collections:commons-collections:jar:3.1 (compile), com.ilex:ilex-core-common:jar:1.0.0 (compile), com.ilex:ilex-core-dao:jar:1.0.0 (compile), com.ilex:ilex-core-logic:jar:1.0.0 (compile), com.sun.jersey:jersey-client:jar:1.6 (compile), org.apache.httpcomponents:httpclient:jar:4.0.1 (compile), org.apache.httpcomponents:httpmime:jar:4.2 (compile), org.apache.velocity:velocity:jar:1.6.2 (compile), commons-lang:commons-lang:jar:2.4 (compile)]
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:196)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:108)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.ilex:ilex:war:2.3.08.01: Failed to collect dependencies for [log4j:log4j:jar:1.2.16 (compile), commons-dbcp:commons-dbcp:jar:1.3 (compile), commons-dbutils:commons-dbutils:jar:1.3 (compile), commons-pool:commons-pool:jar:1.5.1 (compile), com.sun.xml.bind:jaxb-xjc:jar:2.2.2 (compile), struts:struts:jar:1.1 (compile), com.mind:mind-common-framework:jar:1.3.1 (compile), com.lowagie:itext:jar:2.1.7 (compile), com.lowagie:itext-rtf:jar:2.1.7 (compile), org.directwebremoting:dwr:jar:2.0.2 (compile), mysql:mysql-connector-java:jar:5.0.4 (provided), java4less:java4less:jar:1.0.0 (compile), jfree:jfreechart:jar:1.0.1 (compile), net.sourceforge.jtds:jtds:jar:1.2.4 (provided), jstl:jstl:jar:1.2 (compile), jasperreports:jasperreports:jar:3.1.0 (compile), javax.mail:mail:jar:1.4.1 (compile), net.sf.json-lib:json-lib:jar:jdk15:2.3 (compile), javax:javaee-api:jar:6.0 (provided), javax.activation:activation:jar:1.1 (compile), net.sf.flexjson:flexjson:jar:2.0 (compile), com.ilex:ilex-schemas:jar:1.0.0 (compile), commons-collections:commons-collections:jar:3.1 (compile), com.ilex:ilex-core-common:jar:1.0.0 (compile), com.ilex:ilex-core-dao:jar:1.0.0 (compile), com.ilex:ilex-core-logic:jar:1.0.0 (compile), com.sun.jersey:jersey-client:jar:1.6 (compile), org.apache.httpcomponents:httpclient:jar:4.0.1 (compile), org.apache.httpcomponents:httpmime:jar:4.2 (compile), org.apache.velocity:velocity:jar:1.6.2 (compile), commons-lang:commons-lang:jar:2.4 (compile)]
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:139)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:171)
    ... 22 more
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [log4j:log4j:jar:1.2.16 (compile), commons-dbcp:commons-dbcp:jar:1.3 (compile), commons-dbutils:commons-dbutils:jar:1.3 (compile), commons-pool:commons-pool:jar:1.5.1 (compile), com.sun.xml.bind:jaxb-xjc:jar:2.2.2 (compile), struts:struts:jar:1.1 (compile), com.mind:mind-common-framework:jar:1.3.1 (compile), com.lowagie:itext:jar:2.1.7 (compile), com.lowagie:itext-rtf:jar:2.1.7 (compile), org.directwebremoting:dwr:jar:2.0.2 (compile), mysql:mysql-connector-java:jar:5.0.4 (provided), java4less:java4less:jar:1.0.0 (compile), jfree:jfreechart:jar:1.0.1 (compile), net.sourceforge.jtds:jtds:jar:1.2.4 (provided), jstl:jstl:jar:1.2 (compile), jasperreports:jasperreports:jar:3.1.0 (compile), javax.mail:mail:jar:1.4.1 (compile), net.sf.json-lib:json-lib:jar:jdk15:2.3 (compile), javax:javaee-api:jar:6.0 (provided), javax.activation:activation:jar:1.1 (compile), net.sf.flexjson:flexjson:jar:2.0 (compile), com.ilex:ilex-schemas:jar:1.0.0 (compile), commons-collections:commons-collections:jar:3.1 (compile), com.ilex:ilex-core-common:jar:1.0.0 (compile), com.ilex:ilex-core-dao:jar:1.0.0 (compile), com.ilex:ilex-core-logic:jar:1.0.0 (compile), com.sun.jersey:jersey-client:jar:1.6 (compile), org.apache.httpcomponents:httpclient:jar:4.0.1 (compile), org.apache.httpcomponents:httpmime:jar:4.2 (compile), org.apache.velocity:velocity:jar:1.6.2 (compile), commons-lang:commons-lang:jar:2.4 (compile)]
    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:262)
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:345)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:131)
    ... 23 more
Caused by: org.sonatype.aether.resolution.VersionRangeResolutionException: No versions available for commons-collections:commons-collections:jar:[2.1,) within specified range
    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:384)
    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:533)
    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:243)
    ... 25 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
4

2 回答 2

1

由于您的构建正在运行,因此很可能是工作区的问题。切换到新工作区并重新配置您的项目。类似的问题

于 2012-09-24T10:39:54.930 回答
0

重要的部分是

No versions available for commons-collections:commons-collections:jar:[2.1,)

尝试[2.1,)用. 3.2.1_ pom.xml我建议不要使用[x.y,)符号,因为如果新版本被破坏,它可能会破坏构建。

于 2012-09-24T10:35:11.590 回答