解决Maven管理的项目下"Missing artifact xxx bundle"问题
2014-07-04 20:46
411 查看
这个问题可能是依赖的项目打包成bundle造成,比如mina就是这样的,打包成bundle,例子:
[html] view
plaincopy
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.4</version>
<type>bundle</type>
<scope>compile</scope>
</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即可
[html] view
plaincopy
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
其中
[html] view
plaincopy
<extensions>true</extensions>
是必须的。
---------------------------------------------------------------------------------------------------------------------
今天发现,用这个方法的log4j有问题,不妨可以试试
[html] view
plaincopy
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>
[html] view
plaincopy
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.4</version>
<type>bundle</type>
<scope>compile</scope>
</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即可
[html] view
plaincopy
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
其中
[html] view
plaincopy
<extensions>true</extensions>
是必须的。
---------------------------------------------------------------------------------------------------------------------
今天发现,用这个方法的log4j有问题,不妨可以试试
[html] view
plaincopy
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>
相关文章推荐
- 解决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"问题
- 项目管理如何解决"欠激励“问题
- 彻底解决iOS项目中 "_OBJC_CLASS_$_XXXService", referenced from: 的类似问题
- 彻底解决iOS项目中 "_OBJC_CLASS_$_XXXService", referenced from: 的相似问题
- Eclipse&Maven导入Maven项目后在pom.xml出现"Missing artifact org.springframework:spring-jdbc:jar:3.2.4.RELEAS"
- 【Java+Maven】问题系列——Maven 报错 Missing artifact xxx:xxx:bundle:xx.xx.xx
- 持续集成之路——Maven的Missing artifact问题解决
- 持续集成之路——Maven的Missing artifact问题解决
- 解决"java.lang.UnsatisfiedLinkError: Native Library xxx.dll already loaded in another classloader"问题
- cocos2d-x xcode提示错误:"vtable for XXX", referenced from 问题解决;
- android里出现"resource directory /xxx/res does not exist"问题的解决办法
- Maven的Missing artifact问题解决
- maven项目构建出现Unknown lifecycle phase "build".提示解决方法
- Maven的Missing artifact问题解决
- "无法连接到服务器,用户xxx登陆失败" 解决问题
- MYSQL 执行Insert语句throws "The table 'xxx' is full" 的问题分析及解决办法
- CXX0017:Error:symbol "xxx" not found 问题解决方法