good news everyone :)

I've just made a new release of the ops4j 'tweaked' bundle plugin
which contains a workaround for the notorious MNG-1682 issue by
resetting the artifact handler to "jar" after building the bundle.

with this fix, the correct extension is used when installing bundles
from the top of the pax project tree - so hopefully no need to keep
cd'ing to sub-directories...

0.9.15 also contains the new embed instructions (ala FELIX-308)

---------- Forwarded message ----------
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: 25-Aug-2007 00:16
Subject: svn commit: r8071 -
projects/pax/maven/bundle/src/main/java/org/apache/felix/bundleplugin
To: [EMAIL PROTECTED]

Author: mcculls
Date: Fri Aug 24 18:16:52 2007
New Revision: 8071

Log:
Workaround for MNG-1682

Modified:

projects/pax/maven/bundle/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Modified:
projects/pax/maven/bundle/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
==============================================================================
---
projects/pax/maven/bundle/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++
projects/pax/maven/bundle/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Fri Aug 24 18:16:52 2007
@@ -34,6 +34,7 @@
import java.util.zip.ZipException;

import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.model.License;
import org.apache.maven.model.Model;
import org.apache.maven.plugin.AbstractMojo;
@@ -59,6 +60,11 @@
public class BundlePlugin extends AbstractMojo {

     /**
+     * @component
+     */
+    private ArtifactHandlerManager artifactHandlerManager;
+
+    /**
      * Project types which this plugin supports.
      *
      * @parameter
@@ -265,7 +271,11 @@
             {
                 jarFile.getParentFile().mkdirs();
                 builder.getJar().write(jarFile);
-                project.getArtifact().setFile(jarFile);
+                Artifact bundleArtifact = project.getArtifact();
+                bundleArtifact.setFile(jarFile);
+
+                // workaround for MNG-1682: force maven to install artifact
using the "jar" handler
+                bundleArtifact.setArtifactHandler(
artifactHandlerManager.getArtifactHandler( "jar" ) );
             }
             for (Iterator w = warnings.iterator(); w.hasNext();)
             {

_______________________________________________
notify mailing list
[EMAIL PROTECTED]
http://lists.ops4j.org/mailman/listinfo/notify


-- 
Cheers, Stuart
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to