Author: david.lloyd(a)jboss.com
Date: 2008-07-21 14:37:22 -0400 (Mon, 21 Jul 2008)
New Revision: 4422
Modified:
remoting3/trunk/build.properties
remoting3/trunk/build.xml
remoting3/trunk/testing-support/src/main/resources/testing.policy
Log:
Add basic protocol stuff to main build; upgrade XNIO to 1.1.0 alpha
Modified: remoting3/trunk/build.properties
===================================================================
--- remoting3/trunk/build.properties 2008-07-21 18:36:32 UTC (rev 4421)
+++ remoting3/trunk/build.properties 2008-07-21 18:37:22 UTC (rev 4422)
@@ -173,10 +173,19 @@
lib.trove.local=${local.repository}/${lib.trove.path}
lib.trove.remote=${remote.repository}/${lib.trove.path}
-lib.xnio-api.version=1.0.0.CR3
-lib.xnio-api.name=xnio-api-${lib.xnio-api.version}.jar
+lib.xnio.version=1.1.0.Alpha2008072101
+
+lib.xnio-api.name=xnio-api-${lib.xnio.version}.jar
lib.xnio-api.license=lgpl
-lib.xnio-api.dir=maven2/org/jboss/xnio/xnio-api/${lib.xnio-api.version}/
+lib.xnio-api.dir=maven2/org/jboss/xnio/xnio-api/${lib.xnio.version}
lib.xnio-api.path=${lib.xnio-api.dir}/${lib.xnio-api.name}
lib.xnio-api.local=${local.repository}/${lib.xnio-api.path}
lib.xnio-api.remote=${remote.repository}/${lib.xnio-api.path}
+
+lib.xnio-standalone.name=xnio-standalone-${lib.xnio.version}.jar
+lib.xnio-standalone.license=lgpl
+lib.xnio-standalone.dir=maven2/org/jboss/xnio/xnio-standalone/${lib.xnio.version}
+lib.xnio-standalone.path=${lib.xnio-standalone.dir}/${lib.xnio-standalone.name}
+lib.xnio-standalone.local=${local.repository}/${lib.xnio-standalone.path}
+lib.xnio-standalone.remote=${remote.repository}/${lib.xnio-standalone.path}
+
Modified: remoting3/trunk/build.xml
===================================================================
--- remoting3/trunk/build.xml 2008-07-21 18:36:32 UTC (rev 4421)
+++ remoting3/trunk/build.xml 2008-07-21 18:37:22 UTC (rev 4422)
@@ -185,7 +185,7 @@
<get src="${remote.license.dir}/${lib.sun-httpserver.license}.txt"
dest="${lib.sun-httpserver.local}.license.txt" usetimestamp="true"
ignoreerrors="false"/>
</target>
- <!-- External library: XNIO -->
+ <!-- External library: XNIO api -->
<target name="lib.xnio-api-check">
<available property="lib.xnio-api.exists"
file="${lib.xnio-api.local}"/>
@@ -197,6 +197,18 @@
<get src="${remote.license.dir}/${lib.xnio-api.license}.txt"
dest="${lib.xnio-api.local}.license.txt" usetimestamp="true"
ignoreerrors="false"/>
</target>
+ <!-- External library: XNIO standalone -->
+
+ <target name="lib.xnio-standalone-check">
+ <available property="lib.xnio-standalone.exists"
file="${lib.xnio-standalone.local}"/>
+ </target>
+
+ <target name="lib.xnio-standalone"
depends="lib.xnio-standalone-check"
unless="lib.xnio-standalone.exists">
+ <mkdir dir="${local.repository}/${lib.xnio-standalone.dir}"/>
+ <get src="${lib.xnio-standalone.remote}"
dest="${lib.xnio-standalone.local}" usetimestamp="true"
ignoreerrors="false"/>
+ <get src="${remote.license.dir}/${lib.xnio-standalone.license}.txt"
dest="${lib.xnio-standalone.local}.license.txt" usetimestamp="true"
ignoreerrors="false"/>
+ </target>
+
<!-- ============================================== -->
<!-- MODULES - Keep in alpha order by target name -->
<!-- ============================================== -->
@@ -704,6 +716,127 @@
</path>
</target>
+ <!-- protocol.basic module -->
+
+ <target name="protocol.basic.compile.depcheck">
+ <mkdir dir="protocol/basic/target/main"/>
+ <uptodate property="protocol/basic.compile.uptodate"
targetfile="protocol/basic/target/main/.lastcompile">
+ <srcfiles dir="protocol/basic/src/main/java">
+ <include name="**/"/>
+ <include name="**/*.java"/>
+ <exclude name="**/.*"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="protocol.basic.compile"
depends="protocol.basic.compile.depcheck"
unless="protocol.basic.compile.uptodate">
+ <mkdir dir="protocol/basic/target/main/classes"/>
+ <javac
+ source="${javac.source}"
+ target="${javac.target}"
+ srcdir="protocol/basic/src/main/java"
+ destdir="protocol/basic/target/main/classes"
+ debug="true">
+ <compilerarg value="-Xlint:unchecked"/>
+ <classpath>
+ <path refid="api.classpath"/>
+ <!-- TODO: marshallers should be moved to their own module -->
+ <path refid="core.classpath"/>
+ <path refid="util.classpath"/>
+ <pathelement location="${lib.xnio-api.local}"/>
+ </classpath>
+ </javac>
+ <touch file="protocol/basic/target/main/.lastcompile"
verbose="false"/>
+ </target>
+
+ <target name="protocol.basic.test.compile.depcheck">
+ <mkdir dir="protocol/basic/target/test"/>
+ <uptodate property="protocol.basic.compile.uptodate"
targetfile="protocol/basic/target/test/.lastcompile">
+ <srcfiles dir="protocol/basic/src/test/java">
+ <include name="**/"/>
+ <include name="**/*.java"/>
+ <exclude name="**/.*"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="protocol.basic.test.compile"
depends="lib.junit,protocol.basic.compile,protocol.basic.test.compile.depcheck"
unless="protocol.basic.test.compile.uptodate">
+ <mkdir dir="protocol/basic/target/test/classes"/>
+ <javac
+ source="${javac.source}"
+ target="${javac.target}"
+ srcdir="protocol/basic/src/test/java"
+ destdir="protocol/basic/target/test/classes"
+ debug="true">
+ <compilerarg value="-Xlint:unchecked"/>
+ <classpath>
+ <path refid="api.classpath"/>
+ <path refid="core.classpath"/>
+ <path refid="protocol.basic.classpath"/>
+ <path refid="util.classpath"/>
+ <path refid="testing-support.classpath"/>
+ <pathelement location="${lib.junit.local}"/>
+ <pathelement location="${lib.xnio-standalone.local}"/>
+ </classpath>
+ </javac>
+ <touch file="protocol/basic/target/test/.lastcompile"
verbose="false"/>
+ </target>
+
+ <target name="protocol.basic.test.pseudotarget">
+ <echo message="============================================="/>
+ <echo message="${message}"/>
+ <echo message="============================================="/>
+ <mkdir dir="protocol/basic/target/test-results"/>
+ <junit printsummary="true" fork="yes"
includeantruntime="true">
+ <sysproperty key="build.home" value="${basedir}"/>
+ <sysproperty key="ant.library.dir"
value="${ant.home}/lib"/>
+ <sysproperty key="lib.junit.local"
value="${lib.junit.local}"/>
+ <sysproperty key="lib.xnio-standalone.local"
value="${lib.xnio-standalone.local}"/>
+ <jvmarg line="${test.jvmargs}"/>
+ <formatter type="plain" extension="${extension}"/>
+ <classpath>
+ <path refid="api.classpath"/>
+ <path refid="core.classpath"/>
+ <path refid="protocol.basic.classpath"/>
+ <path refid="testing-support.classpath"/>
+ <path refid="util.classpath"/>
+ <pathelement
location="protocol/basic/target/test/classes"/>
+ <pathelement location="${lib.junit.local}"/>
+ <pathelement location="${lib.xnio-standalone.local}"/>
+ </classpath>
+ <batchtest fork="yes"
todir="protocol/basic/target/test-results"
+ haltonfailure="no">
+ <fileset dir="protocol/basic/target/test/classes">
+ <include name="**/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="protocol.basic.test"
depends="lib.xnio-standalone,api,core,protocol.basic,testing-support,util,protocol.basic.test.compile">
+ <antcall inheritall="true" inheritrefs="true"
target="protocol.basic.test.pseudotarget">
+ <param name="extension" value=".txt"/>
+ <param name="message" value="Running with no security
manager"/>
+ <param name="test.jvmargs" value="-Ddummy=dummy"/>
+ </antcall>
+ <antcall inheritall="true" inheritrefs="true"
target="protocol.basic.test.pseudotarget">
+ <param name="extension" value="-security.txt"/>
+ <param name="message" value="Running with security
manager"/>
+ <param name="test.jvmargs"
value="-Djava.security.manager=org.jboss.cx.remoting.test.support.LoggingSecurityManager
-Djava.security.policy=${basedir}/testing-support/src/main/resources/testing.policy
-Dsecurity.debug=policy"/>
+ </antcall>
+ </target>
+
+ <target name="protocol.basic.clean">
+ <delete dir="protocol.basic/target"/>
+ </target>
+
+ <target name="protocol.basic" description="Build the protocol.basic
module" depends="lib.xnio-api,api,core,util,protocol.basic.compile">
+ <path id="protocol.basic.classpath">
+ <pathelement location="protocol/basic/target/main/classes"/>
+ </path>
+ </target>
+
+
<!-- samples module -->
<target name="samples.compile.depcheck">
@@ -1173,7 +1306,7 @@
<!-- core -->
- <target name="all-core" description="Build all core targets"
depends="api,compat,core,mc-deployers,samples,standalone,testing-support,tools,util"/>
+ <target name="all-core" description="Build all core targets"
depends="api,compat,core,mc-deployers,protocol.basic,samples,standalone,testing-support,tools,util"/>
<target name="clean-core" description="Clean all core targets"
depends="api.clean,compat.clean,core.clean,mc-deployers.clean,samples.clean,standalone.clean,testing-support.clean,tools.clean,util.clean"/>
@@ -1197,6 +1330,6 @@
<target name="clean" description="Clean out all build files"
depends="clean-core,clean-http"/>
- <target name="test" description="Run all tests"
depends="api.test,core.test"/>
+ <target name="test" description="Run all tests"
depends="api.test,core.test,protocol.basic.test"/>
</project>
Modified: remoting3/trunk/testing-support/src/main/resources/testing.policy
===================================================================
--- remoting3/trunk/testing-support/src/main/resources/testing.policy 2008-07-21 18:36:32
UTC (rev 4421)
+++ remoting3/trunk/testing-support/src/main/resources/testing.policy 2008-07-21 18:37:22
UTC (rev 4422)
@@ -11,6 +11,24 @@
permission java.lang.RuntimePermission "modifyThread"; // for executor
control
};
+grant codeBase "file:${build.home}/protocol/basic/target/test/classes/-"
+{
+ permission java.lang.RuntimePermission "modifyThread"; // for executor
control
+ permission java.net.SocketPermission "*:*", "accept, connect,
resolve";
+};
+
+grant codeBase "file:${build.home}/protocol/basic/target/main/classes/-"
+{
+ permission java.net.SocketPermission "*:*", "accept, connect,
resolve";
+};
+
+// TODO: this is for the marshallers, which ought to be in their own module/module set
+
+grant codeBase "file:${build.home}/core/target/main/classes/-"
+{
+ permission java.io.SerializablePermission "enableSubstitution";
+};
+
// Support classes
grant codeBase "file:${build.home}/testing-support/target/main/classes/-"
@@ -37,3 +55,8 @@
{
permission java.security.AllPermission;
};
+
+grant codeBase "file:${lib.xnio-standalone.local}"
+{
+ permission java.security.AllPermission;
+};