首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我将JRE版本从1.8改为1.6时,Maven-jetty-plugin无法解决项目依赖问题。

当我将JRE版本从1.8改为1.6时,Maven-jetty-plugin无法解决项目依赖问题。
EN

Stack Overflow用户
提问于 2016-04-15 11:32:00
回答 1查看 901关注 0票数 0

操作系统: openSUSE Leap 4.2

IDE:安装了Eclipse :OpenJDK1.8和Oracle JDK1.6

我必须增加一些新的功能,一个现有的系统最近。我的环境和上面一样。

该系统有5个单独的项目,它们的根文件夹并排设置,并使用maven管理构建周期。

部署环境的JRE版本是Oracle JDK1.6,所以在使用JRE 1.8实现并成功测试新特性之后,我必须在develop中降低它的级别,尽管我认为这五个项目的文件夹结构没有按照maven建议排列。

当我将JDK从1.8改为1.6,试图使用maven-jetty-plugin(jetty: run )运行系统时,我得到了以下错误输出:

代码语言:javascript
复制
...
[DEBUG]     =======================================================================
[INFO] 
[INFO] >>> maven-jetty-plugin:6.1.25:run (default-cli) > test-compile @     yingfan-cpm-webapp >>>
[DEBUG] Could not find metadata     yingfan:yingfan-cpm-core:0.0.1-SNAPSHOT/maven-metadata.xml in local     (/home/lfree/.m2.3.2.5/repository)
[DEBUG] Could not find metadata     yingfan:yingfan-cpm-core:0.0.1-SNAPSHOT/maven-metadata.xml in local     (/home/lfree/.m2.3.2.5/repository)
[WARNING] The POM for yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT is missing, no     dependency information available
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1,     ConflictMarker.markTime=0, ConflictMarker.nodeCount=12, ConflictIdSorter.graphTime=0,     ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=10,     ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=3,     ConflictResolver.conflictItemCount=11, DefaultDependencyCollector.collectTime=212,     DefaultDependencyCollector.transformTime=5}
[DEBUG] yingfan:yingfan-cpm-webapp:war:0.0.1-SNAPSHOT
[DEBUG]    yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT:compile
[DEBUG]    com.lowagie:itext:jar:2.1.7:compile
[DEBUG]       bouncycastle:bcmail-jdk14:jar:138:compile
[DEBUG]       bouncycastle:bcprov-jdk14:jar:138:compile
[DEBUG]       org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[DEBUG]          org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[DEBUG]          org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[DEBUG]    org.json:json:jar:20160212:compile
[DEBUG]    javax.servlet:jstl:jar:1.2:compile
[DEBUG]    ant:ant:jar:1.6.5:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.121 s
[INFO] Finished at: 2016-04-15T18:52:09+08:00
[INFO] Final Memory: 10M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project yingfan-cpm-webapp: Could not resolve     dependencies for project yingfan:yingfan-cpm-webapp:war:0.0.1-SNAPSHOT: Could not find     artifact yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on     project yingfan-cpm-webapp: Could not resolve dependencies for project     yingfan:yingfan-cpm-webapp:war:0.0.1-SNAPSHOT: Could not find artifact     yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT
    at     org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(Life    cycleDependencyResolver.java:220)
    at     org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDepend    encies(LifecycleDependencyResolver.java:127)
    at     org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoE    xecutor.java:257)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
    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.MojoExecutor.executeForkedExecutions(MojoExecuto    r.java:364)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:198)
    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(LifecycleMod    uleBuilder.java:116)
    at     org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleMod    uleBuilder.java:80)
    at     org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.bui    ld(SingleThreadedBuilder.java:51)
    at     org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:1    20)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25    )
    at java.lang.reflect.Method.invoke(Method.java:597)
    at     org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at     org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415    )
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve     dependencies for project yingfan:yingfan-cpm-webapp:war:0.0.1-SNAPSHOT: Could not find     artifact yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT
    at     org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDe    pendenciesResolver.java:211)
    at     org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(Life    cycleDependencyResolver.java:195)
    ... 26 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find     artifact yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT
    at     org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(Default    RepositorySystem.java:384)
    at     org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDe    pendenciesResolver.java:205)
    ... 27 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find     artifact yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT
    at     org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactReso    lver.java:444)
    at     org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArt    ifactResolver.java:246)
    at     org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(Default    RepositorySystem.java:367)
    ... 28 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find     artifact yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT
    at     org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactReso    lver.java:434)
    ... 30 more
[ERROR] 
[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

在JDK 1.8中,输出如下:

代码语言:javascript
复制
</configuration>
[DEBUG] =======================================================================
[INFO] 
[INFO] >>> maven-jetty-plugin:6.1.25:run (default-cli) > test-compile @     yingfan-cpm-webapp >>>
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1,     ConflictMarker.markTime=0, ConflictMarker.nodeCount=156, ConflictIdSorter.graphTime=1,     ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=76,     ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=10,     ConflictResolver.conflictItemCount=138, DefaultDependencyCollector.collectTime=258,     DefaultDependencyCollector.transformTime=14}
[DEBUG] yingfan:yingfan-cpm-webapp:war:0.0.1-SNAPSHOT
[DEBUG]    yingfan:yingfan-cpm-core:jar:0.0.1-SNAPSHOT:compile
[DEBUG]       org.springframework:spring-core:jar:3.2.5.RELEASE:compile
[DEBUG]       org.springframework:spring-beans:jar:3.2.5.RELEASE:compile
[DEBUG]       org.springframework:spring-context:jar:3.2.5.RELEASE:compile
[DEBUG]          org.springframework:spring-aop:jar:3.2.5.RELEASE:compile
[DEBUG]          org.springframework:spring-expression:jar:3.2.5.RELEASE:compile
[DEBUG]       org.springframework:spring-web:jar:3.2.5.RELEASE:compile
[DEBUG]          aopalliance:aopalliance:jar:1.0:compile
[DEBUG]       org.springframework:spring-tx:jar:3.2.5.RELEASE:compile
[DEBUG]       org.springframework:spring-orm:jar:3.2.5.RELEASE:compile
[DEBUG]       org.springframework:spring-context-support:jar:3.2.5.RELEASE:compile

英凡-cpm-webapp和英凡-cpm核心是五个项目中的两个,它们都导入到了我的eclipse工作区中。

为什么JDK1.6不能正确识别英凡-cpm-web项目对英凡-cpm-核心项目的依赖?

P.S.JDK版本是这两种情况的唯一不同之处。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-04-15 11:38:03

信息信息构建失败信息?

如果您能够提供生成失败错误的详细信息,情况就越好。

这可能是因为当将Java版本从8更改为6时,无法编译某些类

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36646013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档