karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject git commit: [KARAF-2645] Include all etc files in created instances
Date Sat, 21 Dec 2013 12:28:10 GMT
Updated Branches:
  refs/heads/master 6650922fa -> 201b5544a


[KARAF-2645] Include all etc files in created instances


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/201b5544
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/201b5544
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/201b5544

Branch: refs/heads/master
Commit: 201b5544aa23080c0f8f88d005f89a4b663e44e0
Parents: 6650922
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Sat Dec 21 13:27:26 2013 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sat Dec 21 13:27:26 2013 +0100

----------------------------------------------------------------------
 instance/core/pom.xml                           |  2 ++
 .../core/internal/InstanceServiceImpl.java      | 28 +++++++++++++++++---
 .../core/internal/InstanceServiceImplTest.java  |  4 +--
 3 files changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/201b5544/instance/core/pom.xml
----------------------------------------------------------------------
diff --git a/instance/core/pom.xml b/instance/core/pom.xml
index 17b9894..3528b28 100644
--- a/instance/core/pom.xml
+++ b/instance/core/pom.xml
@@ -129,6 +129,8 @@
                                     <includes>
                                         <include>**/*.properties</include>
                                         <include>**/*.cfg</include>
+                                        <include>**/*.xml</include>
+                                        <include>**/*.info</include>
                                     </includes>
                                 </resource>
                                 <resource>

http://git-wip-us.apache.org/repos/asf/karaf/blob/201b5544/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
----------------------------------------------------------------------
diff --git a/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
b/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
index 55a9529..0bfd6e1 100644
--- a/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
+++ b/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
@@ -270,26 +270,46 @@ public class InstanceServiceImpl implements InstanceService {
                 mkdir(karafBase, "deploy", printOutput);
                 mkdir(karafBase, "data", printOutput);
 
+                copyResourceToDir(karafBase, "etc/all.policy", printOutput);
                 copyResourceToDir(karafBase, "etc/config.properties", printOutput);
-                copyResourceToDir(karafBase, "etc/jre.properties", printOutput);
                 copyResourceToDir(karafBase, "etc/custom.properties", printOutput);
+                copyResourceToDir(karafBase, "etc/distribution.info", printOutput);
+                copyResourceToDir(karafBase, "etc/equinox-debug.properties", printOutput);
                 copyResourceToDir(karafBase, "etc/java.util.logging.properties", printOutput);
+                copyResourceToDir(karafBase, "etc/jmx.acl.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/jmx.acl.java.lang.Memory.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/jmx.acl.org.apache.karaf.bundle.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/jmx.acl.org.apache.karaf.config.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/jmx.acl.org.apache.karaf.security.jmx.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/jmx.acl.osgi.compendium.cm.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/jre.properties", printOutput);
+                copyResourceToDir(karafBase, "etc/keys.properties", printOutput);
                 copyResourceToDir(karafBase, "etc/org.apache.felix.fileinstall-deploy.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.bundle.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.config.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.feature.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.jaas.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.kar.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.shell.cfg",
printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.command.acl.system.cfg",
printOutput);
                 copyResourceToDir(karafBase, "etc/org.apache.karaf.features.obr.cfg", printOutput);
                 copyResourceToDir(karafBase, "etc/org.apache.karaf.features.repos.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.jaas.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/org.apache.karaf.kar.cfg", printOutput);
                 copyResourceToDir(karafBase, "etc/org.apache.karaf.log.cfg", printOutput);
                 copyResourceToDir(karafBase, "etc/org.ops4j.pax.logging.cfg", printOutput);
                 copyResourceToDir(karafBase, "etc/org.ops4j.pax.url.mvn.cfg", printOutput);
+                copyResourceToDir(karafBase, "etc/regions-config.xml", printOutput);
+                copyResourceToDir(karafBase, "etc/shell.init.script", printOutput);
                 copyResourceToDir(karafBase, "etc/users.properties", printOutput);
-                copyResourceToDir(karafBase, "etc/keys.properties", printOutput);
 
                 copyResourceToDir(karafBase, FEATURES_CFG, printOutput);
                 addFeaturesFromSettings(new File(karafBase, FEATURES_CFG), settings);
 
                 // The startup.properties is now generated by the karaf maven plugin, so
                 // we use the one from the root instance instead of embedding it
-                File curbase = new File(System.getProperty("karaf.base"));
-                copy(new File(curbase, "etc/startup.properties"), new File(karafBase, "etc/startup.properties"));
+                File rootEtc = new File(System.getProperty("karaf.etc"));
+                copy(new File(rootEtc, "startup.properties"), new File(karafBase, "etc/startup.properties"));
 
                 HashMap<String, String> props = new HashMap<String, String>();
                 props.put("${SUBST-KARAF-NAME}", name);

http://git-wip-us.apache.org/repos/asf/karaf/blob/201b5544/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
----------------------------------------------------------------------
diff --git a/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
b/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
index b7853d7..9c77934 100644
--- a/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
+++ b/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
@@ -48,8 +48,8 @@ public class InstanceServiceImplTest {
     @BeforeClass
     public static void setUpClass() throws Exception {
         String buildDirectory = ClassLoader.getSystemResource("etc/startup.properties").getFile()
-                .replace("etc/startup.properties", "");
-        System.setProperty("karaf.base", buildDirectory);
+                .replace("startup.properties", "");
+        System.setProperty("karaf.etc", buildDirectory);
     }
 
     @Test


Mime
View raw message