river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject [13/40] git commit: Test container builds but does not yet initialize. When loading the reggie-module, it gives an exception starting up the module, because commons-vfs is not able to initialize the working directory. Yet to be investigated.
Date Mon, 13 Jan 2014 03:35:20 GMT
Test container builds but does not yet initialize.  When loading the reggie-module, it gives
an exception starting up the module, because commons-vfs is not able to initialize the working
directory.  Yet to be investigated.

Project: http://git-wip-us.apache.org/repos/asf/river-container/repo
Commit: http://git-wip-us.apache.org/repos/asf/river-container/commit/92921c39
Tree: http://git-wip-us.apache.org/repos/asf/river-container/tree/92921c39
Diff: http://git-wip-us.apache.org/repos/asf/river-container/diff/92921c39

Branch: refs/heads/master
Commit: 92921c39870e9deb5d7223fee0e7a8cae4e98054
Parents: bef344d
Author: Greg Trasuk <gtrasuk@apache.org>
Authored: Sun Aug 4 23:36:53 2013 -0400
Committer: Greg Trasuk <gtrasuk@apache.org>
Committed: Sun Aug 4 23:36:53 2013 -0400

----------------------------------------------------------------------
 reggie-module/src/assemble/module.xml           |  4 ++
 river-container-core/pom.xml                    | 23 +++++-
 .../org/apache/river/container/core-config.xml  | 75 -------------------
 .../container/deployer/StartupDeployer.java     |  2 +-
 .../liaison/VirtualFileSystemConfiguration.java |  1 +
 .../org/apache/river/container/core-config.xml  | 76 ++++++++++++++++++++
 test-container/pom.xml                          | 15 ++--
 test-container/src/assemble/test-container.xml  | 23 +++++-
 .../src/main/root/bin/logging.properties        | 61 ++++++++++++++++
 test-container/src/main/root/bin/run.sh         |  1 +
 .../root/profile/default/service-starter.cfg    | 12 ++--
 11 files changed, 199 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/reggie-module/src/assemble/module.xml
----------------------------------------------------------------------
diff --git a/reggie-module/src/assemble/module.xml b/reggie-module/src/assemble/module.xml
index d8d13ec..e1110a4 100644
--- a/reggie-module/src/assemble/module.xml
+++ b/reggie-module/src/assemble/module.xml
@@ -19,6 +19,7 @@
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    
     <id>ssar</id>
     
     <formats>
@@ -39,7 +40,9 @@
   
   </fileSets>    
   <dependencySets>
+     
         <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>/lib</outputDirectory>
             <includes>
                 <include>org.apache.river:reggie</include>
@@ -47,6 +50,7 @@
         </dependencySet>
         
         <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>/lib-dl</outputDirectory>
             <includes>
                 <include>org.apache.river:reggie-dl</include>

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/river-container-core/pom.xml
----------------------------------------------------------------------
diff --git a/river-container-core/pom.xml b/river-container-core/pom.xml
index d005293..64ae443 100644
--- a/river-container-core/pom.xml
+++ b/river-container-core/pom.xml
@@ -63,7 +63,7 @@
             <groupId>org.apache.river.container</groupId>
             <artifactId>reggie-module</artifactId>
             <version>1.0-SNAPSHOT</version>
-            <classifier>ssar</classifier>
+            
             <scope>test</scope>
         </dependency>
     </dependencies>
@@ -120,7 +120,26 @@
                     </execution>
                 </executions>
             </plugin>
-     
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.outputDirectory}/schemas</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/xsd</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
    
     </build>

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/river-container-core/src/main/java/org/apache/river/container/core-config.xml
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/core-config.xml
b/river-container-core/src/main/java/org/apache/river/container/core-config.xml
deleted file mode 100644
index bb2667d..0000000
--- a/river-container-core/src/main/java/org/apache/river/container/core-config.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-    Document   : config.xml
-    Created on : December 10, 2010, 6:39 PM
-    Author     : trasukg
-    Description:
-        This is the core configuration that is processed by the
-        Bootstrap system prior to processing the profile's config.xml
-
-        Items defined in this config are subject to being overwritten by the
-        profile's config (e.g. classpath or properties settings).  As such,
-        this is a good place to set defaults.
-
-        It also gives a spot to include elements that are required in every
-        profile, for instance the AnnotatedClassDeployer and MBeanRegistrar.
--->
-
-<!--
-    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.
-
- -->
-
-<cfg:container-config  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
-   xmlns:cfg='http://river.apache.org/xml/ns/container/config/1.0'
-   xsi:schemaLocation='http://river.apache.org/xml/ns/container/config/1.0 file:/home/trasukg/development/surrogate/src/schemas/config.xsd'>
-    <!-- Dynamic policy provider needs to be available to both the container and
-    any "application" classloaders, so it needs to be in a classloader which is
-    a parent to both the container classloader and the application loaders.
-    In traditional Jini usage, jsk-policy.jar was put into the extensions directory,
-    hence was available in the "extensions" loader.  Here, we'd prefer not to 
-    require any changes to the JSDK installation directory.
-    -->
-    <cfg:classpath id="systemClassLoader">lib/jsk-policy.jar</cfg:classpath>
-    <cfg:classpath id="containerClassLoader" parent="systemClassLoader">
-        lib/RiverSurrogate.jar
-        lib/commons-logging-1.1.1.jar
-        lib/commons-vfs-1.0.jar
-        lib/jsk-platform.jar
-        lib/jsk-resources.jar
-    </cfg:classpath>
-
-    <!--cfg:component class="org.apache.river.container.ShowContextToConsole"/-->
-    <cfg:component class="org.apache.river.container.AnnotatedClassDeployer"/>
-
-    <cfg:component class="org.apache.river.container.security.SecurityInitializer"/>
-    
-    <cfg:component class="org.apache.river.container.el.ArgsParserImpl"/>
-    
-    <cfg:property name="deploymentDirectory" value="deploy"/>
-
-    <cfg:component class="org.apache.river.container.SystemClassloaderInitializer"/>
-    <cfg:component class="org.apache.river.container.CommandLineArgumentParser"/>
-    <cfg:component class="org.apache.river.container.MBeanRegistrar"/>
-    <cfg:component class="org.apache.river.container.ShutdownListener"/>
-    <cfg:component class="org.apache.river.container.FileUtilityImpl"
-        name="fileUtility"/>
-    <cfg:component class="org.apache.river.container.PropertiesFileReader"/>
-    <cfg:component class="org.apache.river.container.ProfileConfigReader"/>
-
-</cfg:container-config>

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/river-container-core/src/main/java/org/apache/river/container/deployer/StartupDeployer.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/deployer/StartupDeployer.java
b/river-container-core/src/main/java/org/apache/river/container/deployer/StartupDeployer.java
index 620ccd6..2a96978 100644
--- a/river-container-core/src/main/java/org/apache/river/container/deployer/StartupDeployer.java
+++ b/river-container-core/src/main/java/org/apache/river/container/deployer/StartupDeployer.java
@@ -109,7 +109,7 @@ public class StartupDeployer {
          */
         List<FileObject> serviceArchives =
                 Utils.findChildrenWithSuffix(deploymentDirectoryFile,
-                org.apache.river.container.Strings.SSAR);
+                org.apache.river.container.Strings.JAR);
         if (serviceArchives != null) {
             log.log(Level.FINE, MessageNames.FOUND_SERVICE_ARCHIVES,
                     new Object[]{serviceArchives.size(), deployDirectory});

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/river-container-core/src/main/java/org/apache/river/container/liaison/VirtualFileSystemConfiguration.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/liaison/VirtualFileSystemConfiguration.java
b/river-container-core/src/main/java/org/apache/river/container/liaison/VirtualFileSystemConfiguration.java
index b99a8c5..1e5c51a 100644
--- a/river-container-core/src/main/java/org/apache/river/container/liaison/VirtualFileSystemConfiguration.java
+++ b/river-container-core/src/main/java/org/apache/river/container/liaison/VirtualFileSystemConfiguration.java
@@ -75,6 +75,7 @@ public class VirtualFileSystemConfiguration
             jre platform.
              */
             log.log(Level.SEVERE, "Problem setting working directory", ex);
+            ex.printStackTrace();
             throw new RuntimeException(ex.getMessage());
         }
 

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
b/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
new file mode 100644
index 0000000..51bd2f4
--- /dev/null
+++ b/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Document   : config.xml
+    Created on : December 10, 2010, 6:39 PM
+    Author     : trasukg
+    Description:
+        This is the core configuration that is processed by the
+        Bootstrap system prior to processing the profile's config.xml
+
+        Items defined in this config are subject to being overwritten by the
+        profile's config (e.g. classpath or properties settings).  As such,
+        this is a good place to set defaults.
+
+        It also gives a spot to include elements that are required in every
+        profile, for instance the AnnotatedClassDeployer and MBeanRegistrar.
+-->
+
+<!--
+    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.
+
+ -->
+
+<cfg:container-config  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+   xmlns:cfg='http://river.apache.org/xml/ns/container/config/1.0'
+   xsi:schemaLocation='http://river.apache.org/xml/ns/container/config/1.0 file:/home/trasukg/development/surrogate/src/schemas/config.xsd'>
+    <!-- Dynamic policy provider needs to be available to both the container and
+    any "application" classloaders, so it needs to be in a classloader which is
+    a parent to both the container classloader and the application loaders.
+    In traditional Jini usage, jsk-policy.jar was put into the extensions directory,
+    hence was available in the "extensions" loader.  Here, we'd prefer not to 
+    require any changes to the JSDK installation directory.
+    -->
+    <cfg:classpath id="systemClassLoader">lib/jsk-policy-2.2.1.jar</cfg:classpath>
+    <cfg:classpath id="containerClassLoader" parent="systemClassLoader">
+        lib/river-container-core-1.0-SNAPSHOT.jar
+        lib/commons-logging-1.1.1.jar
+        lib/commons-vfs2-2.0.jar
+        lib/jsk-platform-2.2.1.jar
+        lib/jsk-resources-2.2.1.jar
+        lib/regexp-1.3.jar
+    </cfg:classpath>
+
+    <!--cfg:component class="org.apache.river.container.ShowContextToConsole"/-->
+    <cfg:component class="org.apache.river.container.AnnotatedClassDeployer"/>
+
+    <cfg:component class="org.apache.river.container.security.SecurityInitializer"/>
+    
+    <cfg:component class="org.apache.river.container.el.ArgsParserImpl"/>
+    
+    <cfg:property name="deploymentDirectory" value="deploy"/>
+
+    <cfg:component class="org.apache.river.container.SystemClassloaderInitializer"/>
+    <cfg:component class="org.apache.river.container.CommandLineArgumentParser"/>
+    <cfg:component class="org.apache.river.container.MBeanRegistrar"/>
+    <cfg:component class="org.apache.river.container.ShutdownListener"/>
+    <cfg:component class="org.apache.river.container.FileUtilityImpl"
+        name="fileUtility"/>
+    <cfg:component class="org.apache.river.container.PropertiesFileReader"/>
+    <cfg:component class="org.apache.river.container.ProfileConfigReader"/>
+
+</cfg:container-config>

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/test-container/pom.xml
----------------------------------------------------------------------
diff --git a/test-container/pom.xml b/test-container/pom.xml
index 995c784..8a8f81e 100644
--- a/test-container/pom.xml
+++ b/test-container/pom.xml
@@ -23,16 +23,17 @@
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
-        
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>  
-            <version>1.1.3</version>    
+            <groupId>net.jini</groupId>
+            <artifactId>jsk-policy</artifactId>
+            <version>2.2.1</version>
+            <scope>compile</scope>
         </dependency>
         <dependency>
