Author: gtrasuk Date: Mon Dec 15 19:35:00 2014 New Revision: 1645729 URL: http://svn.apache.org/r1645729 Log: River-examples is able to run the browser successfully.
Added: river/river-examples/river-examples/trunk/home/ (with props) river/river-examples/river-examples/trunk/home/pom.xml river/river-examples/river-examples/trunk/home/src/ river/river-examples/river-examples/trunk/home/src/assembly/ river/river-examples/river-examples/trunk/home/src/assembly/home.xml river/river-examples/river-examples/trunk/home/src/main/ river/river-examples/river-examples/trunk/home/src/main/home/ river/river-examples/river-examples/trunk/home/src/main/home/browser.config river/river-examples/river-examples/trunk/home/src/main/home/security.properties river/river-examples/river-examples/trunk/home/src/main/home/server.policy - copied, changed from r1644543, river/jtsk/branches/2.2/examples/hello/config/server.policy river/river-examples/river-examples/trunk/home/src/main/home/start-browser.config - copied, changed from r1644543, river/jtsk/branches/2.2/examples/hello/config/start-reggie.config Propchange: river/river-examples/river-examples/trunk/home/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Dec 15 19:35:00 2014 @@ -0,0 +1 @@ +target Added: river/river-examples/river-examples/trunk/home/pom.xml URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/pom.xml?rev=1645729&view=auto ============================================================================== --- river/river-examples/river-examples/trunk/home/pom.xml (added) +++ river/river-examples/river-examples/trunk/home/pom.xml Mon Dec 15 19:35:00 2014 @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>river-examples</artifactId> + <groupId>org.apache.river.examples</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <groupId>org.apache.river.examples</groupId> + <artifactId>home</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>home</name> + + <dependencies> + <dependency> + <groupId>org.apache.river.examples</groupId> + <artifactId>browser</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.river.tools.rt</groupId> + <artifactId>start</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <!-- Note that the version ids for the following are in the + dependency-management block on the parent pom!. --> + <dependency> + <groupId>net.jini</groupId> + <artifactId>jsk-platform</artifactId> + </dependency> + <dependency> + <groupId>net.jini</groupId> + <artifactId>jsk-lib</artifactId> + </dependency> + <dependency> + <groupId>net.jini</groupId> + <artifactId>jsk-dl</artifactId> + </dependency> + <dependency> + <groupId>net.jini</groupId> + <artifactId>jsk-resources</artifactId> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.5.2</version> + <configuration> + <descriptors> + <descriptor>src/assembly/home.xml</descriptor> + </descriptors> + </configuration> + <executions> + <execution> + <id>make-home</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Added: river/river-examples/river-examples/trunk/home/src/assembly/home.xml URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/assembly/home.xml?rev=1645729&view=auto ============================================================================== --- river/river-examples/river-examples/trunk/home/src/assembly/home.xml (added) +++ river/river-examples/river-examples/trunk/home/src/assembly/home.xml Mon Dec 15 19:35:00 2014 @@ -0,0 +1,85 @@ +<!-- + 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. + +--> +<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>bin</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + <fileSet> + <outputDirectory>/</outputDirectory> + <directory>src/main/home</directory> + <fileMode>0644</fileMode> + <excludes> + <exclude>bin/*</exclude> + </excludes> + <filtered>true</filtered> + </fileSet> + <fileSet> + <outputDirectory>/</outputDirectory> + <directory>src/main/home</directory> + <fileMode>0744</fileMode> + <includes> + <include>bin/*</include> + </includes> + <excludes> + <exclude>bin/logging.properties</exclude> + </excludes> + <filtered>true</filtered> + </fileSet> + <fileSet> + <outputDirectory>/</outputDirectory> + <directory>src/main/home</directory> + <fileMode>0644</fileMode> + <includes> + <include>bin/logging.properties</include> + </includes> + <filtered>true</filtered> + </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>/lib-dl</outputDirectory> + <includes> + <include>*:*-dl</include> + <include>*:*-api</include> + </includes> + </dependencySet> + + </dependencySets> + +</assembly> Added: river/river-examples/river-examples/trunk/home/src/main/home/browser.config URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/browser.config?rev=1645729&view=auto ============================================================================== --- river/river-examples/river-examples/trunk/home/src/main/home/browser.config (added) +++ river/river-examples/river-examples/trunk/home/src/main/home/browser.config Mon Dec 15 19:35:00 2014 @@ -0,0 +1,44 @@ +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed 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. + */ + +import java.security.Permission; +import net.jini.constraint.BasicMethodConstraints; +import net.jini.core.constraint.InvocationConstraints; +import net.jini.jeri.BasicILFactory; +import net.jini.jeri.BasicJeriExporter; +import net.jini.jeri.tcp.TcpServerEndpoint; +import net.jini.security.BasicProxyPreparer; + +org.apache.river.examples.browser { + + serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0), + new BasicILFactory()); + + serviceInvocationConstraints=InvocationConstraints.EMPTY; + + proxyPermissions = new Permission[] { + new RuntimePermission("accessClassInPackage.com.sun.proxy"), + new java.lang.reflect.ReflectPermission("newProxyInPackage.*") + }; + + servicePreparer = + new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints), + proxyPermissions ); + + leasePreparer = + new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints), + proxyPermissions ); +} Added: river/river-examples/river-examples/trunk/home/src/main/home/security.properties URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/security.properties?rev=1645729&view=auto ============================================================================== --- river/river-examples/river-examples/trunk/home/src/main/home/security.properties (added) +++ river/river-examples/river-examples/trunk/home/src/main/home/security.properties Mon Dec 15 19:35:00 2014 @@ -0,0 +1,20 @@ +# +# 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. + +policy.provider=net.jini.security.policy.DynamicPolicyProvider +policy.url.3=server.policy + Copied: river/river-examples/river-examples/trunk/home/src/main/home/server.policy (from r1644543, river/jtsk/branches/2.2/examples/hello/config/server.policy) URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/server.policy?p2=river/river-examples/river-examples/trunk/home/src/main/home/server.policy&p1=river/jtsk/branches/2.2/examples/hello/config/server.policy&r1=1644543&r2=1645729&rev=1645729&view=diff ============================================================================== --- river/jtsk/branches/2.2/examples/hello/config/server.policy (original) +++ river/river-examples/river-examples/trunk/home/src/main/home/server.policy Mon Dec 15 19:35:00 2014 @@ -19,7 +19,7 @@ /* Security policy for non-secure server */ /* Grant all permissions to our classes */ -grant codeBase "file:..${/}..${/}lib${/}*" { +grant codeBase "file:lib${/}*" { permission java.security.AllPermission; }; Copied: river/river-examples/river-examples/trunk/home/src/main/home/start-browser.config (from r1644543, river/jtsk/branches/2.2/examples/hello/config/start-reggie.config) URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/start-browser.config?p2=river/river-examples/river-examples/trunk/home/src/main/home/start-browser.config&p1=river/jtsk/branches/2.2/examples/hello/config/start-reggie.config&r1=1644543&r2=1645729&rev=1645729&view=diff ============================================================================== --- river/jtsk/branches/2.2/examples/hello/config/start-reggie.config (original) +++ river/river-examples/river-examples/trunk/home/src/main/home/start-browser.config Mon Dec 15 19:35:00 2014 @@ -16,29 +16,23 @@ * limitations under the License. */ -/* Configuration file for starting non-secure Reggie */ +/* Configuration file for starting non-secure Browser */ import com.sun.jini.config.ConfigUtil; -import com.sun.jini.start.NonActivatableServiceDescriptor; -import com.sun.jini.start.ServiceDescriptor; +import org.apache.river.tools.rt.start.NonActivatableServiceDescriptor; +import org.apache.river.tools.rt.start.ServiceDescriptor; -com.sun.jini.start { +org.apache.river.tools.rt.start { - private static codebase = - ConfigUtil.concat( - new Object[] { - "http://", ConfigUtil.getHostName(), ":8080/reggie-dl.jar", - " ", - "http://", ConfigUtil.getHostName(), ":8080/jsk-dl.jar" } ); - private static policy = "config${/}reggie.policy"; - private static classpath = "..${/}..${/}lib${/}reggie.jar"; - private static config = "config${/}jrmp-reggie.config"; + private static policy = "server.policy"; + private static classpath = "lib${/}browser-${version}.jar"; + private static config = "browser.config"; static serviceDescriptors = new ServiceDescriptor[] { new NonActivatableServiceDescriptor( - codebase, policy, classpath, - "com.sun.jini.reggie.TransientRegistrarImpl", + "", policy, classpath, + "org.apache.river.examples.browser.Browser", new String[] { config }) }; -}//end com.sun.jini.start +}//org.apache.river.tools.rt.start