Skip to content

Commit

Permalink
make this work with either java v8 or v15 disruptor jar
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed May 13, 2024
1 parent 16eb4ab commit d5125d8
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<property name="javac.debug" value="on" />

<!-- Directories/Files -->
<property name="src.dir" value="java" />
<property name="src.dir" value="java/org/jlab/coda" />
<property name="build.dir" value="jbuild" />
<property name="build.classes" value="${build.dir}/classes" />
<property name="build.lib" value="${build.dir}/lib" />
Expand All @@ -29,8 +29,11 @@
<property name="compJarName" value="AHACompressionAPI.jar" />
<property name="compJarPath" value="${local.jars}/${compJarName}" />

<property name="disruptorJarName" value="disruptor-3.4.3.jar" />
<property name="disruptorJarPath" value="${local.jars}/${disruptorJarName}" />
<property name="disruptorJarName8" value="disruptor-3.4.3.jar" />
<property name="disruptorJarName15" value="disruptor-4.0.0.jar" />
<property name="disruptorJarPath8" value="${local.jars}/${disruptorJarName8}" />
<property name="disruptorJarPath15" value="${local.jars}/${disruptorJarName15}" />


<!-- Set Classpath, ignore caller's classpath -->
<property name="build.sysclasspath" value="ignore" />
Expand Down Expand Up @@ -205,7 +208,7 @@

<!-- Create Jar file -->
<target name="jar" depends="compile" description="Generates jar file.">
<jar jarfile="${jarPath}" manifest="${src.dir}/org/jlab/coda/jevio/manifest.mf">
<jar jarfile="${jarPath}" manifest="${src.dir}/jevio/manifest.mf">
<fileset dir="${build.classes}" excludes="*.class" />
</jar>
</target>
Expand All @@ -227,29 +230,33 @@
<echo>Install ${jarName} into ${prefix}</echo>
<echo>Install ${lz4JarName} into ${prefix}</echo>
<echo>Install ${compJarName} into ${prefix}</echo>
<echo>Install ${disruptorJarName} into ${prefix}</echo>
<echo>Install ${disruptorJarName8} into ${prefix}</echo>
<echo>Install ${disruptorJarName15} into ${prefix}</echo>
<delete>
<fileset dir="${prefix}/jar" includes="${allJarNames}" />
</delete>
<copy file="${jarPath}" todir="${prefix}/jar"/>
<copy file="${lz4JarPath}" todir="${prefix}/jar"/>
<copy file="${compJarPath}" todir="${prefix}/jar"/>
<copy file="${disruptorJarPath}" todir="${prefix}/jar"/>
<copy file="${disruptorJarPath8}" todir="${prefix}/jar" failonerror="false" />
<copy file="${disruptorJarPath15}" todir="${prefix}/jar" failonerror="false" />
</target>

<!-- Install in $CODA -->
<target name="installInCODA" unless="prefixDefined" if="codaDefined">
<echo>Install ${jarName} into ${env.CODA}/common/jar</echo>
<echo>Install ${lz4JarName} into ${env.CODA}/common/jar</echo>
<echo>Install ${compJarName} into ${env.CODA}/common/jar</echo>
<echo>Install ${disruptorJarName} into ${env.CODA}/common/jar</echo>
<echo>Install ${disruptorJarName8} into ${env.CODA}/common/jar</echo>
<echo>Install ${disruptorJarName15} into ${env.CODA}/common/jar</echo>
<delete>
<fileset dir="${env.CODA}/common/jar" includes="${allJarNames}" />
</delete>
<copy file="${jarPath}" todir="${env.CODA}/common/jar"/>
<copy file="${lz4JarPath}" todir="${env.CODA}/common/jar"/>
<copy file="${compJarPath}" todir="${env.CODA}/common/jar"/>
<copy file="${disruptorJarPath}" todir="${env.CODA}/common/jar"/>
<copy file="${disruptorJarPath8}" todir="${env.CODA}/common/jar" failonerror="false" />
<copy file="${disruptorJarPath15}" todir="${env.CODA}/common/jar" failonerror="false" />
</target>

<!-- No installation directory defined -->
Expand All @@ -271,23 +278,27 @@
<echo>Remove ${jarName} from ${prefix}</echo>
<echo>Remove ${lz4JarName} from ${prefix}</echo>
<echo>Remove ${compJarName} from ${prefix}</echo>
<echo>Remove ${disruptorJarName} from ${prefix}</echo>
<echo>Remove ${disruptorJarName8} from ${prefix}</echo>
<echo>Remove ${disruptorJarName15} from ${prefix}</echo>
<delete file="${prefix}/jar/${jarName}"/>
<delete file="${prefix}/jar/${lz4JarName}"/>
<delete file="${prefix}/jar/${compJarName}"/>
<delete file="${prefix}/jar/${disruptorJarName}"/>
<delete file="${prefix}/jar/${disruptorJarName8}" failonerror="false" />
<delete file="${prefix}/jar/${disruptorJarName15}" failonerror="false" />
</target>

<!-- Uninstall from $CODA -->
<target name="uninstallFromCODA" unless="prefixDefined" if="codaDefined">
<echo>Remove ${jarName} from ${env.CODA}/common/jar</echo>
<echo>Remove ${lz4JarName} from ${env.CODA}/common/jar</echo>
<echo>Remove ${compJarName} from ${env.CODA}/common/jar</echo>
<echo>Remove ${disruptorJarName} from ${env.CODA}/common/jar</echo>
<echo>Remove ${disruptorJarName8} from ${env.CODA}/common/jar</echo>
<echo>Remove ${disruptorJarName15} from ${env.CODA}/common/jar</echo>
<delete file="${env.CODA}/common/jar/${jarName}"/>
<delete file="${env.CODA}/common/jar/${lz4JarName}"/>
<delete file="${env.CODA}/common/jar/${compJarName}"/>
<delete file="${env.CODA}/common/jar/${disruptorJarName}"/>
<delete file="${env.CODA}/common/jar/${disruptorJarName8}" failonerror="false" />
<delete file="${env.CODA}/common/jar/${disruptorJarName15}" failonerror="false" />
</target>

<!-- No installation directory defined to uninstall from -->
Expand Down

0 comments on commit d5125d8

Please sign in to comment.