[Remoterengine-commits] r170 - in pkg/RemoteREngine.test: . inst/java_src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 21 16:50:29 CEST 2009


Author: romain
Date: 2009-09-21 16:50:29 +0200 (Mon, 21 Sep 2009)
New Revision: 170

Modified:
   pkg/RemoteREngine.test/configure.R
   pkg/RemoteREngine.test/inst/java_src/build.xml
Log:
move some of the R logic out of the build.xml file

Modified: pkg/RemoteREngine.test/configure.R
===================================================================
--- pkg/RemoteREngine.test/configure.R	2009-09-21 14:15:34 UTC (rev 169)
+++ pkg/RemoteREngine.test/configure.R	2009-09-21 14:50:29 UTC (rev 170)
@@ -1,5 +1,45 @@
 #!/bin/env Rscript
 
+# {{{ :tabSize=2:indentSize=2:noTabs=false:folding=explicit:collapseFolds=1:
+# This file is part of the RemoteREngine project
+# 
+# The RemoteREngine project is free software: 
+# you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+# 
+# The RemoteREngine project is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with the RemoteREngine project. If not, see <http://www.gnu.org/licenses/>. 
+# }}}
+
+# {{{ generate.build.properties
+generate.build.properties <- function(  ){
+	R_PACKAGE_DIR <- Sys.getenv( "R_PACKAGE_DIR" ) 
+	testng.jar    <- file.path( R_PACKAGE_DIR, "java_src", "lib", "testng-5.10-jdk15.jar" )
+	client.jar    <- system.file( "java", "RemoteREngine-client.jar", package = "RemoteREngine" )
+	testcases.jar <- file.path( R_PACKAGE_DIR, "java", "RemoteREngine-test.jar" )
+	rmicodebase   <- paste( "file:/", system.file( "java", "RemoteREngine-client.jar", package = "RemoteREngine" ), sep = "" )
+	client.policy <- system.file( "policy", "client.policy", package = "RemoteREngine" ) 
+	server.policy <- system.file( "policy", "server.policy", package = "RemoteREngine" ) 
+	
+	cat( "\n\n\n# generated content below\n\n",
+		"testng.jar=", testng.jar, "\n", 
+		"client.jar=", client.jar, "\n", 
+		"testcases.jar=", testcases.jar, "\n", 
+		"rmicodebase=", rmicodebase, "\n", 
+		"client.policy=", client.policy, "\n" ,
+		"server.policy=", server.policy, "\n", 
+		file = "build.properties" ,	sep = "", 
+		append = TRUE )
+}			
+# }}}
+
 require( ant ) 
 
 rscript <- file.path( R.home(), "bin", "Rscript" )
@@ -8,6 +48,8 @@
 setwd( "inst/java_src" )
 
 java_src.dir <- getwd()
+generate.build.properties()
+
 ant()
 setwd(root)
 

Modified: pkg/RemoteREngine.test/inst/java_src/build.xml
===================================================================
--- pkg/RemoteREngine.test/inst/java_src/build.xml	2009-09-21 14:15:34 UTC (rev 169)
+++ pkg/RemoteREngine.test/inst/java_src/build.xml	2009-09-21 14:50:29 UTC (rev 170)
@@ -1,29 +1,42 @@
 <?xml version="1.0"?>
 <project default="all" name="RemoteREngine.test">
 
-	<property file="build.properties"/>
-	
-	<taskdef resource="testngtasks" classpath="${jdk15.testing.jar}" />
+  <!--{{{ Copyright (c) 2009, Romain Francois <francoisromain at free.fr>
   
-	<r-set property="client.jar">
-		system.file( "java", "RemoteREngine-client.jar", package = "RemoteREngine" )
-	</r-set>
-	
-	<r-set property="client.policy">
-	  system.file( "policy", "client.policy", package = "RemoteREngine" )
-	</r-set>
+ :tabSize=2:indentSize=2:noTabs=false:folding=explicit:collapseFolds=1:
+ This file is part of the RemoteREngine project
+ 
+ The RemoteREngine project is free software: 
+ you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ 
+ The RemoteREngine project is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with the RemoteREngine project. If not, see <http://www.gnu.org/licenses/>.
+}}}-->
 
-	<r-set property="server.policy">
-	  system.file( "policy", "server.policy", package = "RemoteREngine" )
-	</r-set>
-
+	<!--{{{ properties -  this file is generated by configure.R --> 
+  <property file="./build.properties"/>
+  <!--}}}-->
 	
-	
+  <!--{{{ define testng tasks -->
+	<!-- <taskdef resource="testngtasks" classpath="${testng.jar}" /> -->
+	<!--}}}-->
+  
+	<!--{{{ classpath -->
 	<path id="project.classpath">
 		<pathelement location="${client.jar}" />
 		<pathelement location="${jdk15.testing.jar}" />
 	</path>
+	<!--}}}-->
 	
+	<!--{{{ compile -->
 	<target name="compile">
 		
 		<mkdir dir="build" />
@@ -44,13 +57,17 @@
 			<classpath refid="project.classpath" />
 		</javac>
 	</target>
+	<!--}}}-->
 	          
+	<!--{{{ build -->
 	<target name="build">
 		<jar jarfile="${inst.dir}/RemoteREngine-test.jar">
 			<fileset dir="${build.dir}" />
 		</jar>
 	</target>
+	<!-- }}} -->
 	
+	<!--{{{ build standlone zip -->
 	<target name="testng-standalone">
 		<property name="dir.lib" value="../testng-standalone/lib" />
 		<property name="dir.policy" value="../testng-standalone/policy" />
@@ -70,31 +87,11 @@
 		<delete dir="../testng-standalone" />
 		
 	</target>
+	<!--}}}-->
+		
+	<!--{{{ all target -->
+ 	<target name="all" depends="compile,build,testng-standalone" />
+	<!--}}}-->
 	
-	<target name="generate-build-properties">
-			<r-run><![CDATA[
-			R_PACKAGE_DIR <- Sys.getenv( "R_PACKAGE_DIR" ) 
-			testng.jar    <- file.path( R_PACKAGE_DIR, "java_src", "lib", "testng-5.10-jdk15.jar" )
-			client.jar    <- system.file( "java", "RemoteREngine-client.jar", package = "RemoteREngine" )
-			testcases.jar <- file.path( R_PACKAGE_DIR, "java", "RemoteREngine-test.jar" )
-			rmicodebase   <- paste( "file:/", system.file( "java", "RemoteREngine-client.jar", package = "RemoteREngine" ), sep = "" )
-			client.policy <- system.file( "policy", "client.policy", package = "RemoteREngine" ) 
-			server.policy <- system.file( "policy", "server.policy", package = "RemoteREngine" ) 
-			
-			cat( 
-				"testng.jar=", testng.jar, "\n", 
-				"client.jar=", client.jar, "\n", 
-				"testcases.jar=", testcases.jar, "\n", 
-				"rmicodebase=", rmicodebase, "\n", 
-				"client.policy=", client.policy, "\n" ,
-				"server.policy=", server.policy, "\n", 
-				file = "../testng/build.properties", sep = "" )
-			]]>
-		</r-run>
-
-	</target>
-	
-	<target name="all" depends="compile,build,testng-standalone,generate-build-properties" />
-	
 </project>
 



More information about the Remoterengine-commits mailing list