cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r1135235 - in /cassandra/drivers/java: ./ build.properties.default build.xml
Date Mon, 13 Jun 2011 19:25:47 GMT
Author: eevans
Date: Mon Jun 13 19:25:47 2011
New Revision: 1135235

URL: http://svn.apache.org/viewvc?rev=1135235&view=rev
Log:
initial build.xml for driver builds
Patch by Rick Shaw; reviewed by eevans for CASSANDRA-2761

Added:
    cassandra/drivers/java/build.properties.default
    cassandra/drivers/java/build.xml
Modified:
    cassandra/drivers/java/   (props changed)

Propchange: cassandra/drivers/java/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jun 13 19:25:47 2011
@@ -0,0 +1,5 @@
+build
+.classpath
+.project
+.externalToolBuilders
+.settings

Added: cassandra/drivers/java/build.properties.default
URL: http://svn.apache.org/viewvc/cassandra/drivers/java/build.properties.default?rev=1135235&view=auto
==============================================================================
--- cassandra/drivers/java/build.properties.default (added)
+++ cassandra/drivers/java/build.properties.default Mon Jun 13 19:25:47 2011
@@ -0,0 +1,6 @@
+# build.properties.default
+base.version=1.0.4
+
+# These should be overridden in your own 'build.properties' file
+builder.name=Cassandra User
+cassandra.dir=../../trunk

Added: cassandra/drivers/java/build.xml
URL: http://svn.apache.org/viewvc/cassandra/drivers/java/build.xml?rev=1135235&view=auto
==============================================================================
--- cassandra/drivers/java/build.xml (added)
+++ cassandra/drivers/java/build.xml Mon Jun 13 19:25:47 2011
@@ -0,0 +1,259 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<project basedir="." default="jar" name="apache-cassandra-cql">
+  <property environment="env" />
+  <property file="build.properties" />
+  <property file="build.properties.default" />
+
+  <property name="cassandra.lib" value="${cassandra.dir}/lib" />
+  <property name="build.dir" value="${basedir}/build" />
+  <property name="build.src" value="${basedir}/src" />
+  <property name="build.test" value="${basedir}/test" />
+  <property name="build.main.classes" value="${build.dir}/main/classes" />
+  <property name="build.dir.lib" value="${cassandra.dir}/build/lib" />
+  <property name="build.test.classes" value="${build.dir}/test/classes" />
+  <property name="javadoc.dir" value="${build.dir}/javadoc" />
+  <property name="javadoc.jars.dir" value="${build.dir}/javadocs" />
+
+  <condition property="version" value="${base.version}">
+    <isset property="release" />
+  </condition>
+  <property name="version" value="${base.version}-SNAPSHOT" />
+  <property name="final.name" value="${ant.project.name}-${version}" />
+
+  <property name="debuglevel" value="source,lines,vars" />
+
+  <path id="cassandra.classes">
+    <pathelement location="${cassandra.dir}/build/classes/main" />
+    <pathelement location="${cassandra.dir}/build/classes/thrift" />
+  </path>
+
+  <path id="javadoc.classes">
+    <pathelement location="${cassandra.dir}/build/classes/main" />
+    <pathelement location="${cassandra.dir}/build/classes/thrift" />
+    <pathelement location="${build.main.classes}" />
+    <fileset dir="${cassandra.lib}">
+      <include name="**/*.jar" />
+    </fileset>
+  </path>
+
+  <path id="cassandra.test.classes">
+    <pathelement location="${cassandra.dir}/build/test/classes" />
+  </path>
+
+  <path id="main.classes">
+    <pathelement location="${build.main.classes}" />
+  </path>
+
+  <path id="test.classes">
+    <pathelement location="${build.test.classes}" />
+  </path>
+
+  <macrodef name="create-javadoc">
+    <attribute name="destdir" />
+    <element name="filesets" />
+    <sequential>
+      <javadoc destdir="@{destdir}" author="true" version="true" use="true" windowtitle="${ant.project.name}
API" classpathref="javadoc.classes" bottom="Copyright &amp;copy; ${YEAR} The Apache Software
Foundation" useexternalfile="yes" maxmemory="256m">
+        <filesets />
+      </javadoc>
+    </sequential>
+  </macrodef>
+
+  <target name="clean">
+    <delete dir="${build.dir}" />
+  </target>
+
+  <target name="init">
+    <mkdir dir="${build.main.classes}" />
+    <mkdir dir="${build.test.classes}" />
+  </target>
+
+  <target depends="init" name="build">
+    <echo message="${ant.project.name}: ${ant.file}" />
+    <javac debug="true" debuglevel="${debuglevel}"
+           destdir="${build.main.classes}" includeantruntime="false">
+      <src path="${build.src}" />
+      <classpath>
+        <path refid="cassandra.classes" />
+        <path>
+          <fileset dir="${cassandra.lib}">
+            <include name="**/*.jar" />
+          </fileset>
+        </path>
+      </classpath>
+    </javac>
+  </target>
+
+  <target depends="init,build" name="build-test">
+    <javac debug="true" debuglevel="${debuglevel}"
+           destdir="${build.test.classes}" includeantruntime="false">
+      <src path="${build.test}" />
+      <classpath>
+        <path refid="cassandra.classes" />
+        <path refid="cassandra.test.classes" />
+        <path refid="main.classes" />
+        <path>
+          <fileset dir="${cassandra.lib}">
+            <include name="**/*.jar" />
+          </fileset>
+        </path>
+        <path>
+          <fileset dir="${build.dir.lib}">
+            <include name="**/*.jar" />
+          </fileset>
+        </path>
+      </classpath>
+    </javac>
+  </target>
+
+  <target name="jar" depends="build">
+    <manifest file="${build.dir}/MANIFEST.MF">
+      <attribute name="Built-By" value="${builder.name}" />
+    </manifest>
+
+    <mkdir dir="${build.main.classes}/META-INF" />
+
+    <jar destfile="${build.dir}/${final.name}.jar" manifest="${build.dir}/MANIFEST.MF">
+      <fileset dir="${build.main.classes}" />
+    </jar>
+  </target>
+
+  <target name="javadoc" depends="init" description="Create javadoc">
+    <create-javadoc destdir="${javadoc.dir}">
+      <filesets>
+        <fileset dir="${build.src}" defaultexcludes="yes">
+          <include name="org/apache/**/*.java" />
+        </fileset>
+      </filesets>
+    </create-javadoc>
+  </target>
+
+  <target name="sources-jar" depends="init" description="Assemble JDBC Sources JAR file">
+    <jar jarfile="${build.dir}/${final.name}-sources.jar">
+      <fileset dir="${build.src}" defaultexcludes="yes">
+        <include name="org/apache/**/*.java" />
+      </fileset>
+    </jar>
+  </target>
+
+  <target name="javadoc-jar" depends="init,javadoc" description="Assemble JDBC Javadoc
JAR file">
+    <jar jarfile="${build.dir}/${final.name}-javadoc.jar" basedir="${javadoc.dir}" />
+  </target>
+
+  <target name="build-all" depends="clean,build,jar,javadoc-jar,sources-jar" description="Build
all (non-test) artifacts">
+  </target>
+
+    <target name="generate-eclipse-files" depends="build">
+        <echo file=".project"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+  <name>${eclipse.project.name}</name>
+    <comment></comment>
+    <projects></projects>
+    <buildSpec>
+        <buildCommand>
+            <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+            <triggers>full,incremental,auto,clean,</triggers>
+            <arguments>
+                <dictionary>
+                    <key>LaunchConfigHandle</key>
+                    <value>&lt;project&gt;/.externalToolBuilders/Cassandra_Ant_Builder.launch</value>
+                </dictionary>
+            </arguments>
+        </buildCommand>
+    </buildSpec>
+    <natures>
+        <nature>org.eclipse.jdt.core.javanature</nature>
+    </natures>
+</projectDescription>]]>
+        </echo>
+        <echo file=".classpath"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+  <classpathentry kind="src" path="src"/>
+  <classpathentry kind="src" path="test"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="output" path="build/main/classes"/>
+  <classpathentry kind="lib" path="build/test/classes"/>
+  <classpathentry kind="lib" path="${cassandra.dir}/build/test/classes"/>
+  <classpathentry kind="lib" path="${cassandra.dir}/test/conf"/>
+]]>
+        </echo>
+            <path id="eclipse-project-libs-path">
+                <pathelement location="${cassandra.dir}/build/classes/main" />
+                <pathelement location="${cassandra.dir}/build/classes/thrift" />
+                <pathelement location="${build.main.classes}" />
+                <fileset dir="${cassandra.lib}">
+                    <include name="**/*.jar" />
+                </fileset>
+                <fileset dir="${cassandra.dir}/build/lib/jars">
+                    <include name="**/*.jar" />
+                </fileset>
+            </path>
+            <property name="eclipse-project-libs" refid="eclipse-project-libs-path" />
+            <script language="javascript"><![CDATA[
+            importClass(java.io.File);
+            jars = project.getProperty("eclipse-project-libs").split(":");  
+            
+            cp = "";
+            for (i=0; i< jars.length; i++) {
+               cp += ' <classpathentry kind="lib" path="'+jars[i]+'"/>\n';
+            }
+            
+            cp += '</classpath>';
+            
+            echo = project.createTask("echo");
+            echo.setMessage(cp);
+            echo.setFile(new File(".classpath"));
+            echo.setAppend(true);
+            echo.perform();      
+        ]]> </script>
+        <mkdir dir=".settings" />
+        <mkdir dir=".externalToolBuilders" />
+        <echo file=".externalToolBuilders/Cassandra_Ant_Builder.launch"><![CDATA[<?xml
version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+  <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="build-test,"/>
+  <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="build-test,"/>
+  <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean"/>
+  <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="build-test,"/>
+  <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+  <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+    <listEntry value="/${eclipse.project.name}/build.xml"/>
+  </listAttribute>
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+    <listEntry value="1"/>
+  </listAttribute>
+  <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+  <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+  <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+  <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="${eclipse.project.name}"/>
+  <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$${workspace_loc:/${eclipse.project.name}/build.xml}"/>
+  <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean,"/>
+  <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+  <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="$${workspace_loc:/${eclipse.project.name}}"/>
+  </launchConfiguration>
+]]>
+        </echo>
+    </target>
+
+  <pathconvert property="eclipse.project.name">
+    <path path="${basedir}" />
+    <regexpmapper from="^.*/([^/]+)$$" to="\1" handledirsep="yes" />
+  </pathconvert>
+</project>



Mime
View raw message