使用Maven构建时出错
问题描述:
我正在尝试使用m2e eclipe插件构建Mule 2.2.8 jar。 我能够成功构建几个罐子。 但后来我得到这个异常。任何人都可以帮助我。使用Maven构建时出错
错误说明是如下:
未能执行目标org.apache.felix:项目骡模块 - 弹簧 - 配置束(缺省束):行家束-插件:1.4.3 :计算项目MavenProject的类路径时出错:org.mule.modules:mule-module-spring-config:2.2.8 @ C:\ Users \ Rohit Chopra \ Documents \ Mule_2.2.8 \ modules \ spring-config \ pom.xml:在打开zip文件
pom.xml中片断其中行家束插件是当前误差是这样的:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.3</version>
<extensions>true</extensions>
<configuration>
<obrRepository>NONE</obrRepository>
<instructions>
<!-- Each module can override these defaults in their osgi.properties file -->
<_include>-osgi.properties</_include>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Bundle-DocURL>${pom.url}</Bundle-DocURL>
<!-- Non-OSGi manifest entries -->
<!-- This would work if this issue gets closed: http://jira.codehaus.org/browse/MNG-1832 -->
<!--Build-Date>${mvn.timestamp.yyyy-MM-dd-HH:mm:ss}</Build-Date-->
<!-- include repository revision from buildnumber plugin -->
<Build-Revision>${buildNumber}</Build-Revision>
<Build-Date>${timestamp}</Build-Date>
</instructions>
</configuration>
</plugin>
你可以请建议一些修复,以消除这个错误?
答
我的第一个猜测是你有一个损坏的zip。转到<root>\Documents and Settings\<username>\.m2
并找到org/apache/felix/maven-bundle-plugin并将其删除。不要担心,maven会再次下载。
我还建议使用Java 1.5(IIRC,它需要2.2.8版本),并将源代码放在路径中没有空格的地方。
嗨维克多..我已经做到了,它的工作! – 2014-12-16 12:57:49
优秀!那么你能接受答案吗?谢谢 – 2014-12-16 13:07:50
嗨维克多,我使用jboss保险丝时面临类似的问题。我删除了'org/apache/felix/maven-bundle-plugin',但是当我在我的项目中运行'mvn install'时,我再次遇到同样的错误。我在这里打开了一个新问题:http://stackoverflow.com/questions/41439660/failed-to-execute-goal-org-apache-felixmaven-bundle-plugin2-3-7。任何解决方案 – 2017-01-03 11:30:55