Path: blob/main/databases/cassandra4/files/patch-build.xml
16462 views
--- build.xml.orig 2022-07-12 10:18:13 UTC1+++ build.xml2@@ -31,6 +31,7 @@3<property file="build.properties" />4<property file="build.properties.default" />5<property name="debuglevel" value="source,lines,vars"/>6+ <property name="pycmd" value="python"/>78<!-- default version and SCM information -->9<property name="base.version" value="4.0.5"/>10@@ -81,7 +82,7 @@11<condition property="version" value="${base.version}">12<isset property="release"/>13</condition>14- <property name="version" value="${base.version}-SNAPSHOT"/>15+ <property name="version" value="${base.version}"/>16<property name="version.properties.dir"17value="${build.src.resources}/org/apache/cassandra/config/" />18<property name="final.name" value="${ant.project.name}-${version}"/>19@@ -288,6 +289,24 @@20<exclude name="**/ant-*.jar"/>21</fileset>22</path>23+ <path id="cassandra.classpath.staged">24+ <file file="${build.dir}/${final.name}.jar"/> <!-- we need the jar for tests and benchmarks (multi-version jar) -->25+ <fileset dir="${stagedlib}">26+ <include name="**/*.jar" />27+ </fileset>28+ <fileset dir="${build.dir.lib}">29+ <include name="**/assertj-core-3.15.0.jar" />30+ <include name="**/byteman*.jar" />31+ <include name="**/commons-lang-2.4.jar" />32+ <include name="**/commons-collections-3.2.1.jar" />33+ <include name="**/ohc-core-0.5.1.jar" />34+ <include name="**/ohc-core-j8-0.5.1.jar" />35+ </fileset>36+ <fileset dir="${test.lib}/jars">37+ <include name="**/*.jar" />38+ <exclude name="**/ant-*.jar"/>39+ </fileset>40+ </path>4142<macrodef name="create-javadoc">43<attribute name="destdir"/>44@@ -297,7 +316,7 @@45windowtitle="${ant.project.name} API" classpathref="cassandra.classpath"46bottom="Copyright &copy; 2009-2022 The Apache Software Foundation"47useexternalfile="yes" encoding="UTF-8" failonerror="false"48- maxmemory="256m" additionalparam="${jdk11-javadoc-exports}">49+ maxmemory="512m" additionalparam="${jdk11-javadoc-exports}">50<filesets/>51</javadoc>52<fail message="javadoc failed">53@@ -438,6 +457,8 @@54<target name="gen-doc" description="Generate documentation" depends="gen-asciidoc,generate-cql-html" unless="ant.gen-doc.skip">55<exec executable="make" osfamily="unix" dir="${doc.dir}">56<arg value="html"/>57+ <arg value="PYTHON_CMD=${pycmd}"/>58+ <arg value="PYTHON_VER=${pyver}"/>59</exec>60</target>6162@@ -896,7 +917,7 @@63</javac>64</target>6566- <target depends="init,gen-cql3-grammar,generate-cql-html,generate-jflex-java,rat-check"67+ <target depends="init,gen-cql3-grammar,generate-cql-html,generate-jflex-java"68name="build-project">69<echo message="${ant.project.name}: ${ant.file}"/>70<!-- Order matters! -->71@@ -1147,6 +1168,89 @@72</copy>73</target>7475+ <!-- FreeBSD for staging -->76+ <target name="freebsd-stage" depends="jar"77+ description="Create Cassandra directory structure for staging">78+ <mkdir dir="${dist.dir}"/>79+ <copy todir="${dist.dir}/lib">80+ <fileset dir="${build.lib}">81+ <exclude name="sigar*.jar"/>82+ <exclude name="sigar-bin/*"/>83+ <exclude name="snappy*.jar"/>84+ <exclude name="netty-all*.jar"/>85+ <exclude name="ohc*.jar"/>86+ <exclude name="licenses/snappy*.txt"/>87+ <exclude name="licenses/netty-all*.txt"/>88+ <exclude name="licenses/ohc*.txt"/>89+ </fileset>90+ <fileset dir="${build.dir}">91+ <include name="${final.name}.jar" />92+ </fileset>93+ </copy>94+ <copy todir="${dist.dir}/bin">95+ <fileset dir="bin">96+ <exclude name="*.bat" />97+ <exclude name="*.ps1" />98+ <exclude name="*.orig" />99+ </fileset>100+ </copy>101+ <copy todir="${dist.dir}/conf">102+ <fileset dir="conf">103+ <exclude name="*.ps1" />104+ <exclude name="*.orig" />105+ </fileset>106+ </copy>107+ <copy todir="${dist.dir}/pylib">108+ <fileset dir="pylib">109+ <include name="**" />110+ <exclude name="**/*.pyc" />111+ <exclude name="Dockerfile.ubuntu.*" />112+ <exclude name="cqlshlib/test/**" />113+ <exclude name="cassandra-cqlsh-tests.sh" />114+ </fileset>115+ </copy>116+ <copy todir="${dist.dir}/">117+ <fileset dir="${basedir}">118+ <include name="*.txt" />119+ </fileset>120+ </copy>121+ <copy todir="${dist.dir}/tools/bin">122+ <fileset dir="${basedir}/tools/bin">123+ <exclude name="*.bat" />124+ <exclude name="*.ps1" />125+ <exclude name="*.orig" />126+ </fileset>127+ </copy>128+ <copy todir="${dist.dir}/tools/">129+ <fileset dir="${basedir}/tools/">130+ <include name="*.yaml"/>131+ </fileset>132+ </copy>133+ <copy todir="${dist.dir}/tools/lib">134+ <fileset dir="${build.dir}/tools/lib/">135+ <include name="*.jar" />136+ </fileset>137+ </copy>138+ </target>139+140+ <target name="freebsd-stage-doc" depends="freebsd-stage,javadoc,gen-doc"141+ description="Create Cassandra directory structure for staging, including docs">142+ <copy todir="${dist.dir}/javadoc">143+ <fileset dir="${javadoc.dir}"/>144+ </copy>145+ <copy todir="${dist.dir}/doc">146+ <fileset dir="doc">147+ <include name="cql3/CQL.html" />148+ <include name="cql3/CQL.css" />149+ <include name="SASI.md" />150+ </fileset>151+ </copy>152+ <copy todir="${dist.dir}/doc/html">153+ <fileset dir="doc" />154+ <globmapper from="build/html/*" to="*"/>155+ </copy>156+ </target>157+158<!-- creates release tarballs -->159<target name="artifacts" depends="_artifacts-init,gen-doc,sources-jar,javadoc-jar"160description="Create Cassandra release artifacts">161@@ -1397,7 +1501,7 @@162<pathelement path="${java.class.path}"/>163<pathelement location="${stress.build.classes}"/>164<pathelement location="${fqltool.build.classes}"/>165- <path refid="cassandra.classpath.test" />166+ <path refid="cassandra.classpath.staged" />167<pathelement location="${test.classes}"/>168<pathelement location="${stress.test.classes}"/>169<pathelement location="${fqltool.test.classes}"/>170@@ -2089,7 +2193,7 @@171</target>172173<!-- ECJ 4.6.1 in standalone mode does not work with JPMS, so we skip this target for Java 11 -->174- <target name="eclipse-warnings" depends="build, _assert_rat_output" description="Run eclipse compiler code analysis" if="java.version.8">175+ <target name="eclipse-warnings" depends="build" description="Run eclipse compiler code analysis" if="java.version.8">176<property name="ecj.log.dir" value="${build.dir}/ecj" />177<property name="ecj.warnings.file" value="${ecj.log.dir}/eclipse_compiler_checks.txt"/>178<mkdir dir="${ecj.log.dir}" />179180181