changes ...

 o added missing bundle attributes to plugin
 o changed plugin parent to point to us rather than to maven plugins pom
 o updated shell bundle to use osgi plugin instead of merging attributes 
   with the manifest file
 o fixed pom to deploy to snapshots repository



git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@383750 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.framework/pom.xml b/org.apache.felix.framework/pom.xml
index 9793fa9..84bb50e 100644
--- a/org.apache.felix.framework/pom.xml
+++ b/org.apache.felix.framework/pom.xml
@@ -14,5 +14,10 @@
       <artifactId>org.apache.felix.shell</artifactId>
       <version>${pom.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>org.osgi</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/org.apache.felix.shell/pom.xml b/org.apache.felix.shell/pom.xml
index 0f2f517..17470cf 100644
--- a/org.apache.felix.shell/pom.xml
+++ b/org.apache.felix.shell/pom.xml
@@ -5,7 +5,7 @@
     <version>0.8-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <packaging>jar</packaging>
+  <packaging>osgi-bundle</packaging>
   <name>Apache Felix Shell Service</name>
   <artifactId>org.apache.felix.shell</artifactId>
   <dependencies>
@@ -13,17 +13,29 @@
       <groupId>${pom.groupId}</groupId>
       <artifactId>org.osgi</artifactId>
       <version>${pom.version}</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>${pom.version}</version>
+        <extensions>true</extensions>
         <configuration>
-          <archive>
-            <manifestFile>src/main/resources/Manifest.mf</manifestFile>
-          </archive>
+          <osgiManifest>
+            <bundleName>ShellService</bundleName>
+            <bundleDescription>A simple command shell service for Felix (or any other OSGi framework).</bundleDescription>
+            <bundleActivator>org.apache.felix.shell.impl.Activator</bundleActivator>
+            <bundleDocUrl>http://oscar-osgi.sf.net/obr2/shell/</bundleDocUrl>
+            <bundleSource>http://oscar-osgi.sf.net/obr2/shell/org.apache.felix.shell.impl-src.jar</bundleSource>
+            <bundleSymbolicName>org.apache.felix.shell.impl</bundleSymbolicName>
+            <importPackage>org.osgi.framework, org.osgi.service.startlevel, org.osgi.service.packageadmin</importPackage>
+            <exportPackage>org.apache.felix.shell; specification-version="1.0.0", org.ungoverned.osgi.service.shell; specification-version="1.0.0"</exportPackage>
+            <exportService>org.apache.felix.shell.ShellService, org.ungoverned.osgi.service.shell.ShellService</exportService>
+            <importService>org.osgi.service.startlevel.StartLevel, org.osgi.service.packageadmin.PackageAdmin</importService>
+          </osgiManifest>
         </configuration>
       </plugin>
     </plugins>
diff --git a/org.apache.felix.shell/src/main/resources/Manifest.mf b/org.apache.felix.shell/src/main/resources/Manifest.mf
deleted file mode 100644
index e97c4a6..0000000
--- a/org.apache.felix.shell/src/main/resources/Manifest.mf
+++ /dev/null
@@ -1,20 +0,0 @@
-Bundle-Name: ShellService
-Bundle-SymbolicName: org.apache.felix.shell.impl
-Bundle-Description: A simple command shell service for Felix (or any other OSGi framework).
-Bundle-DocURL: http://oscar-osgi.sf.net/obr2/shell/
-Bundle-Source: http://oscar-osgi.sf.net/obr2/shell/org.apache.felix.shell.impl-src.jar
-Bundle-Version: 1.0.3
-Bundle-Activator: org.apache.felix.shell.impl.Activator
-Bundle-ClassPath: .
-Import-Package: 
- org.osgi.framework,
- org.osgi.service.startlevel,
- org.osgi.service.packageadmin
-Export-Package: 
- org.apache.felix.shell; specification-version="1.0.0",
- org.ungoverned.osgi.service.shell; specification-version="1.0.0"
-Export-Service: org.apache.felix.shell.ShellService,
- org.ungoverned.osgi.service.shell.ShellService
-Import-Service: org.osgi.service.startlevel.StartLevel,
- org.osgi.service.packageadmin.PackageAdmin
-
diff --git a/pom.xml b/pom.xml
index b21606d..600d0fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,10 +17,44 @@
   </modules>
 
   <repositories>
+    <!-- For snapshots (no release jars or non-apache jars)           -->
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://cvs.apache.org/maven-snapshot-repository</url>
+    </repository>
+
     <repository>
       <id>safehaus</id>
       <name>Alternate Repository for Missing Ibiblio Artifacts</name>
       <url>http://m2.safehaus.org</url>
     </repository>
   </repositories>
+
+  <distributionManagement>
+    <snapshotRepository>
+      <id>apache.snapshots</id>
+      <url>
+        scpexe://apache.org/www/cvs.apache.org/maven-snapshot-repository
+      </url>
+    </snapshotRepository>
+    <repository>
+      <name>ASF Mirrored M2 Distributions</name>
+      <id>apache.snapshots</id>
+      <url>
+        scpexe://minotaur.apache.org/www/www.apache.org/dist/maven-repository
+      </url>
+    </repository>
+  </distributionManagement>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <name>snapshot plugins</name>
+      <url>
+        scpexe://apache.org/www/cvs.apache.org/maven-snapshot-repository
+      </url>
+    </pluginRepository>
+  </pluginRepositories>
+
 </project>
diff --git a/tools/maven2/maven-osgi-plugin/pom.xml b/tools/maven2/maven-osgi-plugin/pom.xml
index 34d664e..b4f5c77 100644
--- a/tools/maven2/maven-osgi-plugin/pom.xml
+++ b/tools/maven2/maven-osgi-plugin/pom.xml
@@ -1,24 +1,29 @@
 <project>
   <parent>
-    <artifactId>maven-plugin-parent</artifactId>
-    <groupId>org.apache.maven.plugins</groupId>
-    <version>2.0</version>
+    <artifactId>felix</artifactId>
+    <groupId>org.apache.felix</groupId>
+    <version>0.8-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.felix.plugins</groupId>
   <artifactId>maven-osgi-plugin</artifactId>
   <packaging>maven-plugin</packaging>
   <name>Maven OSGi Plugin</name>
-  <version>0.3.0</version>
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
       <artifactId>maven-archiver</artifactId>
       <version>2.0</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
+      <version>1.1</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
diff --git a/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java b/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
index a0abd55..d5fd582 100644
--- a/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
+++ b/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java
@@ -30,6 +30,7 @@
 {
     private String bundleActivator;
     private String bundleName;
+    private String bundleSource;
     private String bundleDescription;
     private String bundleVendor;
     private String bundleDate;
@@ -37,6 +38,7 @@
     private String bundleSymbolicName;
     private String bundleDocUrl;
     private String bundleCategory;
+    private String importService;
     private String exportService;
     private String exportPackage;
     private String importPackage;
@@ -73,6 +75,11 @@
             entries.put( "Export-Service", getExportService() );
         }
 
+        if ( getImportService() != null )
+        {
+            entries.put( "Import-Service", getImportService() );
+        }
+
         if ( getExportPackage() != null )
         {
             entries.put( "Export-Package", getExportPackage() );
@@ -119,6 +126,11 @@
             entries.put( "Bundle-DocUrl", getBundleDocUrl() );
         }
 
+        if ( getBundleDocUrl() != null )
+        {
+            entries.put( "Bundle-Source", getBundleSource() );
+        }
+
         return entries;
     }
 
@@ -261,4 +273,24 @@
     {
         this.metadataLocation = metadataLocation;
     }
+
+    public void setBundleSource( String bundleSource )
+    {
+        this.bundleSource = bundleSource;
+    }
+
+    public String getBundleSource()
+    {
+        return bundleSource;
+    }
+
+    public void setImportService( String importService )
+    {
+        this.importService = importService;
+    }
+
+    public String getImportService()
+    {
+        return importService;
+    }
 }