Add "product" module for production of final product deliverable (bin). Use Maven properties and filters to reduce hand-coding for jsk version.
Project: http://git-wip-us.apache.org/repos/asf/river-container/repo Commit: http://git-wip-us.apache.org/repos/asf/river-container/commit/63112350 Tree: http://git-wip-us.apache.org/repos/asf/river-container/tree/63112350 Diff: http://git-wip-us.apache.org/repos/asf/river-container/diff/63112350 Branch: refs/heads/master Commit: 63112350ce8658515dec60c8f7a77f285599a78c Parents: 6799268 Author: Greg Trasuk <gtra...@apache.org> Authored: Thu Nov 21 13:14:15 2013 -0500 Committer: Greg Trasuk <gtra...@apache.org> Committed: Thu Nov 21 13:14:15 2013 -0500 ---------------------------------------------------------------------- product/pom.xml | 2 +- product/src/assemble/product-container.xml | 9 ++------- .../src/main/root/profile/client/service-starter.cfg | 8 ++++---- reggie-module/pom.xml | 4 ++-- river-container-core/pom.xml | 6 ++++++ .../org/apache/river/container/core-config.xml | 4 ++-- .../container/classloading/VFSClassLoaderTest.java | 12 +++++++----- 7 files changed, 24 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/product/pom.xml ---------------------------------------------------------------------- diff --git a/product/pom.xml b/product/pom.xml index 7b9b441..dc1a87d 100644 --- a/product/pom.xml +++ b/product/pom.xml @@ -21,7 +21,7 @@ <dependency> <groupId>net.jini</groupId> <artifactId>jsk-policy</artifactId> - <version>2.2.1</version> + <version>${jsk-version}</version> <scope>compile</scope> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/product/src/assemble/product-container.xml ---------------------------------------------------------------------- diff --git a/product/src/assemble/product-container.xml b/product/src/assemble/product-container.xml index 98edc8e..203a622 100644 --- a/product/src/assemble/product-container.xml +++ b/product/src/assemble/product-container.xml @@ -1,7 +1,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>test-container</id> + <id>bin</id> <formats> <format>dir</format> </formats> @@ -11,6 +11,7 @@ <fileSet> <outputDirectory>/</outputDirectory> <directory>src/main/root</directory> + <filtered>true</filtered> </fileSet> </fileSets> <dependencySets> @@ -30,9 +31,6 @@ <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>*:reggie-module</include> </includes> @@ -41,9 +39,6 @@ <useProjectArtifact>false</useProjectArtifact> <outputDirectory>/profile/client/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>*:browser-module</include> </includes> http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/product/src/main/root/profile/client/service-starter.cfg ---------------------------------------------------------------------- diff --git a/product/src/main/root/profile/client/service-starter.cfg b/product/src/main/root/profile/client/service-starter.cfg index b53cc07..d62e2cc 100644 --- a/product/src/main/root/profile/client/service-starter.cfg +++ b/product/src/main/root/profile/client/service-starter.cfg @@ -73,16 +73,16 @@ classloader { jars { commons-vfs2-2.0.jar, commons-logging-1.1.1.jar, - jsk-platform-2.2.1.jar, - jsk-lib-2.2.1.jar, - jsk-resources-2.2.1.jar, + jsk-platform-${jsk-version}.jar, + jsk-lib-${jsk-version}.jar, + jsk-resources-${jsk-version}.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-2.2.1.jar} + codebase {jsk-dl-${jsk-version}.jar} } configuration { http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/reggie-module/pom.xml ---------------------------------------------------------------------- diff --git a/reggie-module/pom.xml b/reggie-module/pom.xml index f16135e..b16a4a6 100644 --- a/reggie-module/pom.xml +++ b/reggie-module/pom.xml @@ -34,14 +34,14 @@ <dependency> <groupId>org.apache.river</groupId> <artifactId>reggie</artifactId> - <version>2.2.1</version> + <version>${jsk-version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.river</groupId> <artifactId>reggie-dl</artifactId> - <version>2.2.1</version> + <version>${jsk-version}</version> <scope>compile</scope> </dependency> http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/river-container-core/pom.xml ---------------------------------------------------------------------- diff --git a/river-container-core/pom.xml b/river-container-core/pom.xml index 4bcae73..f542c23 100644 --- a/river-container-core/pom.xml +++ b/river-container-core/pom.xml @@ -143,5 +143,11 @@ </plugins> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> </build> </project> http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/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 03a333d..8133ba5 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 @@ -50,8 +50,8 @@ 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/jsk-platform-${jsk-version}.jar + lib/jsk-resources-${jsk-version}.jar lib/regexp-1.3.jar </cfg:classpath> http://git-wip-us.apache.org/repos/asf/river-container/blob/63112350/river-container-core/src/test/java/org/apache/river/container/classloading/VFSClassLoaderTest.java ---------------------------------------------------------------------- diff --git a/river-container-core/src/test/java/org/apache/river/container/classloading/VFSClassLoaderTest.java b/river-container-core/src/test/java/org/apache/river/container/classloading/VFSClassLoaderTest.java index 57586e7..f4c8946 100644 --- a/river-container-core/src/test/java/org/apache/river/container/classloading/VFSClassLoaderTest.java +++ b/river-container-core/src/test/java/org/apache/river/container/classloading/VFSClassLoaderTest.java @@ -40,6 +40,8 @@ import static org.junit.Assert.*; */ public class VFSClassLoaderTest { + private static String JSK_VERSION="2.2.2"; + FileSystemManager fileSystemManager = null; FileObject reggieModuleRoot = null; FileObject libRoot=null; @@ -113,7 +115,7 @@ public class VFSClassLoaderTest { public void testClassLoaderResourceLoading() throws Exception { VirtualFileSystemClassLoader UUT = new VirtualFileSystemClassLoader(libRoot, extensionLoader, null); - UUT.addClassPathEntry("reggie-2.2.1.jar"); + UUT.addClassPathEntry("reggie-" + JSK_VERSION + ".jar"); InputStream is = UUT.getResourceAsStream("META-INF/PREFERRED.LIST"); assertNotNull("Failed to get resource stream for META-INF/PREFERRED.LIST", is); @@ -132,7 +134,7 @@ public class VFSClassLoaderTest { public void testClassLoading() throws Exception { VirtualFileSystemClassLoader UUT = new VirtualFileSystemClassLoader(libRoot, extensionLoader, null); - UUT.addClassPathEntry("reggie-2.2.1.jar"); + UUT.addClassPathEntry("reggie-" + JSK_VERSION + ".jar"); Class c = UUT.loadClass("com.sun.jini.reggie.ClassMapper"); assertNotNull(c); assertTrue("Class had wrong classloader:" + c.getClassLoader(), @@ -149,7 +151,7 @@ public class VFSClassLoaderTest { public void testParentClassLoading() throws Exception { VirtualFileSystemClassLoader UUT = new VirtualFileSystemClassLoader(libRoot, extensionLoader, null); - UUT.addClassPathEntry("reggie-2.2.1.jar"); + UUT.addClassPathEntry("reggie-" + JSK_VERSION + ".jar"); Class c = UUT.loadClass("java.util.List"); assertNotNull(c); assertTrue("Class had wrong classloader:" + c.getClassLoader(), @@ -161,7 +163,7 @@ public class VFSClassLoaderTest { public void testCodebaseAnnotation() throws Exception { VirtualFileSystemClassLoader UUT = new VirtualFileSystemClassLoader(libRoot, extensionLoader, null); - UUT.addClassPathEntry("reggie-2.2.1.jar"); + UUT.addClassPathEntry("reggie-" + JSK_VERSION + ".jar"); /* At this point, there should be no urls on the reported codebase. */ URL[] actual=UUT.getURLs(); assertTrue("Should be no urls, but got " + Utils.format(actual), @@ -189,7 +191,7 @@ public class VFSClassLoaderTest { public void testFilteredClassLoading() throws Exception { VirtualFileSystemClassLoader UUT = new VirtualFileSystemClassLoader(libRoot, extensionLoader, null); - UUT.addClassPathEntry("reggie-2.2.1.jar(com.sun.jini.reggie.ClassMapper)"); + UUT.addClassPathEntry("reggie-" + JSK_VERSION + ".jar(com.sun.jini.reggie.ClassMapper)"); /* We should now be able to load the ClassMapper class, but nothing else. */