felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1703863 - /felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Date Fri, 18 Sep 2015 14:11:20 GMT
Author: mcculls
Date: Fri Sep 18 14:11:19 2015
New Revision: 1703863

URL: http://svn.apache.org/viewvc?rev=1703863&view=rev
Log:
FELIX-5030: check pom file exists before adding it to bundle

Modified:
    felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Modified: felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=1703863&r1=1703862&r2=1703863&view=diff
==============================================================================
--- felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++ felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Fri Sep 18 14:11:19 2015
@@ -1262,8 +1262,16 @@ public class BundlePlugin extends Abstra
     private void doMavenMetadata( MavenProject currentProject, Jar jar ) throws IOException
     {
         String path = "META-INF/maven/" + currentProject.getGroupId() + "/" + currentProject.getArtifactId();
-        File pomFile = new File( currentProject.getBasedir(), "pom.xml" );
-        jar.putResource( path + "/pom.xml", new FileResource( pomFile ) );
+
+        File pomFile = currentProject.getFile();
+        if ( pomFile == null || !pomFile.exists() )
+        {
+            pomFile = new File( currentProject.getBasedir(), "pom.xml" );
+        }
+        if ( pomFile.exists() )
+        {
+            jar.putResource( path + "/pom.xml", new FileResource( pomFile ) );
+        }
 
         Properties p = new Properties();
         p.put( "version", currentProject.getVersion() );



Mime
View raw message