You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by mc...@apache.org on 2015/09/18 16:11:20 UTC
svn commit: r1703863 -
/felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
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() );