felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r390787 - /incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
Date Sun, 02 Apr 2006 06:30:01 GMT
Author: erodriguez
Date: Sat Apr  1 22:29:59 2006
New Revision: 390787

URL: http://svn.apache.org/viewcvs?rev=390787&view=rev
Log:
Added support for all OSGi R4 framework manifest headers not already supported by POM configuration
(FELIXM2-6)
o  bundleCopyright
o  bundleNativeCode
o  bundleVersion
o  bundleContactAddress
o  bundleRequiredExecutionEnvironment
o  bundleLocalization
o  requireBundle
o  fragmentHost
o  bundleManifestVersion

Modified:
    incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java

Modified: incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java?rev=390787&r1=390786&r2=390787&view=diff
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
(original)
+++ incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
Sat Apr  1 22:29:59 2006
@@ -17,10 +17,8 @@
 
 package org.apache.felix.tools.maven.plugin;
 
-
 import java.util.Properties;
 
-
 /**
  * Hold values for an OSGi jar "bundle" manifest.
  * 
@@ -29,126 +27,208 @@
  */
 public class OsgiManifest
 {
-    private String bundleActivator;
-    private String bundleName;
-    private String bundleSource;
-    private String bundleDescription;
-    private String bundleVendor;
-    private String bundleDate;
-    private String bundleUpdateLocation;
-    private String bundleSymbolicName;
-    private String bundleDocUrl;
+    /**
+     * Bundle manifest header constants from the OSGi R4 framework constants.
+     */
+    private static final String BUNDLE_CATEGORY = "Bundle-Category";
+    // private static final String BUNDLE_CLASSPATH = "Bundle-ClassPath";
+    private static final String BUNDLE_COPYRIGHT = "Bundle-Copyright";
+    private static final String BUNDLE_DESCRIPTION = "Bundle-Description";
+    private static final String BUNDLE_NAME = "Bundle-Name";
+    private static final String BUNDLE_NATIVECODE = "Bundle-NativeCode";
+    private static final String EXPORT_PACKAGE = "Export-Package";
+    private static final String EXPORT_SERVICE = "Export-Service";
+    private static final String IMPORT_PACKAGE = "Import-Package";
+    private static final String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package";
+    private static final String IMPORT_SERVICE = "Import-Service";
+    private static final String BUNDLE_VENDOR = "Bundle-Vendor";
+    private static final String BUNDLE_VERSION = "Bundle-Version";
+    private static final String BUNDLE_DOCURL = "Bundle-DocURL";
+    private static final String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress";
+    private static final String BUNDLE_ACTIVATOR = "Bundle-Activator";
+    private static final String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation";
+    private static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
+    private static final String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
+    private static final String BUNDLE_LOCALIZATION = "Bundle-Localization";
+    private static final String REQUIRE_BUNDLE = "Require-Bundle";
+    private static final String FRAGMENT_HOST = "Fragment-Host";
+    private static final String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion";
+
+    private static final String BUNDLE_SOURCE = "Bundle-Source";
+    private static final String BUNDLE_DATE = "Bundle-Date";
+    private static final String METADATA_LOCATION = "Metadata-Location";
+
+    /**
+     * Instance variables corresponding to the R4 framework manifest headers
+     */
     private String bundleCategory;
-    private String importService;
-    private String exportService;
+    // private String bundleClassPath;
+    private String bundleCopyright;
+    private String bundleDescription;
+    private String bundleName;
+    private String bundleNativeCode;
     private String exportPackage;
+    private String exportService;
     private String importPackage;
     private String dynamicImportPackage;
-    private String metadataLocation;
+    private String importService;
+    private String bundleVendor;
+    private String bundleVersion;
+    private String bundleDocUrl;
+    private String bundleContactAddress;
+    private String bundleActivator;
+    private String bundleUpdateLocation;
+    private String bundleRequiredExecutionEnvironment;
+    private String bundleSymbolicName;
+    private String bundleLocalization;
+    private String requireBundle;
+    private String fragmentHost;
+    private String bundleManifestVersion;
 
-    // private String bundleClasspath;
+    /**
+     * Instance variables supporting non-framework manifest headers
+     */
+    private String bundleSource;
+    private String bundleDate;
+    private String metadataLocation;
 
     private Properties entries = new Properties();
 
     public Properties getEntries()
     {
-        if ( getBundleActivator() != null )
+        if ( getBundleCategory() != null )
         {
-            entries.put( "Bundle-Activator", getBundleActivator() );
+            entries.put( BUNDLE_CATEGORY, getBundleCategory() );
         }
 
-        if ( getBundleName() != null )
+        /*
+         if (getBundleClassPath() != null)
+         {
+         entries.put(BUNDLE_CLASSPATH, getBundleClassPath());
+         }
+         */
+
+        if ( getBundleCopyright() != null )
         {
-            entries.put( "Bundle-Name", getBundleName() );
+            entries.put( BUNDLE_COPYRIGHT, getBundleCopyright() );
         }
 
         if ( getBundleDescription() != null )
         {
-            entries.put( "Bundle-Description", getBundleDescription() );
+            entries.put( BUNDLE_DESCRIPTION, getBundleDescription() );
         }
 
-        if ( getBundleVendor() != null )
+        if ( getBundleName() != null )
         {
-            entries.put( "Bundle-Vendor", getBundleVendor() );
+            entries.put( BUNDLE_NAME, getBundleName() );
         }
 
-        if ( getExportService() != null )
+        if ( getBundleNativeCode() != null )
         {
-            entries.put( "Export-Service", getExportService() );
+            entries.put( BUNDLE_NATIVECODE, getBundleNativeCode() );
         }
 
-        if ( getImportService() != null )
+        if ( getExportPackage() != null )
         {
-            entries.put( "Import-Service", getImportService() );
+            entries.put( EXPORT_PACKAGE, getExportPackage() );
         }
 
-        if ( getExportPackage() != null )
+        if ( getExportService() != null )
         {
-            entries.put( "Export-Package", getExportPackage() );
+            entries.put( EXPORT_SERVICE, getExportService() );
         }
 
         if ( getImportPackage() != null )
         {
-            entries.put( "Import-Package", getImportPackage() );
+            entries.put( IMPORT_PACKAGE, getImportPackage() );
         }
 
         if ( getDynamicImportPackage() != null )
         {
-            entries.put( "DynamicImport-Package", getDynamicImportPackage() );
+            entries.put( DYNAMICIMPORT_PACKAGE, getDynamicImportPackage() );
         }
 
-        /*
-         if (getBundleClassPath() != null) {
-         entries.put("Bundle-Classpath", getBundleClassPath());
-         }
-         */
+        if ( getImportService() != null )
+        {
+            entries.put( IMPORT_SERVICE, getImportService() );
+        }
 
-        if ( getBundleDate() != null )
+        if ( getBundleVendor() != null )
+        {
+            entries.put( BUNDLE_VENDOR, getBundleVendor() );
+        }
+
+        if ( getBundleVersion() != null )
+        {
+            entries.put( BUNDLE_VERSION, getBundleVersion() );
+        }
+
+        if ( getBundleDocUrl() != null )
         {
-            entries.put( "Bundle-Date", getBundleDate() );
+            entries.put( BUNDLE_DOCURL, getBundleDocUrl() );
+        }
+
+        if ( getBundleContactAddress() != null )
+        {
+            entries.put( BUNDLE_CONTACTADDRESS, getBundleContactAddress() );
+        }
+
+        if ( getBundleActivator() != null )
+        {
+            entries.put( BUNDLE_ACTIVATOR, getBundleActivator() );
         }
 
         if ( getBundleUpdateLocation() != null )
         {
-            entries.put( "Bundle-UpdateLocation", getBundleUpdateLocation() );
+            entries.put( BUNDLE_UPDATELOCATION, getBundleUpdateLocation() );
+        }
+
+        if ( getBundleRequiredExecutionEnvironment() != null )
+        {
+            entries.put( BUNDLE_REQUIREDEXECUTIONENVIRONMENT, getBundleRequiredExecutionEnvironment()
);
         }
 
         if ( getBundleSymbolicName() != null )
         {
-            entries.put( "Bundle-SymbolicName", getBundleSymbolicName() );
+            entries.put( BUNDLE_SYMBOLICNAME, getBundleSymbolicName() );
         }
 
-        if ( getMetadataLocation() != null )
+        if ( getBundleLocalization() != null )
         {
-            entries.put( "Metadata-Location", getMetadataLocation() );
+            entries.put( BUNDLE_LOCALIZATION, getBundleLocalization() );
         }
 
-        if ( getBundleCategory() != null )
+        if ( getRequireBundle() != null )
         {
-            entries.put( "Bundle-Category", getBundleCategory() );
+            entries.put( REQUIRE_BUNDLE, getRequireBundle() );
         }
 
-        if ( getBundleDocUrl() != null )
+        if ( getFragmentHost() != null )
         {
-            entries.put( "Bundle-DocUrl", getBundleDocUrl() );
+            entries.put( FRAGMENT_HOST, getFragmentHost() );
         }
 
-        if ( getBundleDocUrl() != null )
+        if ( getBundleManifestVersion() != null )
         {
-            entries.put( "Bundle-Source", getBundleSource() );
+            entries.put( BUNDLE_MANIFESTVERSION, getBundleManifestVersion() );
         }
 
-        return entries;
-    }
+        if ( getBundleSource() != null )
+        {
+            entries.put( BUNDLE_SOURCE, getBundleSource() );
+        }
 
-    public String getBundleDocUrl()
-    {
-        return bundleDocUrl;
-    }
+        if ( getBundleDate() != null )
+        {
+            entries.put( BUNDLE_DATE, getBundleDate() );
+        }
 
-    public void setBundleDocUrl( String bundleDocUrl )
-    {
-        this.bundleDocUrl = bundleDocUrl;
+        if ( getMetadataLocation() != null )
+        {
+            entries.put( METADATA_LOCATION, getMetadataLocation() );
+        }
+
+        return entries;
     }
 
     public String getBundleCategory()
@@ -161,24 +241,26 @@
         this.bundleCategory = bundleCategory;
     }
 
-    public String getBundleActivator()
-    {
-        return bundleActivator;
-    }
+    /*
+     public String getBundleClasspath()
+     {
+     return bundleClasspath;
+     }
 
-    public void setBundleActivator( String bundleActivator )
-    {
-        this.bundleActivator = bundleActivator;
-    }
+     public void setBundleClasspath(String bundleClasspath)
+     {
+     this.bundleClasspath = bundleClasspath;
+     }
+     */
 
-    public String getBundleName()
+    public String getBundleCopyright()
     {
-        return bundleName;
+        return bundleCopyright;
     }
 
-    public void setBundleName( String bundleName )
+    public void setBundleCopyright( String bundleCopyright )
     {
-        this.bundleName = bundleName;
+        this.bundleCopyright = bundleCopyright;
     }
 
     public String getBundleDescription()
@@ -191,24 +273,24 @@
         this.bundleDescription = bundleDescription;
     }
 
-    public String getBundleVendor()
+    public String getBundleName()
     {
-        return bundleVendor;
+        return bundleName;
     }
 
-    public void setBundleVendor( String bundleVendor )
+    public void setBundleName( String bundleName )
     {
-        this.bundleVendor = bundleVendor;
+        this.bundleName = bundleName;
     }
 
-    public String getExportService()
+    public String getBundleNativeCode()
     {
-        return exportService;
+        return bundleNativeCode;
     }
 
-    public void setExportService( String exportService )
+    public void setBundleNativeCode( String bundleNativeCode )
     {
-        this.exportService = exportService;
+        this.bundleNativeCode = bundleNativeCode;
     }
 
     public String getExportPackage()
@@ -221,6 +303,16 @@
         this.exportPackage = exportPackage;
     }
 
+    public String getExportService()
+    {
+        return exportService;
+    }
+
+    public void setExportService( String exportService )
+    {
+        this.exportService = exportService;
+    }
+
     public String getImportPackage()
     {
         return importPackage;
@@ -236,29 +328,69 @@
         return dynamicImportPackage;
     }
 
-    public void setDynamicImportPackage( String importPackage )
+    public void setDynamicImportPackage( String dynamicImportPackage )
     {
-        dynamicImportPackage = importPackage;
+        this.dynamicImportPackage = dynamicImportPackage;
     }
 
-    /*
-     public String getBundleClasspath() {
-     return bundleClasspath;
-     }
+    public String getImportService()
+    {
+        return importService;
+    }
 
-     public void setBundleClasspath(String bundleClasspath) {
-     this.bundleClasspath = bundleClasspath;
-     }
-     */
+    public void setImportService( String importService )
+    {
+        this.importService = importService;
+    }
 
-    public String getBundleDate()
+    public String getBundleVendor()
     {
-        return bundleDate;
+        return bundleVendor;
     }
 
