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

[tor-commits] [metrics-base/master] Use Ivy for resolving external dependencies.



commit 256e6192ad0066e48c6abb0ee9ac71714c7a3a0f
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Sat Aug 3 11:54:11 2019 +0200

    Use Ivy for resolving external dependencies.
    
    With this change all depending code bases start using Ivy for
    resolving external dependencies rather than relying on files found in
    Debian stable packages. Requires installing Ivy (using `apt-get
    install ivy`, `brew install ivy`, or similar) and running `ant
    resolve`. Retrieved files are then copied to the `lib/` directory,
    except for dependencies on other metrics libraries that still need to
    be copied to the `lib/` directory manually. Current dependency
    versions resolved by Ivy are the same as in Debian stretch with few
    exceptions.
    
    Implements part of #31326.
---
 java/base.xml | 28 ++++++++++++++++++++-------
 java/ivy.xml  | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 7 deletions(-)

diff --git a/java/base.xml b/java/base.xml
index baa77f9..fc4cc6c 100644
--- a/java/base.xml
+++ b/java/base.xml
@@ -49,7 +49,7 @@
       <patternset refid="runtime" />
     </fileset>
     <fileset dir="${libs}">
-      <include name="junit4-4.12.jar"/>
+      <include name="junit-4.12.jar"/>
       <include name="hamcrest-all-1.3.jar"/>
       <include name="logback-core-1.1.9.jar" />
       <include name="logback-classic-1.1.9.jar" />
@@ -58,7 +58,13 @@
 
   <path id="checkstyle.classpath" >
     <fileset dir="${libs}">
-      <include name="checkstyle-6.17-all.jar" />
+      <include name="antlr-2.7.7.jar" />
+      <include name="antlr4-runtime-4.5.2-1.jar" />
+      <include name="checkstyle-6.17.jar" />
+      <include name="commons-beanutils-1.9.2.jar" />
+      <include name="commons-collections-3.2.1.jar" />
+      <include name="commons-logging-1.1.1.jar" />
+      <include name="guava-19.0.jar" />
     </fileset>
   </path>
 
@@ -67,11 +73,11 @@
       <include name="cobertura-2.1.1.jar" />
       <include name="slf4j-api-1.7.22.jar" />
       <include name="commons-lang3-3.5.jar" />
-      <include name="asm4-5.0.3.jar" />
-      <include name="asm4-util-5.0.3.jar" />
-      <include name="asm4-tree-5.0.3.jar" />
-      <include name="asm4-commons-5.0.3.jar" />
-      <include name="asm4-analysis-5.0.3.jar" />
+      <include name="asm-5.0.1.jar" />
+      <include name="asm-util-5.0.1.jar" />
+      <include name="asm-tree-5.0.1.jar" />
+      <include name="asm-commons-5.0.1.jar" />
+      <include name="asm-analysis-5.0.1.jar" />
       <include name="oro-2.0.8.jar" />
       <include name="logback-core-1.1.9.jar" />
       <include name="logback-classic-1.1.9.jar" />
@@ -96,6 +102,7 @@
   <target name="usage">
     <echo message="The main ant targets are:" />
     <echo message="'clean' removes all generated files." />
+    <echo message="'resolve' resolves and retrieves external dependencies with Ivy." />
     <echo message="'compile' compiles sources to ${classes}." />
     <echo message="'test' runs all tests (see ${testresult})." />
     <echo message="'docs' creates all javadoc in ${docs}." />
@@ -123,6 +130,13 @@
     <manifest file="${emptymanifest}" />
   </target>
 
+  <target name="resolve"
+          description="Resolve and retrieve external dependencies with Ivy">
+    <ivy:resolve file="${buildresources}/ivy.xml" />
+    <ivy:retrieve />
+    <ivy:report todir="${generated}/ivy" />
+  </target>
+
   <target name="compile"
           depends="init">
     <javac destdir="${classes}"
diff --git a/java/ivy.xml b/java/ivy.xml
new file mode 100644
index 0000000..79ce408
--- /dev/null
+++ b/java/ivy.xml
@@ -0,0 +1,62 @@
+<ivy-module version="2.0">
+
+  <info organisation="org.torproject" module="metrics" />
+
+  <dependencies>
+
+    <!-- Common dependencies for all metrics codebases. -->
+    <dependency org="ch.qos.logback" name="logback-classic" rev="1.1.9" />
+    <dependency org="ch.qos.logback" name="logback-core" rev="1.1.9" />
+    <dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="2.8.6" />
+    <dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="2.8.6" />
+    <dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.8.6" />
+    <dependency org="commons-codec" name="commons-codec" rev="1.10" />
+    <dependency org="org.apache.commons" name="commons-compress" rev="1.13" />
+    <dependency org="org.apache.commons" name="commons-lang3" rev="3.5" />
+    <dependency org="org.apache.commons" name="commons-math3" rev="3.6.1" />
+
+    <!-- Unit test and test coverage dependencies. -->
+    <dependency org="junit" name="junit" rev="4.12" />
+    <dependency org="org.hamcrest" name="hamcrest-all" rev="1.3" />
+
+    <!-- Development tools dependencies that are optional for the build. -->
+    <dependency org="com.puppycrawl.tools" name="checkstyle" rev="6.17" />
+    <dependency org="net.sourceforge.cobertura" name="cobertura" rev="2.1.1" />
+
+    <!-- Metrics website and web-specific ExoneraTor dependencies. -->
+    <dependency org="javax.servlet" name="javax.servlet-api" rev="3.1.0" />
+    <dependency org="org.apache.taglibs" name="taglibs-standard-impl" rev="1.2.5" />
+    <dependency org="org.apache.taglibs" name="taglibs-standard-spec" rev="1.2.5" />
+    <dependency org="org.apache.tomcat.embed" name="tomcat-embed-core" rev="8.5.14" />
+    <dependency org="org.apache.tomcat.embed" name="tomcat-embed-el" rev="8.5.14" />
+    <dependency org="org.apache.tomcat.embed" name="tomcat-embed-jasper" rev="8.5.14" />
+    <dependency org="org.eclipse.jetty" name="apache-jsp" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-annotations" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-continuation" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-http" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-io" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-jndi" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-plus" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-security" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-server" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-servlet" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-util" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-webapp" rev="9.2.21.v20170120" />
+    <dependency org="org.eclipse.jetty" name="jetty-xml" rev="9.2.21.v20170120" />
+    <dependency org="org.rosuda.REngine" name="REngine" rev="2.1.0" />
+    <dependency org="org.rosuda.REngine" name="Rserve" rev="1.8.1" />
+
+    <!-- Database dependencies. -->
+    <dependency org="org.postgresql" name="postgresql" rev="9.4.1212" />
+
+    <!-- Exclude all source or javadoc artifacts. -->
+    <exclude org="*" ext="*" type="source" />
+    <exclude org="*" ext="*" type="javadoc" />
+
+    <!-- Exclude a Cobertura dependency that is not available (anymore?). -->
+    <exclude org="com.sun" module="tools" />
+
+  </dependencies>
+
+</ivy-module>
+

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