commit 71843789443755a4a62b519543adc1d83eb5792c Author: iwakeh iwakeh@torproject.org Date: Mon Dec 4 11:14:26 2017 +0000
Add ant task for webstats run.
Move related sources to main src tree, delete old build.xml and shell script. --- build.xml | 11 +++++++++++ modules/webstats/.gitignore | 3 --- modules/webstats/build.xml | 20 -------------------- shared/bin/90-run-webstats-stats.sh | 10 ---------- .../resources => src/main/R/webstats}/write-RData.R | 0 .../java/org/torproject/metrics/webstats/Main.java | 0 .../main/sql/webstats}/init-webstats.sql | 0 .../org/torproject/metrics/webstats/MainTest.java | 0 8 files changed, 11 insertions(+), 33 deletions(-)
diff --git a/build.xml b/build.xml index 3095512..b793a10 100644 --- a/build.xml +++ b/build.xml @@ -109,6 +109,17 @@ <antcall target="run-java" /> </target>
+ <target name="webstats" > + <property name="module.name" value="webstats" /> + <property name="rdatadir" value="${modulebase}/${module.name}/RData" /> + <mkdir dir="${rdatadir}" /> + + <antcall target="run-java" /> + <antcall target="run-R" > + <param name="module.Rscript" value="write-RData.R" /> + </antcall> + </target> + <target name="run-rserver"> <exec executable="R" dir="${Rsources}/rserver" diff --git a/modules/webstats/.gitignore b/modules/webstats/.gitignore deleted file mode 100644 index a8e4d02..0000000 --- a/modules/webstats/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/stats/*.csv -/RData/*.RData - diff --git a/modules/webstats/build.xml b/modules/webstats/build.xml deleted file mode 100644 index 3a9f9f5..0000000 --- a/modules/webstats/build.xml +++ /dev/null @@ -1,20 +0,0 @@ -<project default="run" name="webstats" basedir="."> - - <property name="mainclass" value="org.torproject.metrics.webstats.Main"/> - - <include file="../../shared/build-base.xml" as="basetask"/> - <target name="clean" depends="basetask.clean"/> - <target name="compile" depends="basetask.compile"/> - <target name="test" depends="basetask.test"/> - <target name="run" depends="basetask.run"/> - - <path id="classpath"> - <pathelement path="${classes}"/> - <path refid="base.classpath" /> - <fileset dir="${libs}"> - <include name="postgresql-jdbc3-9.2.jar"/> - </fileset> - </path> - -</project> - diff --git a/shared/bin/90-run-webstats-stats.sh b/shared/bin/90-run-webstats-stats.sh deleted file mode 100755 index 37091b4..0000000 --- a/shared/bin/90-run-webstats-stats.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -cd modules/webstats/ - -ant run | grep "[java]" - -R --slave -f src/main/resources/write-RData.R > /dev/null 2>&1 - -cd ../../ - diff --git a/modules/webstats/src/main/resources/write-RData.R b/src/main/R/webstats/write-RData.R similarity index 100% rename from modules/webstats/src/main/resources/write-RData.R rename to src/main/R/webstats/write-RData.R diff --git a/modules/webstats/src/main/java/org/torproject/metrics/webstats/Main.java b/src/main/java/org/torproject/metrics/webstats/Main.java similarity index 100% rename from modules/webstats/src/main/java/org/torproject/metrics/webstats/Main.java rename to src/main/java/org/torproject/metrics/webstats/Main.java diff --git a/modules/webstats/src/main/resources/init-webstats.sql b/src/main/sql/webstats/init-webstats.sql similarity index 100% rename from modules/webstats/src/main/resources/init-webstats.sql rename to src/main/sql/webstats/init-webstats.sql diff --git a/modules/webstats/src/test/java/org/torproject/metrics/webstats/MainTest.java b/src/test/java/org/torproject/metrics/webstats/MainTest.java similarity index 100% rename from modules/webstats/src/test/java/org/torproject/metrics/webstats/MainTest.java rename to src/test/java/org/torproject/metrics/webstats/MainTest.java
tor-commits@lists.torproject.org