shaded.org.eclipse.aether.resolution.ArtifactResolutionException解决方法
2015-05-29 10:04
531 查看
刚才新增一个组件之后老是报错,原来的组件没有报错,分析之后才发现自己配置出错。
先看看报错信息:
Error resolving artifactcom.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0:Could not find artifact com.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0 in maven.central.repo (http://repo1.maven.org/maven2/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0 in maven.central.repo (http://repo1.maven.org/maven2/)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:476)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)[1:org.ops4j.pax.url.mvn:2.3.0]
at java.net.URL.openStream(URL.java:1037)[:1.7.0_75]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installBundleIfNeeded(FeaturesServiceImpl.java:923)[7:org.apache.karaf.features.core:2.4.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:732)[7:org.apache.karaf.features.core:2.4.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeatures(FeaturesServiceImpl.java:491)[7:org.apache.karaf.features.core:2.4.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:461)[7:org.apache.karaf.features.core:2.4.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_75]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0 in maven.central.repo (http://repo1.maven.org/maven2/)
at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)[1:org.ops4j.pax.url.mvn:2.3.0]
是因为我在配置assembly文件的时候。新增一features文件的时候:错误的
正确的配置:
因为perisist组件的上级的groupId是
![](https://img-blog.csdn.net/20150529101003188?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbXlibG9nX2RoeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
而file之所以可以这样配置,是因为file.perisist的上级的groupId是
先看看报错信息:
Error resolving artifactcom.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0:Could not find artifact com.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0 in maven.central.repo (http://repo1.maven.org/maven2/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0 in maven.central.repo (http://repo1.maven.org/maven2/)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:476)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)[1:org.ops4j.pax.url.mvn:2.3.0]
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)[1:org.ops4j.pax.url.mvn:2.3.0]
at java.net.URL.openStream(URL.java:1037)[:1.7.0_75]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installBundleIfNeeded(FeaturesServiceImpl.java:923)[7:org.apache.karaf.features.core:2.4.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:732)[7:org.apache.karaf.features.core:2.4.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeatures(FeaturesServiceImpl.java:491)[7:org.apache.karaf.features.core:2.4.1]
at org.apache.karaf.features.internal.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:461)[7:org.apache.karaf.features.core:2.4.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_75]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.gzydt.manage:com.gzydt.manage.persist:jar:1.0.0 in maven.central.repo (http://repo1.maven.org/maven2/)
at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)[1:org.ops4j.pax.url.mvn:2.3.0]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)[1:org.ops4j.pax.url.mvn:2.3.0]
是因为我在配置assembly文件的时候。新增一features文件的时候:错误的
<?xml version="1.0" encoding="UTF-8"?> <features> <!-- ServiceMix5.4及以上版本已经集成,这里主要是提供给 Karaf 使用 --> <repository>mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features </repository> <!-- 项目系统组件的 feature 配置 --> <feature name="gzydt-license"> <!-- <bundle>blueprint:file:/C:/datasource-mysql.xml</bundle> --> <feature>license-base</feature> <feature>license-sign</feature> <feature>gzydt-file</feature> <feature>license-manage</feature> </feature> <feature name="gzydt-cxf"> <!-- ServiceMix5.4需要3.0.2,具体版本要求请查看 ServiceMix关于CXF的集成 --> <feature version="3.0.2">cxf</feature> <!-- openjpa及jndi在 karaf集成 --> <feature version="2.3.0">openjpa</feature> <feature>jndi</feature> </feature> <feature name="license-base"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.license/com.gzydt.license.base.persist/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.base.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.base.rest/1.0.0 </bundle> </feature> <feature name="license-sign"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.license/com.gzydt.license.sign.persist/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.sign.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.sign.rest/1.0.0 </bundle> </feature> <feature name="gzydt-file"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.file/com.gzydt.file.persistence/1.0.0 </bundle> <bundle>mvn:com.gzydt.file/com.gzydt.file.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.file/com.gzydt.file.rest/1.0.0 </bundle> </feature> <feature name="license-manage"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.manage/com.gzydt.license.persist/1.0.0 </bundle> <bundle>mvn:com.gzydt.manage/com.gzydt.license.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.manage/com.gzydt.license.rest/1.0.0 </bundle> </feature> </features>
正确的配置:
<?xml version="1.0" encoding="UTF-8"?> <features> <!-- ServiceMix5.4及以上版本已经集成,这里主要是提供给 Karaf 使用 --> <repository>mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features </repository> <!-- 项目系统组件的 feature 配置 --> <feature name="gzydt-license"> <!-- <bundle>blueprint:file:/C:/datasource-mysql.xml</bundle> --> <feature>license-base</feature> <feature>license-sign</feature> <feature>gzydt-file</feature> <feature>license-manage</feature> </feature> <feature name="gzydt-cxf"> <!-- ServiceMix5.4需要3.0.2,具体版本要求请查看 ServiceMix关于CXF的集成 --> <feature version="3.0.2">cxf</feature> <!-- openjpa及jndi在 karaf集成 --> <feature version="2.3.0">openjpa</feature> <feature>jndi</feature> </feature> <feature name="license-base"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.license/com.gzydt.license.base.persist/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.base.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.base.rest/1.0.0 </bundle> </feature> <feature name="license-sign"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.license/com.gzydt.license.sign.persist/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.sign.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.sign.rest/1.0.0 </bundle> </feature> <feature name="gzydt-file"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.file/com.gzydt.file.persistence/1.0.0 </bundle> <bundle>mvn:com.gzydt.file/com.gzydt.file.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.file/com.gzydt.file.rest/1.0.0 </bundle> </feature> <feature name="license-manage"> <feature>gzydt-cxf</feature> <bundle>mvn:com.gzydt.license/com.gzydt.license.manage.persist/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.manage.service/1.0.0 </bundle> <bundle>mvn:com.gzydt.license/com.gzydt.license.manage.rest/1.0.0 </bundle> </feature> </features>
因为perisist组件的上级的groupId是
而file之所以可以这样配置,是因为file.perisist的上级的groupId是
相关文章推荐
- JAVA水晶报表从环境搭建到创建动态水晶报表
- springMVC中文乱码问题
- Java编程思想之-主板示例
- Spring jar包详解
- spring freemarker集成
- 由于编译Android4.0需要jdk1.5所以要降jdk版本到1.5
- spring静态注入
- Struts2之自定义类型转换器
- Java web基础总结十之—— jsp EL表达式
- eclipse4.4的google protocol buffer的proto文件编辑器Protocol Buffer Editor安装
- update Yosemite ,prompt " * you need to install the legacy Java SE 6 Runtime"
- Java 数组基础
- JAVA与指针
- 华为2014机试样题1: 计票统计 java实现
- java中ListIterator和Iterator的区别
- eclipse 快捷键大全
- java线程同步原理及wait,notify的用法及与sleep的区别
- Eclipse设置、调优、使用
- java通过Annotation配置权限
- struts2 文件上传与下载原理