SLING-6411 Upgrade Karaf to 4.1

use Karaf 4.1.0-SNAPSHOT

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1774882 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 73b94e5..761ac5e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,9 +38,10 @@
   <!-- https://github.com/apache/karaf/blob/master/assemblies/apache-karaf/pom.xml -->
 
   <properties>
-    <org.apache.karaf.version>4.0.5</org.apache.karaf.version>
+    <org.apache.karaf.version>4.1.0-SNAPSHOT</org.apache.karaf.version>
+    <jna.version>4.2.2</jna.version>
     <servicemix.specs.version>2.7.0</servicemix.specs.version>
-    <xerces.version>2.11.0</xerces.version>
+    <xerces.version>2.11.0_1</xerces.version>
     <xalan.bundle.version>2.7.2_3</xalan.bundle.version>
     <xalan-serializer.bundle.version>2.7.2_1</xalan-serializer.bundle.version>
   </properties>
@@ -417,8 +418,7 @@
             <feature>webconsole</feature>
           </bootFeatures>
           <libraries>
-            <library>xerces-${xerces.version}.jar;url:="wrap:mvn:xerces/xercesImpl/${xerces.version}$Export-Package=org.apache.*;version=${xerces.version}";type:=endorsed;export:=true;delegate:=true</library>
-
+            <library>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/${xerces.version};type:=endorsed;export:=true;delegate:=true</library>
             <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.4/${servicemix.specs.version};type:=endorsed;export:=true</library>
             <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix.specs.version};type:=endorsed;export:=true</library>
             <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/${servicemix.specs.version};type:=endorsed;export:=true</library>
@@ -431,7 +431,11 @@
 
             <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activator/${servicemix.specs.version};type:=default;export:=true</library>
             <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.locator/${servicemix.specs.version};type:=default;export:=true</library>
+
+            <library>mvn:net.java.dev.jna/jna/${jna.version};type:=boot;export:=false</library>
+            <library>mvn:net.java.dev.jna/jna-platform/${jna.version};type:=boot;export:=false</library>
           </libraries>
+          <javase>1.8</javase>
         </configuration>
       </plugin>
     </plugins>
diff --git a/src/main/resources/etc/custom.properties b/src/main/resources/etc/custom.properties
deleted file mode 100755
index 6a0831d..0000000
--- a/src/main/resources/etc/custom.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-################################################################################
-#
-#    Licensed to the Apache Software Foundation (ASF) under one or more
-#    contributor license agreements.  See the NOTICE file distributed with
-#    this work for additional information regarding copyright ownership.
-#    The ASF licenses this file to You under the Apache License, Version 2.0
-#    (the "License"); you may not use this file except in compliance with
-#    the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-################################################################################
-
-#
-# All the values specified here will override the default values given
-# in config.properties.
-#
-
-karaf.systemBundlesStartLevel=50
-
-#
-# You can place any customized configuration here.
-#
-
-felix.fileinstall.filter = .*\\.(cfg|config)
diff --git a/src/main/resources/etc/org.apache.karaf.features.cfg b/src/main/resources/etc/org.apache.karaf.features.cfg
new file mode 100755
index 0000000..bb7315c
--- /dev/null
+++ b/src/main/resources/etc/org.apache.karaf.features.cfg
@@ -0,0 +1,87 @@
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+################################################################################
+
+#
+# Comma separated list of features repositories to register by default
+#
+featuresRepositories = \
+    mvn:org.apache.sling/org.apache.sling.karaf-features/0.1.1-SNAPSHOT/xml/features, \
+    mvn:org.apache.karaf.features/framework/4.0.7/xml/features, \
+    mvn:org.apache.karaf.features/standard/4.0.7/xml/features
+
+#
+# Comma separated list of features to install at startup
+#
+featuresBoot = \
+    instance, \
+    package, \
+    log, \
+    ssh, \
+    framework, \
+    system, \
+    feature, \
+    shell, \
+    management, \
+    service, \
+    jaas, \
+    deployer, \
+    diagnostic, \
+    bundle, \
+    config, \
+    eventadmin, \
+    http, \
+    http-whiteboard, \
+    webconsole, \
+    scr
+
+#
+# Resource repositories (OBR) that the features resolver can use
+# to resolve requirements/capabilities
+#
+# The format of the resourceRepositories is
+# resourceRepositories=[xml:url|json:url],...
+# for Instance:
+#
+#resourceRepositories=xml:http://host/path/to/index.xml
+# or
+#resourceRepositories=json:http://host/path/to/index.json
+#
+
+#
+# Defines if the boot features are started in asynchronous mode (in a dedicated thread)
+#
+featuresBootAsynchronous=false
+
+#
+# Service requirements enforcement
+#
+# By default, the feature resolver checks the service requirements/capabilities of
+# bundles for new features (xml schema >= 1.3.0) in order to automatically installs
+# the required bundles.
+# The following flag can have those values:
+#   - disable: service requirements are completely ignored
+#   - default: service requirements are ignored for old features
+#   - enforce: service requirements are always verified
+#
+serviceRequirements=disable
+
+#
+# Store cfg file for config element in feature
+#
+#configCfgStore=true