-            <groupId>commons-vfs</groupId>
-            <artifactId>commons-vfs</artifactId>     
-            <version>1.0</version> 
+            <groupId>org.apache.river.container</groupId>
+            <artifactId>reggie-module</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
         </dependency>
     </dependencies>
   

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/test-container/src/assemble/test-container.xml
----------------------------------------------------------------------
diff --git a/test-container/src/assemble/test-container.xml b/test-container/src/assemble/test-container.xml
index 11b04fd..fcaea6e 100644
--- a/test-container/src/assemble/test-container.xml
+++ b/test-container/src/assemble/test-container.xml
@@ -11,14 +11,31 @@
         <fileSet>
             <outputDirectory>/</outputDirectory>
             <directory>src/main/root</directory> 
-       </fileSet>
+        </fileSet>
     </fileSets>
     <dependencySets>
         <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>/lib</outputDirectory>
+            <scope>runtime</scope>
+            <!-- It's a mystery to me how these get into the runtime dependencies in the

+            first place - Greg Trasuk
+            -->
+            <excludes>
+                <exclude>*:maven-*</exclude>
+                <exclude>*:plexus-*</exclude>
+            </excludes>
+        </dependencySet>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/profile/default/deploy</outputDirectory>
+            <scope>runtime</scope>
+            <!-- It's a mystery to me how these get into the runtime dependencies in the

