Client-profile command line admin app now exists. Files in product/root/bin now have correct file modes on Unix. 'run.sh' is renamed to 'run'. river-container-core 'core-config.xml' is updated to include the river-hsm jar in runtime classpath.
Project: http://git-wip-us.apache.org/repos/asf/river-container/repo Commit: http://git-wip-us.apache.org/repos/asf/river-container/commit/82f44f6b Tree: http://git-wip-us.apache.org/repos/asf/river-container/tree/82f44f6b Diff: http://git-wip-us.apache.org/repos/asf/river-container/diff/82f44f6b Branch: refs/heads/plugin-work Commit: 82f44f6b1c1389bd80a2da7c80b91ec3068b1b1d Parents: 3b5a40f Author: Greg Trasuk <tras...@trasuk.com> Authored: Mon Jan 20 02:15:32 2014 -0500 Committer: Greg Trasuk <tras...@trasuk.com> Committed: Mon Jan 20 02:15:32 2014 -0500 ---------------------------------------------------------------------- admin-app/pom.xml | 42 ++++++++++++ .../container/admin/app/CommandLineAdmin.java | 20 ++++++ .../river/container/admin/app/AppTest.java | 38 +++++++++++ admin-module/pom.xml | 61 ++++++++++++++++++ admin-module/src/assemble/module.xml | 67 ++++++++++++++++++++ admin-module/src/main/root/admin.config | 38 +++++++++++ admin-module/src/main/root/start.properties | 20 ++++++ pom.xml | 6 +- product/pom.xml | 6 ++ product/src/assemble/product-container.xml | 45 ++++++++++++- product/src/main/root/bin/run | 19 ++++++ product/src/main/root/bin/run.sh | 19 ------ .../org/apache/river/container/core-config.xml | 3 +- 13 files changed, 361 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-app/pom.xml ---------------------------------------------------------------------- diff --git a/admin-app/pom.xml b/admin-app/pom.xml new file mode 100644 index 0000000..8f976dc --- /dev/null +++ b/admin-app/pom.xml @@ -0,0 +1,42 @@ +<?xml version="1.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. +--> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.river.container</groupId> + <artifactId>river-container</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + <groupId>org.apache.river.container</groupId> + <artifactId>admin-app</artifactId> + <version>1.0-SNAPSHOT</version> + <name>admin-app</name> + <url>http://maven.apache.org</url> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-app/src/main/java/org/apache/river/container/admin/app/CommandLineAdmin.java ---------------------------------------------------------------------- diff --git a/admin-app/src/main/java/org/apache/river/container/admin/app/CommandLineAdmin.java b/admin-app/src/main/java/org/apache/river/container/admin/app/CommandLineAdmin.java new file mode 100644 index 0000000..ca2304e --- /dev/null +++ b/admin-app/src/main/java/org/apache/river/container/admin/app/CommandLineAdmin.java @@ -0,0 +1,20 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package org.apache.river.container.admin.app; + + + +/** + * + * @author trasukg + */ +public class CommandLineAdmin { + public static void main(String[] args) { + System.out.println("Command line admin invoked."); + System.exit(0); + } +} http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-app/src/test/java/org/apache/river/container/admin/app/AppTest.java ---------------------------------------------------------------------- diff --git a/admin-app/src/test/java/org/apache/river/container/admin/app/AppTest.java b/admin-app/src/test/java/org/apache/river/container/admin/app/AppTest.java new file mode 100644 index 0000000..dcd561b --- /dev/null +++ b/admin-app/src/test/java/org/apache/river/container/admin/app/AppTest.java @@ -0,0 +1,38 @@ +package org.apache.river.container.admin.app; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-module/pom.xml ---------------------------------------------------------------------- diff --git a/admin-module/pom.xml b/admin-module/pom.xml new file mode 100644 index 0000000..b8b1eb0 --- /dev/null +++ b/admin-module/pom.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> +<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-container</artifactId> + <groupId>org.apache.river.container</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <groupId>org.apache.river.container</groupId> + <artifactId>admin-module</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>admin-module</name> + <dependencies> + <dependency> + <groupId>org.apache.river.container</groupId> + <artifactId>admin-app</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>src/assemble/module.xml</descriptor> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + <executions> + <execution> + <id>ssar</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + + </execution> + </executions> + </plugin> + + </plugins> + </build> + +</project> http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-module/src/assemble/module.xml ---------------------------------------------------------------------- diff --git a/admin-module/src/assemble/module.xml b/admin-module/src/assemble/module.xml new file mode 100644 index 0000000..d8f36d3 --- /dev/null +++ b/admin-module/src/assemble/module.xml @@ -0,0 +1,67 @@ +<!-- + 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>ssar</id> + + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + + <fileSet> + <directory>${basedir}/src/main/root</directory> + <includes> + <include>**/**</include> + <include>*</include> + </includes> + <outputDirectory>/</outputDirectory> + </fileSet> + + </fileSets> + <dependencySets> + + <dependencySet> + <useProjectArtifact>false</useProjectArtifact> + <outputDirectory>/lib</outputDirectory> + <!-- jsk jars are already provided by the container. --> + <excludes> + <exclude>*:jsk-*</exclude> + </excludes> + </dependencySet> + + <dependencySet> + <useProjectArtifact>false</useProjectArtifact> + <outputDirectory>/lib-dl</outputDirectory> + <includes> + <include>*:*-dl</include> + <include>*:*-api</include> + </includes> + <!-- jsk jars are already provided by the container. --> + <excludes> + <exclude>*:jsk-*</exclude> + </excludes> + </dependencySet> + </dependencySets> + +</assembly> http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-module/src/main/root/admin.config ---------------------------------------------------------------------- diff --git a/admin-module/src/main/root/admin.config b/admin-module/src/main/root/admin.config new file mode 100644 index 0000000..d0dcb87 --- /dev/null +++ b/admin-module/src/main/root/admin.config @@ -0,0 +1,38 @@ +import java.security.Permission; +import net.jini.constraint.BasicMethodConstraints; +import net.jini.core.constraint.InvocationConstraints; +import net.jini.core.entry.Entry; +import net.jini.core.lookup.ServiceID; +import net.jini.discovery.LookupDiscovery; +import net.jini.jeri.BasicILFactory; +import net.jini.jeri.BasicJeriExporter; +import net.jini.jeri.tcp.TcpServerEndpoint; +import net.jini.lookup.JoinManager; +import net.jini.lookup.entry.Name; +import net.jini.security.BasicProxyPreparer; + +org.apache.river.container.examples.greeter { + + groups = new String[] {$discoveryGroup}; + + exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0), + new BasicILFactory()); + + serviceInvocationConstraints=InvocationConstraints.EMPTY; + + registrarPreparer = + new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints), + new Permission[] { new RuntimePermission("accessClassInPackage.com.sun.proxy") } ); + + static discoveryManager = + new LookupDiscovery( groups, this); + + static attributes = new Entry[] { new Name("greeter-service") }; + +} + +net.jini.lookup.JoinManager { + registrarPreparer = org.apache.river.container.examples.greeter.registrarPreparer; + registrationPreparer = org.apache.river.container.examples.greeter.registrarPreparer; + +} http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/admin-module/src/main/root/start.properties ---------------------------------------------------------------------- diff --git a/admin-module/src/main/root/start.properties b/admin-module/src/main/root/start.properties new file mode 100644 index 0000000..9e05112 --- /dev/null +++ b/admin-module/src/main/root/start.properties @@ -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. + # + +startClass=org.apache.river.container.admin.app.CommandLineAdmin +startParameters=admin.config $* http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index e70fd7d..e8ef195 100644 --- a/pom.xml +++ b/pom.xml @@ -36,8 +36,10 @@ <module>product</module> <module>transient-outrigger-module</module> <module>river-container-maven-plugin</module> - <module>river-hsm</module> - </modules> + <module>river-hsm</module> + <module>admin-app</module> + <module>admin-module</module> + </modules> <properties> <jsk-version>2.2.2</jsk-version> </properties> http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/product/pom.xml ---------------------------------------------------------------------- diff --git a/product/pom.xml b/product/pom.xml index 368ffec..992f8d7 100644 --- a/product/pom.xml +++ b/product/pom.xml @@ -64,6 +64,12 @@ <version>1.0-SNAPSHOT</version> <scope>compile</scope> </dependency> + <dependency> + <groupId>org.apache.river.container</groupId> + <artifactId>admin-module</artifactId> + <version>1.0-SNAPSHOT</version> + <scope>compile</scope> + </dependency> </dependencies> <build> http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/product/src/assemble/product-container.xml ---------------------------------------------------------------------- diff --git a/product/src/assemble/product-container.xml b/product/src/assemble/product-container.xml index 47f66ca..c1c1c56 100644 --- a/product/src/assemble/product-container.xml +++ b/product/src/assemble/product-container.xml @@ -28,7 +28,32 @@ <fileSets> <fileSet> <outputDirectory>/</outputDirectory> - <directory>src/main/root</directory> + <directory>src/main/root</directory> + <fileMode>0644</fileMode> + <excludes> + <exclude>bin/*</exclude> + </excludes> + <filtered>true</filtered> + </fileSet> + <fileSet> + <outputDirectory>/</outputDirectory> + <directory>src/main/root</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/root</directory> + <fileMode>0644</fileMode> + <includes> + <include>bin/logging.properties</include> + </includes> <filtered>true</filtered> </fileSet> </fileSets> @@ -45,6 +70,9 @@ <exclude>*:plexus-*</exclude> </excludes> </dependencySet> + + <!-- Default profile + --> <dependencySet> <useProjectArtifact>false</useProjectArtifact> <outputDirectory>/profile/default/deploy</outputDirectory> @@ -62,6 +90,21 @@ <include>*:browser-module</include> </includes> </dependencySet> + + <!-- Client Profile + --> + <dependencySet> + <useProjectArtifact>false</useProjectArtifact> + <outputDirectory>/profile/client/deploy</outputDirectory> + <scope>runtime</scope> + <includes> + <include>*:browser-module</include> + <include>*:admin-module</include> + </includes> + </dependencySet> + + <!-- Outrigger profile + --> <dependencySet> <useProjectArtifact>false</useProjectArtifact> <outputDirectory>/profile/outrigger/deploy</outputDirectory> http://git-wip-us.apache.org/repos/asf/river-container/blob/82f44f6b/product/src/main/root/bin/run ---------------------------------------------------------------------- diff --git a/product/src/main/root/bin/run b/product/src/main/root/bin/run new file mode 100644 index 0000000..a38cc95 --- /dev/null +++ b/product/src/main/root/bin/run @@ -0,0 +1,19 @@ +# +# 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. +# + +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/82f44f6b/product/src/main/root/bin/run.sh ---------------------------------------------------------------------- diff --git a/product/src/main/root/bin/run.sh b/product/src/main/root/bin/run.sh deleted file mode 100644 index a38cc95..0000000 --- a/product/src/main/root/bin/run.sh +++ /dev/null @@ -1,19 +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. -# - -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/82f44f6b/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 index 6ce4ee4..b99cd8f 100644 --- 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 @@ -47,12 +47,13 @@ --> <cfg:classpath id="systemClassLoader">lib/jsk-policy-${jsk-version}.jar</cfg:classpath> <cfg:classpath id="containerClassLoader" parent="systemClassLoader"> - lib/river-container-core-1.0-SNAPSHOT.jar + lib/river-container-core-${project.version}.jar lib/commons-logging-1.1.1.jar lib/commons-vfs2-2.0.jar lib/jsk-platform-${jsk-version}.jar lib/jsk-resources-${jsk-version}.jar lib/regexp-1.3.jar + lib/river-hsm-${project.version}.jar </cfg:classpath> <!--cfg:component class="org.apache.river.container.ShowContextToConsole"/-->