You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2010/01/29 17:23:49 UTC
svn commit: r904541 - in /incubator/cassandra/trunk: bin/cassandra.in.sh
build.xml ivy.xml lib/avro-1.2.0-dev.jar
Author: eevans
Date: Fri Jan 29 16:23:49 2010
New Revision: 904541
URL: http://svn.apache.org/viewvc?rev=904541&view=rev
Log:
avro and friends (some via ivy)
Patch by eevans
Added:
incubator/cassandra/trunk/ivy.xml
incubator/cassandra/trunk/lib/avro-1.2.0-dev.jar
Modified:
incubator/cassandra/trunk/bin/cassandra.in.sh
incubator/cassandra/trunk/build.xml
Modified: incubator/cassandra/trunk/bin/cassandra.in.sh
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/bin/cassandra.in.sh?rev=904541&r1=904540&r2=904541&view=diff
==============================================================================
--- incubator/cassandra/trunk/bin/cassandra.in.sh (original)
+++ incubator/cassandra/trunk/bin/cassandra.in.sh Fri Jan 29 16:23:49 2010
@@ -32,7 +32,7 @@
# The java classpath (required)
CLASSPATH=$CASSANDRA_CONF:$cassandra_bin
-for jar in $cassandra_home/lib/*.jar; do
+for jar in $cassandra_home/lib/*.jar $cassandra_home/build/lib/*.jar; do
CLASSPATH=$CLASSPATH:$jar
done
Modified: incubator/cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/build.xml?rev=904541&r1=904540&r2=904541&view=diff
==============================================================================
--- incubator/cassandra/trunk/build.xml (original)
+++ incubator/cassandra/trunk/build.xml Fri Jan 29 16:23:49 2010
@@ -17,7 +17,8 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-<project basedir="." default="build" name="apache-cassandra-incubating">
+<project basedir="." default="build" name="apache-cassandra-incubating"
+ xmlns:ivy="antlib:org.apache.ivy.ant">
<property environment="env"/>
<property file="build.properties" />
<property name="debuglevel" value="source,lines,vars"/>
@@ -27,6 +28,7 @@
<property name="build.src.gen-java" value="${basedir}/src/gen-java"/>
<property name="build.lib" value="${basedir}/lib"/>
<property name="build.dir" value="${basedir}/build"/>
+ <property name="build.dir.lib" value="${basedir}/build/lib"/>
<property name="build.test.dir" value="${build.dir}/test"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="javadoc.dir" value="${build.dir}/javadoc"/>
@@ -41,6 +43,9 @@
<property name="dist.dir" value="${build.dir}/dist"/>
<property name="version" value="0.5.0"/>
<property name="final.name" value="${ant.project.name}-${version}"/>
+ <property name="ivy.version" value="2.1.0" />
+ <property name="ivy.url"
+ value="http://repo2.maven.org/maven2/org/apache/ivy/ivy" />
<!-- http://cobertura.sourceforge.net/ -->
<property name="cobertura.build.dir" value="${build.dir}/cobertura"/>
@@ -49,7 +54,11 @@
<property name="cobertura.report.dir" value="${cobertura.build.dir}/report"/>
<property name="cobertura.classes.dir" value="${cobertura.build.dir}/classes"/>
<property name="cobertura.datafile" value="${cobertura.build.dir}/cobertura.ser"/>
-
+
+ <condition property="ivy.jar.exists">
+ <available file="${build.lib}/ivy-${ivy.version}.jar" />
+ </condition>
+
<!--
Add all the dependencies.
-->
@@ -59,6 +68,9 @@
<fileset dir="${build.lib}">
<include name="**/*.jar" />
</fileset>
+ <fileset dir="${build.dir.lib}">
+ <include name="**/*.jar" />
+ </fileset>
</path>
<!--
@@ -66,6 +78,7 @@
-->
<target name="init">
<mkdir dir="${build.classes}"/>
+ <mkdir dir="${build.dir.lib}"/>
<mkdir dir="${test.classes}"/>
<mkdir dir="${build.src.gen-java}"/>
</target>
@@ -96,6 +109,24 @@
</java>
</target>
+ <target name="ivy-download" unless="ivy.jar.exists">
+ <echo>Downloading Ivy...</echo>
+ <get src="${ivy.url}/${ivy.version}/ivy-${ivy.version}.jar"
+ dest="${build.dir}/lib/ivy-${ivy.version}.jar" usetimestamp="true" />
+ </target>
+
+ <target name="ivy-init" depends="ivy-download" unless="ivy.initialized">
+ <taskdef resource="org/apache/ivy/ant/antlib.xml"
+ uri="antlib:org.apache.ivy.ant"
+ classpathref="cassandra.classpath"/>
+ <property name="ivy.initialized" value="true"/>
+ </target>
+
+ <target name="ivy-retrieve" depends="ivy-download,ivy-init">
+ <ivy:retrieve type="jar" conf="default" sync="true"
+ pattern="${build.dir.lib}/[artifact]-[revision].[ext]" />
+ </target>
+
<target name="gen-thrift-java">
<echo>Generating Thrift Java code from ${basedir}/interface/cassandra.thrift ....</echo>
<exec executable="thrift" dir="${basedir}/interface">
@@ -118,7 +149,8 @@
<!--
The build target builds all the .class files
-->
- <target name="build" depends="build-subprojects,build-project"/>
+ <target name="build"
+ depends="build-subprojects,build-project,ivy-retrieve"/>
<target name="build-subprojects"/>
<target name="codecoverage" depends="cobertura-instrument,test,cobertura-report"/>
Added: incubator/cassandra/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/ivy.xml?rev=904541&view=auto
==============================================================================
--- incubator/cassandra/trunk/ivy.xml (added)
+++ incubator/cassandra/trunk/ivy.xml Fri Jan 29 16:23:49 2010
@@ -0,0 +1,30 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<ivy-module version="2.0">
+ <info organisation="apache-cassandra" module="cassandra"/>
+ <dependencies>
+ <!-- FIXME: paranamer and jackson can be dropped after we're depending
+ on avro (since it depends on them). -->
+ <dependency org="com.thoughtworks.paranamer"
+ name="paranamer-ant" rev="2.1"/>
+ <dependency org="org.codehaus.jackson"
+ name="jackson-mapper-asl" rev="1.4.0"/>
+ </dependencies>
+</ivy-module>
+
Added: incubator/cassandra/trunk/lib/avro-1.2.0-dev.jar
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/lib/avro-1.2.0-dev.jar?rev=904541&view=auto
==============================================================================
Files incubator/cassandra/trunk/lib/avro-1.2.0-dev.jar (added) and incubator/cassandra/trunk/lib/avro-1.2.0-dev.jar Fri Jan 29 16:23:49 2010 differ