[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-web/master] Add submodule for metrics-lib



commit 43b08532f19314394a9a34214d89cb0652607c47
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Thu Aug 22 19:03:18 2013 +0200

    Add submodule for metrics-lib
    
    Also clean up the build process a little
    
    Include required libraries while constructing ernie.war
    
    Thanks Karsten for spotting a mistake here
---
 .gitmodules                      |    3 +++
 build.xml                        |   49 ++++++++++++++++++++++++++++----------
 deps/metrics-lib                 |    1 +
 lib/commons-codec-1.4.jar        |  Bin 58160 -> 0 bytes
 lib/commons-lang-2.5.jar         |  Bin 279193 -> 0 bytes
 lib/junit-4.8.2.jar              |  Bin 237344 -> 0 bytes
 lib/postgresql-9.1-903.jdbc3.jar |  Bin 507454 -> 0 bytes
 lib/servlet-api.jar              |  Bin 97501 -> 0 bytes
 8 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..c6b6388
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "deps/metrics-lib"]
+	path = deps/metrics-lib
+	url = https://git.torproject.org/metrics-lib
diff --git a/build.xml b/build.xml
index cc3aa58..bbf0a12 100644
--- a/build.xml
+++ b/build.xml
@@ -3,7 +3,6 @@
   <!-- Define build paths. -->
   <property name="sources" value="src"/>
   <property name="classes" value="classes"/>
-  <property name="libs" value="lib"/>
   <property name="config" value="etc"/>
   <property name="webxmlfile" value="${config}/web.xml"/>
   <property name="contextxmltemplate"
@@ -12,11 +11,21 @@
   <property name="warfile" value="ernie.war"/>
   <path id="classpath">
     <pathelement path="${classes}"/>
-    <pathelement location="lib/commons-codec-1.4.jar"/>
-    <pathelement location="lib/commons-compress-1.3.jar"/>
-    <pathelement location="lib/postgresql-9.1-903.jdbc3.jar"/>
-    <pathelement location="lib/junit-4.8.2.jar"/>
-    <pathelement location="lib/descriptor.jar"/>
+    <fileset dir="/usr/share/java">
+      <include name="commons-codec.jar"/>
+      <include name="commons-compress.jar"/>
+      <include name="postgresql-jdbc3.jar"/>
+      <include name="junit4.jar"/>
+      <include name="servlet-api-3.0.jar"/>
+      <include name="commons-lang.jar"/>
+    </fileset>
+    <fileset dir="deps/metrics-lib">
+      <include name="descriptor.jar"/>
+    </fileset>
+    <fileset dir="lib">
+      <include name="REngine.jar"/>
+      <include name="RserveEngine.jar"/>
+    </fileset>
   </path>
 
   <target name="init">
@@ -24,10 +33,12 @@
     <copy file="config.template" tofile="config"/>
     <mkdir dir="${classes}"/>
   </target>
+  <target name="metrics-lib">
+    <ant dir="deps/metrics-lib"/>
+  </target>
 
   <!-- Compile all servlets and plain Java classes. -->
-  <target name="compile"
-          depends="init">
+  <target name="compile" depends="metrics-lib,init">
     <javac destdir="${classes}"
            srcdir="${sources}"
            source="1.5"
@@ -37,9 +48,7 @@
            optimize="false"
            failonerror="true"
            includeantruntime="false">
-      <classpath>
-        <fileset dir="${libs}"/>
-      </classpath>
+      <classpath refid="classpath"/>
     </javac>
   </target>
 
@@ -88,8 +97,22 @@
     <war destfile="${warfile}"
          webxml="${webxmlfile}">
       <fileset dir="web"/>
-      <lib dir="${libs}"
-           excludes="servlet-api.jar"/>
+      <lib dir="lib">
+          <include name="jstl.jar"/>
+          <include name="REngine.jar"/>
+          <include name="RserveEngine.jar"/>
+          <include name="standard.jar"/>
+      </lib>
+      <lib dir="/usr/share/java">
+          <include name="commons-codec.jar"/>
+          <include name="commons-compress.jar"/>
+          <include name="postgresql-jdbc3.jar"/>
+          <include name="junit4.jar"/>
+          <include name="commons-lang.jar"/>
+      </lib>
+      <lib dir="deps/metrics-lib">
+          <include name="descriptor.jar"/>
+      </lib>
       <classes dir="${classes}"/>
       <zipfileset dir="${config}"
                   prefix="WEB-INF/classes"
diff --git a/deps/metrics-lib b/deps/metrics-lib
new file mode 160000
index 0000000..3e60ccd
--- /dev/null
+++ b/deps/metrics-lib
@@ -0,0 +1 @@
+Subproject commit 3e60ccdaaba598cabb7281d45f9a415299b8e3e3
diff --git a/lib/commons-codec-1.4.jar b/lib/commons-codec-1.4.jar
deleted file mode 100644
index 458d432..0000000
Binary files a/lib/commons-codec-1.4.jar and /dev/null differ
diff --git a/lib/commons-lang-2.5.jar b/lib/commons-lang-2.5.jar
deleted file mode 100644
index ae491da..0000000
Binary files a/lib/commons-lang-2.5.jar and /dev/null differ
diff --git a/lib/junit-4.8.2.jar b/lib/junit-4.8.2.jar
deleted file mode 100644
index 5b4bb84..0000000
Binary files a/lib/junit-4.8.2.jar and /dev/null differ
diff --git a/lib/postgresql-9.1-903.jdbc3.jar b/lib/postgresql-9.1-903.jdbc3.jar
deleted file mode 100644
index b3cf8f3..0000000
Binary files a/lib/postgresql-9.1-903.jdbc3.jar and /dev/null differ
diff --git a/lib/servlet-api.jar b/lib/servlet-api.jar
deleted file mode 100644
index 0480f07..0000000
Binary files a/lib/servlet-api.jar and /dev/null differ

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits