felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbenn...@apache.org
Subject svn commit: r240355 - in /incubator/felix/trunk/tools/maven2/maven-osgi-plugin: pom.xml src/main/java/org/apache/felix/tools/maven/plugin/OsgiJarMojo.java src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
Date Fri, 26 Aug 2005 22:15:45 GMT
Author: tbennett
Date: Fri Aug 26 15:15:39 2005
New Revision: 240355

URL: http://svn.apache.org/viewcvs?rev=240355&view=rev
Log:
Added auto population of Bundle-Version manifest entry.
Added support for Import-Package manifest entry.

Modified:
    incubator/felix/trunk/tools/maven2/maven-osgi-plugin/pom.xml
    incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiJarMojo.java
    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/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/maven-osgi-plugin/pom.xml?rev=240355&r1=240354&r2=240355&view=diff
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-osgi-plugin/pom.xml (original)
+++ incubator/felix/trunk/tools/maven2/maven-osgi-plugin/pom.xml Fri Aug 26 15:15:39 2005
@@ -4,7 +4,7 @@
   <artifactId>maven-osgi-plugin</artifactId>
   <packaging>maven-plugin</packaging>
   <name>Maven OSGi Plugin</name>
-  <version>0.1</version>
+  <version>0.1.1</version>
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>

Modified: incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiJarMojo.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiJarMojo.java?rev=240355&r1=240354&r2=240355&view=diff
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiJarMojo.java
(original)
+++ incubator/felix/trunk/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiJarMojo.java
Fri Aug 26 15:15:39 2005
@@ -32,7 +32,7 @@
 
 /**
  * @author <a href="tbennett@apache.org">Timothy Bennett</a>
- * @goal felix-jar
+ * @goal osgi-jar
  * @phase package
  * @requiresDependencyResolution runtime
  * @description build a OSGi bundle jar
@@ -89,7 +89,7 @@
      * @todo Add license files in META-INF directory.
      */
     public void execute() throws MojoExecutionException {
-        File jarFile = new File(basedir, finalName + ".jar");
+        File jarFile = new File(basedir, finalName + "-bundle.jar");
 
         MavenArchiver archiver = new MavenArchiver();
         archiver.setOutputFile(jarFile);
@@ -158,6 +158,9 @@
             archive.addManifestEntry("Bundle-ClassPath", bundleClasspath.toString());
         }
         bundleClasspath = null;
+
+        // auto-set the bundle version...
+        archive.addManifestEntry("Bundle-Version", project.getVersion());
 
         // create the target bundle archive...
         try {

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=240355&r1=240354&r2=240355&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
Fri Aug 26 15:15:39 2005
@@ -31,11 +31,12 @@
     private String bundleName;
     private String bundleDescription;
     private String bundleVendor;
-    private String bundleVersion;
+    //private String bundleVersion;
     //private String bundleClassPath;
     private String bundleDate;
     private String bundleUpdateLocation;
     private String exportPackage;
+    private String importPackage;
     private String metadataLocation;
     private Hashtable entries = new Hashtable();
 
@@ -52,12 +53,17 @@
         if (getBundleVendor() != null) {
             entries.put("Bundle-Vendor", getBundleVendor());
         }
+        /*
         if (getBundleVersion() != null) {
             entries.put("Bundle-Version", getBundleVersion());
         }
+        */
         if (getExportPackage() != null) {
             entries.put("Export-Package", getExportPackage());
         }
+        if (getImportPackage() != null) {
+            entries.put("Import-Package", getImportPackage());
+        }
         /*
         if (getBundleClassPath() != null) {
             entries.put("Bundle-ClassPath", getBundleClassPath());
@@ -106,7 +112,7 @@
     public void setBundleVendor(String bundleVendor) {
         this.bundleVendor = bundleVendor;
     }
-
+/*
     public String getBundleVersion() {
         return bundleVersion;
     }
@@ -114,7 +120,7 @@
     public void setBundleVersion(String bundleVersion) {
         this.bundleVersion = bundleVersion;
     }
-
+*/
     public String getExportPackage() {
         return exportPackage;
     }
@@ -122,6 +128,15 @@
     public void setExportPackage(String exportPackage) {
         this.exportPackage = exportPackage;
     }
+
+    public String getImportPackage() {
+        return importPackage;
+    }
+
+    public void setImportPackage(String importPackage) {
+        this.importPackage = importPackage;
+    }
+
 /*
     public String getBundleClassPath() {
         return bundleClassPath;



Mime
View raw message