1

I am getting the below error while building my code-

[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

I have included the dependency for "maven-bundle-plugin" as -

<plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <version>2.5.3</version>
                    <executions>
                          <execution>
                            <id>default-deploy</id>
                            <phase>no-execute</phase>
                            <goals>
                              <goal>deploy</goal>
                            </goals>
                        </execution>
                    </executions>
                    <inherited>true</inherited>
                </plugin>

I tried to change the version also, but no luck. Any idea on how to resolve this?

Thanks!

Sara
  • 373
  • 1
  • 12
  • 26
  • 1
    Are you sure "no-execute" is valid? I don't think I've ever seen that before as a phase. – Araymer Jul 07 '17 at 15:32
  • @Araymer Yes, I think so, as this is working for all my other team members. :) Also, I tried the build without this phase statement, but still getting the same error. – Sara Jul 07 '17 at 15:49
  • there is no "no-execute" maven phase, not by default in maven or in the bundle project. Anyway, please post your maven and java versions as well as any other build plugin config in the submodules. – Ahmed Musallam Jul 07 '17 at 15:51
  • Yeah I removed "no-execute" maven phase, but still getting the same error. Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:0 6-04:00) Maven home: C:\Maven\apache-maven-3.5.0-bin (1)\apache-maven-3.5.0\bin\.. Java version: 1.7.0_80, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_80\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" – Sara Jul 07 '17 at 15:58
  • Can you use the `-X` switch and then dump the error message if possible? It will give more information (hopefully) – Imran Saeed Jul 10 '17 at 08:52

1 Answers1

1

Add below plugin code in your main pom.xml

<plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>2.5.3</version>
                        <inherited>true</inherited>
                    </plugin>

And below plugin code in your bundle 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>