解决Maven管理的项目下"Missing artifact xxx bundle"问题
2013-09-17 16:47
375 查看
例如使用maven编译使用了mina的包的工程,出现如下提示:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hello 1.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.187s
[INFO] Finished at: Tue Nov 27 06:27:12 CST 2012
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Hello: Could not resolve dependencies for project tur:Hello:jar:1.0: The following artifacts could not be resolved: org.apache.mina:mina-core:bundle:2.0.7, org.apache.mina:mina-integration-beans:bundle:2.0.7, org.apache.mina:mina-integration-jmx:bundle:2.0.7, org.apache.mina:mina-integration-ognl:bundle:2.0.7, org.apache.mina:mina-statemachine:bundle:2.0.7: Failure to find org.apache.mina:mina-core:bundle:2.0.7 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
From: http://blog.csdn.net/jialechan/article/details/6821389
这个问题可能是依赖的项目打包成bundle造成,比如mina就是这样的,打包成bundle,例子:
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.4</version>
<type>bundle</type>
<scope>compile</scope>
</dependency>
加入上面依赖出现错误如下:
[align=left]11-9-26 上午10时21分30秒: Maven Builder: AUTO_BUILD requireFullBuild[/align]
11-9-26
上午10时21分30秒: Build errors for test-http-mina;
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal on project test-http-mina: Could not resolve dependencies
for project com.tecno:test-http-mina:jar:0.0.1-SNAPSHOT: Failure to find
org.apache.mina:mina-core:bundle:2.0.4 in http://uk.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted
until the update interval of uk.maven.org has elapsed or updates are
forced
11-9-26 上午10时22分11秒: Refreshing [/test-http-mina/pom.xml]
11-9-26 上午10时22分11秒: Missing artifact org.apache.mina:mina-core:bundle:2.0.4:compile
11-9-26 上午10时22分11秒: Maven Builder: AUTO_BUILD
[align=left]原因[/align]
[align=left]mina打包为了bundle格式,为此,需要添加插件[/align]
[align=left]在maven的pom.xml中plugins段中加入plugin即可[/align]
[html] view plaincopy
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
其中
[html] view plaincopy
<extensions>true</extensions>
是必须的。
@import
url(http://www.cppblog.com/cutesoft_client/cuteeditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import
url(/css/cuteeditor.css);
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
</plugin>
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hello 1.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.187s
[INFO] Finished at: Tue Nov 27 06:27:12 CST 2012
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Hello: Could not resolve dependencies for project tur:Hello:jar:1.0: The following artifacts could not be resolved: org.apache.mina:mina-core:bundle:2.0.7, org.apache.mina:mina-integration-beans:bundle:2.0.7, org.apache.mina:mina-integration-jmx:bundle:2.0.7, org.apache.mina:mina-integration-ognl:bundle:2.0.7, org.apache.mina:mina-statemachine:bundle:2.0.7: Failure to find org.apache.mina:mina-core:bundle:2.0.7 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
From: http://blog.csdn.net/jialechan/article/details/6821389
这个问题可能是依赖的项目打包成bundle造成,比如mina就是这样的,打包成bundle,例子:
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.4</version>
<type>bundle</type>
<scope>compile</scope>
</dependency>
加入上面依赖出现错误如下:
[align=left]11-9-26 上午10时21分30秒: Maven Builder: AUTO_BUILD requireFullBuild[/align]
11-9-26
上午10时21分30秒: Build errors for test-http-mina;
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal on project test-http-mina: Could not resolve dependencies
for project com.tecno:test-http-mina:jar:0.0.1-SNAPSHOT: Failure to find
org.apache.mina:mina-core:bundle:2.0.4 in http://uk.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted
until the update interval of uk.maven.org has elapsed or updates are
forced
11-9-26 上午10时22分11秒: Refreshing [/test-http-mina/pom.xml]
11-9-26 上午10时22分11秒: Missing artifact org.apache.mina:mina-core:bundle:2.0.4:compile
11-9-26 上午10时22分11秒: Maven Builder: AUTO_BUILD
[align=left]原因[/align]
[align=left]mina打包为了bundle格式,为此,需要添加插件[/align]
[align=left]在maven的pom.xml中plugins段中加入plugin即可[/align]
[html] view plaincopy
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
其中
[html] view plaincopy
<extensions>true</extensions>
是必须的。
@import
url(http://www.cppblog.com/cutesoft_client/cuteeditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import
url(/css/cuteeditor.css);
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
</plugin>
相关文章推荐
- 解决Maven管理的项目下"Missing artifact xxx bundle"问题
- MVN:Maven bundle error:解决Maven管理的项目下"Missing artifact xxx bundle"问题
- 解决Maven管理的项目下"Missing artifact xxx bundle"问题
- Maven依赖Mina:管理项目时出现"Missing artifact xxx bundle"问题
- 【Java+Maven】问题系列——Maven 报错 Missing artifact xxx:xxx:bundle:xx.xx.xx
- Maven项目pom.xml文件报xxx\target\classes\META-INF\MANIFEST.MF (系统找不到指定的路径)的问题解决
- 解决Maven项目 Missing artifact jdk.tools:jdk.tools:1.7的错误
- 关于maven出现Missing artifact oracle:ojdbc14:jar:10.2.0.4.0错误的问题解决办法
- 持续集成之路——Maven的Missing artifact问题解决
- "XXX" is Missing from working 问题原因和解决方法
- 持续集成之路——Maven的Missing artifact问题解决
- Maven的Missing artifact问题解决
- maven 提示"Missing artifact **jar" 解决办法
- maven的Missing artifact问题解决
- Maven的Missing artifact问题解决
- 转载:eclipse导入maven项目pom文件报Missing artifact 。。。错误的解决办法
- MAVEN项目错误:Missing artifact com.sun:tools:jar 1.5.0解决方法
- 解决maven多工程项目"找不到符号"问题
- 解决 "检出Maven项目web.xml is missing"错误 和 “Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误