I think I saw a message that the Maven guys have committed a fix for
this...keep our fingers crossed...
-> richard
[EMAIL PROTECTED] wrote:
Author: mcculls
Date: Fri Aug 24 03:39:35 2007
New Revision: 569337
URL: http://svn.apache.org/viewvc?rev=569337&view=rev
Log:
Workaround for MNG-1682 (incorrect extension used when installing to local
repository)
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL:
http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=569337&r1=569336&r2=569337&view=diff
==============================================================================
---
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Fri Aug 24 03:39:35 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();)
{