FELIX-709 Make remote shell workable without a LogService provider
and reorganize Manifest Header Generation a bit

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@693945 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/shell.remote/pom.xml b/shell.remote/pom.xml
index 08c85e3..eef53ef 100644
--- a/shell.remote/pom.xml
+++ b/shell.remote/pom.xml
@@ -57,22 +57,16 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Private-Package>
-                            org.apache.felix.shell.remote.*
-                        </Private-Package>
                         <Bundle-Category>console</Bundle-Category>
                         <Bundle-Activator>
                             org.apache.felix.shell.remote.Activator
                         </Bundle-Activator>
-                        <Bundle-SymbolicName>
-                            ${pom.artifactId}
-                        </Bundle-SymbolicName>
-                        <Bundle-Vendor>
-                            The Apache Software Foundation
-                        </Bundle-Vendor>
-                        <Bundle-Copyright>
-                            Dieter Wimberger
-                        </Bundle-Copyright>
+                        <Private-Package>
+                            org.apache.felix.shell.remote.*
+                        </Private-Package>
+                        <Import-Package>
+                            org.osgi.service.log;resolution:=optional,* 
+                        </Import-Package>
                         <Import-Service>
                             org.apache.felix.shell.ShellService
                         </Import-Service>
diff --git a/shell.remote/src/main/java/org/apache/felix/shell/remote/ServiceMediator.java b/shell.remote/src/main/java/org/apache/felix/shell/remote/ServiceMediator.java
index 6ff689a..8574dcf 100644
--- a/shell.remote/src/main/java/org/apache/felix/shell/remote/ServiceMediator.java
+++ b/shell.remote/src/main/java/org/apache/felix/shell/remote/ServiceMediator.java
@@ -207,9 +207,18 @@
         //prepareDefinitions listener
         ServiceListener serviceListener = new ServiceListenerImpl();
 
-        //prepareDefinitions the filter
-        String filter = "(|(objectclass=" + ShellService.class.getName() + ")" + "(objectclass="
-            + LogService.class.getName() + "))";
+        //prepareDefinitions the filter, ShellService is required,
+        //LogService may be missing, in which case we only use the
+        // ShellService part of the filter
+        String filter = "(objectclass=" + ShellService.class.getName() + ")";
+        try
+        {
+            filter = "(|" + filter + "(objectclass=" + LogService.class.getName() + "))";
+        }
+        catch ( Throwable t )
+        {
+            // ignore
+        }
 
         try
         {