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 2007/09/25 15:48:59 UTC
svn commit: r579247 -
/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Author: mcculls
Date: Tue Sep 25 06:48:58 2007
New Revision: 579247
URL: http://svn.apache.org/viewvc?rev=579247&view=rev
Log:
FELIX-360: commit fixes that aren't dependent on the unreleased maven components
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=579247&r1=579246&r2=579247&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 Tue Sep 25 06:48:58 2007
@@ -124,7 +124,6 @@
*/
private Maven2OsgiConverter maven2OsgiConverter;
-
private static final String MAVEN_RESOURCES = "{maven-resources}";
private static final String MAVEN_RESOURCES_REGEX = "\\{maven-resources\\}";
@@ -392,10 +391,12 @@
{
License l = (License) i.next();
String url = l.getUrl();
+ if (url == null) continue;
sb.append(del);
sb.append(url);
del = ", ";
}
+ if (sb.length() == 0) return null;
return sb;
}
@@ -446,7 +447,8 @@
File file = this.getFile(artifact);
if (file == null)
{
- throw new RuntimeException("File is not available for artifact " + artifact + " in project " + project.getArtifact());
+ getLog().warn( "File is not available for artifact " + artifact + " in project " + project.getArtifact() );
+ continue;
}
Jar jar = new Jar(artifact.getArtifactId(), file);
list.add(jar);
@@ -539,8 +541,10 @@
properties.put(Analyzer.BUNDLE_VERSION, project.getVersion());
this.header(properties, Analyzer.BUNDLE_DESCRIPTION, project
.getDescription());
- this.header(properties, Analyzer.BUNDLE_LICENSE, this.printLicenses(project
- .getLicenses()));
+ StringBuffer licenseText = this.printLicenses(project.getLicenses());
+ if (licenseText != null) {
+ this.header(properties, Analyzer.BUNDLE_LICENSE, licenseText);
+ }
this.header(properties, Analyzer.BUNDLE_NAME, project.getName());
if (project.getOrganization() != null)