Hi all,

I just posted this question on the Apache Felix list, but then I realized
that it probably has more to do with m2eclipse. I apologize for the double
post...

I'm an Eclipse veteran but a newbie to Maven. I'm trying to set up a
POM-first build of an Eclipse plug-in using the Felix maven-bundle-plugin.
When I trigger a build in my Eclipse workbench I get a
LifecycleExecutionException: Internal error in the plugin manager executing
goal 'org.apache.felix:maven-bundle-plugin:1.4.3:bundle': Mojo execution
failed

The Maven console output is (with debug enabled):

...
1/21/09 10:59:22 AM PST: [DEBUG] Looking up mojo
org.apache.felix:maven-bundle-plugin:1.4.3:bundle in realm
/plugins/org.apache.felix:maven-bundle-plugin:1....@48/thread:Worker-19 -
descRealmId=/plugins/org.apache.felix:maven-bundle-plugin:1....@48/thread:Worker-19
1/21/09 10:59:22 AM PST: [DEBUG] Looked up -
org.apache.felix.bundleplugin.bundleplu...@fcb501 -
ClassRealm[/plugins/org.apache.felix:maven-bundle-plugin:1....@48/thread:Worker-19,
parent:
ClassRealm[/projects/com.intuit.eclipse.tcr.ui.quickbase:com.intuit.eclipse.tcr.ui.quickbase:0.0.1-SNAPSHOT/thread:Worker-19,
parent: ClassRealm[plexus.core, parent: null]]]
1/21/09 10:59:22 AM PST: [DEBUG] Configuring mojo
'org.apache.felix:maven-bundle-plugin:1.4.3:bundle' with basic configurator
-->
1/21/09 10:59:22 AM PST: [DEBUG]   (f) baseDir =
C:\dev\workspace\com.intuit.eclipse.tcr.ui.quickbase
1/21/09 10:59:22 AM PST: [DEBUG]   (f) buildDirectory =
C:\dev\workspace\com.intuit.eclipse.tcr.ui.quickbase\target
1/21/09 10:59:22 AM PST: [DEBUG]   (f) instructions =
{Bundle-Activator=com.intuit.eclipse.tcr.ui.quickbase.TCRQuickBaseUIPlugin,
Export-Package=com.intuit.eclipse.tcr.ui.quickbase}
1/21/09 10:59:22 AM PST: [DEBUG]   (f) manifestLocation =
C:\dev\workspace\com.intuit.eclipse.tcr.ui.quickbase\META-INF
1/21/09 10:59:22 AM PST: [DEBUG]   (f) outputDirectory =
C:\dev\workspace\com.intuit.eclipse.tcr.ui.quickbase\target\classes
1/21/09 10:59:22 AM PST: [DEBUG]   (f) project = MavenProject:
com.intuit.eclipse.tcr.ui.quickbase:com.intuit.eclipse.tcr.ui.quickbase:0.0.1-SNAPSHOT
@ C:\dev\workspace\com.intuit.eclipse.tcr.ui.quickbase\pom.xml
1/21/09 10:59:22 AM PST: [DEBUG] -- end configuration --
1/21/09 10:59:22 AM PST: [INFO] [bundle:bundle]
1/21/09 10:59:22 AM PST: [DEBUG] Setting context classloader for plugin to:
/plugins/org.apache.felix:maven-bundle-plugin:1....@48/thread:Worker-19
(instance is:
ClassRealm[/plugins/org.apache.felix:maven-bundle-plugin:1....@48/thread:Worker-19,
parent:
ClassRealm[/projects/com.intuit.eclipse.tcr.ui.quickbase:com.intuit.eclipse.tcr.ui.quickbase:0.0.1-SNAPSHOT/thread:Worker-19,
parent: ClassRealm[plexus.core, parent: null]]])
1/21/09 10:59:22 AM PST: Build errors for
com.intuit.eclipse.tcr.ui.quickbase;
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
the plugin manager executing goal
'org.apache.felix:maven-bundle-plugin:1.4.3:bundle': Mojo execution failed.

The Eclipse project is configured to invoke the 'deploy' goal on project
cleans or resource changes. When I invoke 'mvn deploy' on the command line,
it works just fine:

...
[INFO] [bundle:bundle]
[INFO] [dependency:copy-dependencies {execution: copy-dependencies}]
[INFO] com.intuit.quickbase.api-0.0.1-SNAPSHOT.jar already exists in
destination.
[INFO] com.intuit.tcr-0.0.1-SNAPSHOT.jar already exists in destination.
[INFO] com.intuit.tcr.repository.quickbase-0.0.1-SNAPSHOT.jar already exists
in destination.
[INFO] commons-codec-1.2.jar already exists in destination.
[INFO] commons-httpclient-3.1.jar already exists in destination.
[INFO] commons-logging-1.0.4.jar already exists in destination.
[INFO] [install:install]
...
[INFO] [bundle:deploy]
[INFO] Remote OBR update disabled (enable with -DremoteOBR)
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Wed Jan 21 10:56:43 PST 2009
[INFO] Final Memory: 16M/30M
[INFO]
------------------------------------------------------------------------

So, the problem only occurs when the m2eclipse Maven builder runs, but not
when I invoke mvn manually. Does someone know what this problem could be
about? How can I debug this further? For example, I'd like to know what
"Mojo execution failed" actually refers to; i.e., what is the low-level
exception at the root of this problem? I know about Maven's "-e" option, but
I have no idea how to enable it for m2eclipse's Maven builder.

I forgot to include the relevant POM fragment:

 ...
 <groupId>com.intuit.eclipse.tcr.ui.quickbase</groupId>
 <artifactId>com.intuit.eclipse.tcr.ui.quickbase</artifactId>
 <packaging>bundle</packaging>
 <name>TCR QuickBase UI for Eclipse</name><!-- goes into MANIFEST.MF -->
 <version>0.0.1-SNAPSHOT</version>
 <organization>
  <name>Intuit, Inc.</name><!-- goes into MANIFEST.MF -->
 </organization>

 <dependencies>
  <dependency>
   <groupId>com.intuit.tcr.repository.quickbase</groupId>
   <artifactId>com.intuit.tcr.repository.quickbase</artifactId>
   <version>0.0.1-SNAPSHOT</version>
  </dependency>
 </dependencies>

 <build>
  <resources>
   <resource>
    <directory>.</directory>
    <includes>
     <include>plugin.xml</include>
    </includes>
   </resource>
  </resources>

  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
     <source>1.5</source>
     <target>1.5</target>
     <!-- NOTE: apparently m2eclipse updates org.eclipse.jdt.core.prefs
based on these settings! -->
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
     <manifestLocation>META-INF</manifestLocation>
     <instructions>
      <Export-Package>com.intuit.eclipse.tcr.ui.quickbase</Export-Package>
     
<Bundle-Activator>com.intuit.eclipse.tcr.ui.quickbase.TCRQuickBaseUIPlugin</Bundle-Activator>
     </instructions>
    </configuration>
   </plugin>
   <plugin>
    <artifactId>maven-dependency-plugin</artifactId>
     <executions>
      <execution>
       <id>copy-dependencies</id>
       <phase>package</phase>
       <goals>
        <goal>copy-dependencies</goal>
       </goals>
      </execution>
     </executions>
    </plugin>
  </plugins>
 </build>

 <distributionManagement>
  ...

Thanks for any hints!

Mirko

-- 
View this message in context: 
http://www.nabble.com/maven-bundle-plugin%3A-Mojo-execution-failed-tp21591185p21591185.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to