例如使用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
这个问题可能是依赖的项目打包成bundle造成,比如mina就是这样的,打包成bundle,例子:
  1. <dependency>
  2. <groupId>org.apache.mina</groupId>
  3. <artifactId>mina-core</artifactId>
  4. <version>2.0.4</version>
  5. <type>bundle</type>
  6. <scope>compile</scope>
  7. </dependency>
加入上面依赖出现错误如下:
11-9-26 上午10时21分30秒: Maven Builder: AUTO_BUILD requireFullBuild

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

原因
mina打包为了bundle格式,为此,需要添加插件
在maven的pom.xml中plugins段中加入plugin即可
  1. <plugin>
  2. <groupId>org.apache.felix</groupId>
  3. <artifactId>maven-bundle-plugin</artifactId>
  4. <extensions>true</extensions>
  5. </plugin>

其中

  1. <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"问题的更多相关文章

  1. Spring入门(四):使用Maven管理Spring项目

    让我们先回顾下本系列的前3篇博客: Spring入门(一):创建Spring项目 Spring入门(二):自动化装配bean Spring入门(三):通过JavaConfig装配bean 1.为什么要 ...

  2. maven管理的项目出现Error configuring application listener of class org.springframework.web.context.ContextL

    eclipse里用maven管理的项目,在运行的时候出现 Error configuring application listener of class org.springframework.web ...

  3. eclipse的maven项目报Missing artifact jdk.toos:jdk.toos:jar:1.6错

    很多框架都会依赖jdk中的tools.jar,但是maven仓库中却没有. 如在eclipse+maven编写mapreduce代码,就会报Missing artifact jdk.toos:jdk. ...

  4. Maven搭建hadoop环境报Missing artifact jdk.tools:jdk.tools:jar:1.7

    今天,更新了工程,报错了. 项目中用了HBase,也有Hadoop相关的jar配置. pom文件, Missing artifact jdk.tools:jdk.tools:jar:1.7 Maven ...

  5. maven工程pom.xml报Missing artifact net.sf.jasperreports:jasperreports:jar:6.2.0

    有时maven工程的pom.xml报以下类型错误: Description Resource Path Location TypeMissing artifact net.sf.jasperrepor ...

  6. 【坑】解决maven管理SSM中mybatis的mapper文件扫描失败的问题

    文章目录 前言 改进方式来替换原始的使用方式 后记 好久没有写博客了,11月底来到公司实习,上个月写个小demo,趁此回顾下SSM,今天将最近的积累记录下: 前言 在学习 mybatis 的时候,都知 ...

  7. Maven管理Android项目1

    maven-android-plugin网站:https://code.google.com/p/maven-android-plugin/wiki/GettingStarted   android ...

  8. 对于Maven管理的项目制定虚拟目录

    基于Maven管理的web项目结构: target目录是用来存放项目打包之后生成的文件的目录,此目录中的文件必须调用mvn clean package后才能生成, 如果把虚拟目录设置在此目录中,则每次 ...

  9. Maven下把父项目下的子项目导出到myeclipse中

    第一种在父项目下已有子项目:右击空白------import 第二步Maven4MyEclipse-----------Existing  Maven  Projects 第三部选择父项目下面的子项目 ...

随机推荐

  1. java子类和父类中静态块、非静态块、构造函数的执行顺序

    public class qqqq extends Parent{ public static void main(String[] args) { new Child(); } } class Pa ...

  2. mysql 存储过程中使用游标中使用临时表可以替代数组效果

    mysql不支持数组.但有时候需要组合几张表的数据,在存储过程中,经过比较复杂的运算获取结果直接输出给调用方,比如符合条件的几张表的某些字段的组合计算,mysql临时表可以解决这个问题.临时表:只有在 ...

  3. Markdown+Pandoc 最佳写作拍档 (mailp.in)

    Markdown+Pandoc 最佳写作拍档 我们为什么写作? 自从人们开始写作,写作便是记录.抒发.批判.反省的好工具.从石板上的刻印到笔墨纸砚,再到如今的信息时代.从静态的个人主页到托管博客,从个 ...

  4. 80C51学习 流水灯

    /* c语言常用预处理命令 1.#define使用 #define A PO 后面不用加分号. #define PI 3.14 2.循环左移右移函数 _crol_(a,b)循环左移函数,a是左移的值, ...

  5. BotVS配置托管者-基于阿里云

    1. 上传Linux 64位 托管者并解压在 https://www.botvs.com/m/add-node 上下载Linux 64位 托管者, 当前下载地址 https://dn-botvs.qb ...

  6. 学问Chat UI(3)

    前言 上文学问Chat UI(2)分析了消息适配器的实现; 本文主要学习下插件功能如何实现的.并以图片插件功能作为例子详细说明,分析从具体代码入手; 概要 分析策略说明 "+"功能 ...

  7. vue-cli脚手架npm相关文件解读(9)config/index.js

    系列文章传送门: 1.build/webpack.base.conf.js 2.build/webpack.prod.conf.js 3.build/webpack.dev.conf.js 4.bui ...

  8. vue-cli脚手架npm相关文件解读(7)dev-server.js

    系列文章传送门: 1.build/webpack.base.conf.js 2.build/webpack.prod.conf.js 3.build/webpack.dev.conf.js 4.bui ...

  9. 【渗透课程】前言-揭开Web渗透与安全的面纱(必看)

    服务器是怎么被入侵的 攻击者想要对一台计算机渗透必须具备以下条件: 1.服务器与客户端能够正常通讯 (服务器是为客户端提供服务的) 2.服务器向客户端提供的权限(服务)或者说是端口. 服务端所提供的服 ...

  10. SVG基本形状及样式设置

    前面的话 图形分为位图和矢量图.位图是基于颜色的描述,是由像素点组成的图像:而矢量图是基于数学矢量的描述,是由几何图元组成的图像,与分辨率无关.可缩放矢量图形,即SVG,是W3C XML的分支语言之一 ...