Java Maven构建失败,因为;未能执行目标org.apache.felix:maven bundle plugin:2.5.3;

Java Maven构建失败,因为;未能执行目标org.apache.felix:maven bundle plugin:2.5.3;,java,maven,aem,Java,Maven,Aem,我在构建代码时遇到以下错误- [ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:2.5.3:bundle (default-bundle) on project acs.core: Error(s) found in bundle configuration -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Fail

我在构建代码时遇到以下错误-

[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:2.5.3:bundle
 (default-bundle) on project acs.core: Error(s) found in bundle configuration ->
 [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.felix:maven-bundle-plugin:2.5.3:bundle (default-bundle) on project acs
.core: Error(s) found in bundle configuration
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error(s) found in bun
dle configuration
        at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:
448)
        at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:
294)
        at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:
285)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
        ... 20 more
Caused by: org.apache.maven.plugin.MojoFailureException: Error(s) found in bundl
e configuration
        at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:
386)
        ... 24 more
[ERROR]
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :acs.core
[ERROR]无法执行目标org.apache.felix:maven bundle插件:2.5.3:bundle
项目acs.core上的(默认捆绑包):捆绑包配置中发现错误->
[帮助1]
org.apache.maven.lifecycle.LifecycleExecutionException:未能执行目标o
felix:maven bundle插件:acs项目上的2.5.3:bundle(默认bundle)
.core:在捆绑包配置中发现错误
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213)
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
位于org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
位于org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
位于org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
build(SingleThreadedBuilder.java:51)
在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(生命周期
java:128)
在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
位于org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
位于org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
位于org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
位于org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl。
爪哇:57)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(delegatingmethodaccess
sorImpl.java:43)
位于java.lang.reflect.Method.invoke(Method.java:606)
在org.codehaus.plexus.classworlds.launcher.launcher.launchEnhanced(Laun
cher.java:289)
在org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.jav)上
a:229)
在org.codehaus.plexus.classworlds.launcher.launcher.mainWithExitCode(La
uncher.java:415)
位于org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:
356)
原因:org.apache.maven.plugin.MojoExecutionException:在bun中发现错误
dle配置
位于org.apache.felix.bundleplugin.bundleplugin.execute(bundleplugin.java:
448)
位于org.apache.felix.bundleplugin.bundleplugin.execute(bundleplugin.java:
294)
位于org.apache.felix.bundleplugin.bundleplugin.execute(bundleplugin.java:
285)
位于org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(默认
BuildPluginManager.java:134)
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
... 20多
原因:org.apache.maven.plugin.MojoFailureException:捆绑包中发现错误
e配置
位于org.apache.felix.bundleplugin.bundleplugin.execute(bundleplugin.java:
386)
... 还有24个
[错误]
[错误]使用-X开关重新运行Maven以启用完整调试日志记录。
[错误]
[错误]有关错误和可能的解决方案的更多信息,请重试
d以下条款:
[错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
例外
[错误]
[错误]纠正问题后,可以使用命令恢复生成
[错误]mvn-射频:acs.core
我已经将“maven bundle plugin”的依赖项包括在内-


org.apache.felix
maven捆绑插件
真的
2.5.3
默认部署
不执行
部署
真的
我也试图改变版本,但没有成功。有没有办法解决这个问题


谢谢

在主pom.xml中添加以下插件代码


org.apache.felix
maven捆绑插件
2.5.3
真的
下面是包pom.xml中的插件代码

<plugin>
                   <groupId>org.apache.felix</groupId>
                   <artifactId>maven-bundle-plugin</artifactId>
                   <extensions>true</extensions>
                   <configuration>
                       <instructions>

                           <import-package>javax.inject;version=1.0.0,*</import-package>

                       </instructions>
                   </configuration>
               </plugin>

org.apache.felix
maven捆绑插件
真的
javax.inject;版本=1.0.0*

您确定“不执行”有效吗?我想我以前从来没有把这看作是一个阶段。@Araymer是的,我想是的,因为这对我的所有其他团队成员都有效。:)此外,我尝试了不使用此阶段语句的构建,但仍然得到相同的错误。没有“no execute”maven阶段,默认情况下maven或bundle项目中没有。无论如何,请在子模块中发布您的maven和java版本以及任何其他构建插件配置。Apache Maven 3.5.0(ff8f5e7444045639af65f6095c62210b5713f426;2017-04-03T15:39:0 6-04:00)Maven主页:C:\Maven\Apache-Maven-3.5.0-bin(1)\Apache-Maven-3.5.0\bin\。。Java版本:1.7.0_80,供应商:Oracle Corporation Java home:C:\Program Files\Java\jdk1.7.0_80\jre默认区域设置:en_US,平台编码:Cp1252操作系统名称:“windows 7”,版本:“6.1”,arch:“amd64”,系列:“windows”是否可以使用
-X
开关,然后尽可能转储错误消息?它将提供更多信息(希望如此)
<plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>2.5.3</version>
                        <inherited>true</inherited>
                    </plugin>
<plugin>
                   <groupId>org.apache.felix</groupId>
                   <artifactId>maven-bundle-plugin</artifactId>
                   <extensions>true</extensions>
                   <configuration>
                       <instructions>

                           <import-package>javax.inject;version=1.0.0,*</import-package>

                       </instructions>
                   </configuration>
               </plugin>