+            first place - Greg Trasuk
+            -->
             <includes>
-                <include>*:*</include>
-           </includes>
+                <include>*:reggie-module</include>
+            </includes>
         </dependencySet>
     </dependencySets>
 

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/test-container/src/main/root/bin/logging.properties
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/bin/logging.properties b/test-container/src/main/root/bin/logging.properties
new file mode 100644
index 0000000..73c1b0f
--- /dev/null
+++ b/test-container/src/main/root/bin/logging.properties
@@ -0,0 +1,61 @@
+############################################################
+#  	Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.  
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler 
+# classes.  These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the INFO and above levels.
+#handlers= java.util.logging.ConsoleHandler
+
+# To also add the FileHandler, use the following line instead.
+handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = test.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+java.util.logging.SimpleFormatter.format=%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s
%4$s: %5$s%n
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = FINER
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.river.container.level = FINER
+
+org.apache.river.container.ShowContextToConsole.level=INFO
+
+net.jini.config.level=INFO
+org.apache.river.container.security.ContainerCodePolicy.level=INFO
+org.apache.river.container.deployer.ClasspathFilterBuilder.level=INFO
+org.apache.river.container.deployer.DeployerConfigParser=INFO
+net.jini.config.level=INFO

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/test-container/src/main/root/bin/run.sh
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/bin/run.sh b/test-container/src/main/root/bin/run.sh
new file mode 100644
index 0000000..84e8fce
--- /dev/null
+++ b/test-container/src/main/root/bin/run.sh
@@ -0,0 +1 @@
+java -classpath lib/river-container-core-*.jar  -Djava.util.logging.config.file=bin/logging.properties
-Dcom.sun.management.jmxremote org.apache.river.container.Bootstrap $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/92921c39/test-container/src/main/root/profile/default/service-starter.cfg
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/default/service-starter.cfg b/test-container/src/main/root/profile/default/service-starter.cfg
index 7c6cff7..79dddbf 100644
--- a/test-container/src/main/root/profile/default/service-starter.cfg
+++ b/test-container/src/main/root/profile/default/service-starter.cfg
@@ -59,18 +59,18 @@ classloader {
     parent systemClassLoader;
 
     jars {
-        commons-vfs-1.0.jar,
+        commons-vfs2-2.0.jar,
         commons-logging-1.1.1.jar,
-        jsk-platform.jar,
-        jsk-lib.jar,
-        jsk-resources.jar,
-        RiverSurrogate.jar(org.apache.river.container.liaison.Strings,
+        jsk-platform-2.2.1.jar,
+        jsk-lib-2.2.1.jar,
+        jsk-resources-2.2.1.jar,
+        river-container-core-1.0-SNAPSHOT.jar(org.apache.river.container.liaison.Strings,
             org.apache.river.container.liaison.VirtualFileSystemConfiguration, 
             org.apache.river.container.liaison.VirtualFileSystemConfiguration$MyConfigurationFile,

             "META-INF/services/*")
     }
 
-    codebase {jsk-dl.jar}
+    codebase {jsk-dl-2.2.1.jar}
 }
 
 configuration {


Mime
View raw message