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/10/04 19:23:31 UTC
svn commit: r581972 -
/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Author: mcculls
Date: Thu Oct 4 10:23:30 2007
New Revision: 581972
URL: http://svn.apache.org/viewvc?rev=581972&view=rev
Log:
FELIX-360: recover from exceptions thrown by maven2OsgiConverter.getBundleSymbolicName
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=581972&r1=581971&r2=581972&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 Thu Oct 4 10:23:30 2007
@@ -533,12 +533,22 @@
protected Properties getDefaultProperties(MavenProject project)
{
Properties properties = new Properties();
+
+ String bsn;
+ try
+ {
+ bsn = maven2OsgiConverter.getBundleSymbolicName( project.getArtifact() );
+ }
+ catch (Exception e)
+ {
+ bsn = project.getGroupId() + "." + project.getArtifactId();
+ }
+
// Setup defaults
- String bsn = maven2OsgiConverter.getBundleSymbolicName( project.getArtifact() );
properties.put(Analyzer.BUNDLE_SYMBOLICNAME, bsn);
properties.put(Analyzer.IMPORT_PACKAGE, "*");
-
properties.put(Analyzer.BUNDLE_VERSION, project.getVersion());
+
this.header(properties, Analyzer.BUNDLE_DESCRIPTION, project
.getDescription());
StringBuffer licenseText = this.printLicenses(project.getLicenses());