-    public void setBundleDate( String bundleDate )
+    public void setBundleVendor( String bundleVendor )
     {
-        this.bundleDate = bundleDate;
+        this.bundleVendor = bundleVendor;
+    }
+
+    public String getBundleVersion()
+    {
+        return bundleVersion;
+    }
+
+    public void setBundleVersion( String bundleVersion )
+    {
+        this.bundleVersion = bundleVersion;
+    }
+
+    public String getBundleDocUrl()
+    {
+        return bundleDocUrl;
+    }
+
+    public void setBundleDocUrl( String bundleDocUrl )
+    {
+        this.bundleDocUrl = bundleDocUrl;
+    }
+
+    public String getBundleContactAddress()
+    {
+        return bundleContactAddress;
+    }
+
+    public void setBundleContactAddress( String bundleContactAddress )
+    {
+        this.bundleContactAddress = bundleContactAddress;
+    }
+
+    public String getBundleActivator()
+    {
+        return bundleActivator;
+    }
+
+    public void setBundleActivator( String bundleActivator )
+    {
+        this.bundleActivator = bundleActivator;
     }
 
     public String getBundleUpdateLocation()
@@ -271,6 +403,16 @@
         this.bundleUpdateLocation = bundleUpdateLocation;
     }
 
+    public String getBundleRequiredExecutionEnvironment()
+    {
+        return bundleRequiredExecutionEnvironment;
+    }
+
+    public void setBundleRequiredExecutionEnvironment( String bundleRequiredExecutionEnvironment
)
+    {
+        this.bundleRequiredExecutionEnvironment = bundleRequiredExecutionEnvironment;
+    }
+
     public String getBundleSymbolicName()
     {
         return bundleSymbolicName;
@@ -281,19 +423,44 @@
         this.bundleSymbolicName = bundleSymbolicName;
     }
 
-    public String getMetadataLocation()
+    public String getBundleLocalization()
     {
-        return metadataLocation;
+        return bundleLocalization;
     }
 
-    public void setMetadataLocation( String metadataLocation )
+    public void setBundleLocalization( String bundleLocalization )
     {
-        this.metadataLocation = metadataLocation;
+        this.bundleLocalization = bundleLocalization;
     }
 
-    public void setBundleSource( String bundleSource )
+    public String getRequireBundle()
     {
-        this.bundleSource = bundleSource;
+        return requireBundle;
+    }
+
+    public void setRequireBundle( String requireBundle )
+    {
+        this.requireBundle = requireBundle;
+    }
+
+    public String getFragmentHost()
+    {
+        return fragmentHost;
+    }
+
+    public void setFragmentHost( String fragmentHost )
+    {
+        this.fragmentHost = fragmentHost;
+    }
+
+    public String getBundleManifestVersion()
+    {
+        return bundleManifestVersion;
+    }
+
+    public void setBundleManifestVersion( String bundleManifestVersion )
+    {
+        this.bundleManifestVersion = bundleManifestVersion;
     }
 
     public String getBundleSource()
@@ -301,13 +468,28 @@
         return bundleSource;
     }
 
-    public void setImportService( String importService )
+    public void setBundleSource( String bundleSource )
     {
-        this.importService = importService;
+        this.bundleSource = bundleSource;
     }
 
-    public String getImportService()
+    public String getBundleDate()
     {
-        return importService;
+        return bundleDate;
+    }
+
+    public void setBundleDate( String bundleDate )
+    {
+        this.bundleDate = bundleDate;
+    }
+
+    public String getMetadataLocation()
+    {
+        return metadataLocation;
+    }
+
+    public void setMetadataLocation( String metadataLocation )
+    {
+        this.metadataLocation = metadataLocation;
     }
 }



Mime
View raw message