Initial move to Gradle.
This commit is contained in:
parent
bd8f23d7d6
commit
993384c173
147 changed files with 673 additions and 1 deletions
26
build.gradle
Normal file
26
build.gradle
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
apply plugin: 'java'
|
||||||
|
|
||||||
|
group = 'opensymphony'
|
||||||
|
version = '2.4.2'
|
||||||
|
|
||||||
|
description = 'OSCache'
|
||||||
|
|
||||||
|
sourceCompatibility = 1.4
|
||||||
|
targetCompatibility = 1.4
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile group: 'commons-logging', name: 'commons-logging', version:'1.1'
|
||||||
|
compile group: 'org.apache.geronimo.specs', name: 'geronimo-jms_1.1_spec', version: '1.1.1'
|
||||||
|
compile group: 'javax.transaction', name: 'jta', version: '1.1'
|
||||||
|
compile group: 'javax.servlet', name: 'servlet-api', version:'2.3'
|
||||||
|
compile group: 'jgroups', name: 'jgroups-all', version:'2.2.8'
|
||||||
|
compile group: 'org.hibernate', name: 'hibernate', version:'3.2.3.ga'
|
||||||
|
testCompile group: 'junit', name: 'junit', version:'3.8.2'
|
||||||
|
testCompile group: 'httpunit', name: 'httpunit', version:'1.6'
|
||||||
|
testCompile group: 'junitperf', name: 'junitperf', version:'1.9.1'
|
||||||
|
testCompile group: 'groboutils', name: 'groboutils-core', version:'5'
|
||||||
|
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#Sat May 20 23:12:33 PDT 2017
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
|
172
gradlew
vendored
Normal file
172
gradlew
vendored
Normal file
|
@ -0,0 +1,172 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn ( ) {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die ( ) {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save ( ) {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=$(save "$@")
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
84
gradlew.bat
vendored
Normal file
84
gradlew.bat
vendored
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<!-- import common osbuild.xml -->
|
<!-- import common osbuild.xml -->
|
||||||
|
|
||||||
<property name="common.build" value="../opensymphony/common/osbuild.xml"/>
|
<property name="common.build" value="osbuild.xml"/>
|
||||||
<import file="${common.build}"/>
|
<import file="${common.build}"/>
|
||||||
|
|
||||||
<property name="clover.initstring" location="${build.clover}/coverageBase.db"/>
|
<property name="clover.initstring" location="${build.clover}/coverageBase.db"/>
|
383
old/osbuild.xml
Normal file
383
old/osbuild.xml
Normal file
|
@ -0,0 +1,383 @@
|
||||||
|
<project name="common" default="jar" basedir=".">
|
||||||
|
<!--
|
||||||
|
OpenSymphony Common Build
|
||||||
|
=========================
|
||||||
|
TODO (Introduction)
|
||||||
|
|
||||||
|
Layout
|
||||||
|
=========================
|
||||||
|
TODO
|
||||||
|
|
||||||
|
Overriding
|
||||||
|
=========================
|
||||||
|
TODO
|
||||||
|
Example: <target name="compile" depends="myPreCompile,common.compile,myPostCompile"/>
|
||||||
|
|
||||||
|
-->
|
||||||
|
<!-- NOTE: this property is purely here to make a clear distinction in IDEA where the common build is -->
|
||||||
|
<property name="------common-properties-below------" value="Common properties below:"/>
|
||||||
|
|
||||||
|
<property name="compile.version" value="1.3"/>
|
||||||
|
<property name="test.compile.version" value="1.3"/>
|
||||||
|
|
||||||
|
<dirname property="common.dir" file="${ant.file.common}"/>
|
||||||
|
<property file="build.properties"/>
|
||||||
|
<property file="release.properties"/>
|
||||||
|
<property file="ivyrep.properties"/>
|
||||||
|
|
||||||
|
<property name="lib" location="lib"/>
|
||||||
|
<property name="lib.core" value="${lib}/core"/>
|
||||||
|
<property name="lib.build" value="${lib}/build"/>
|
||||||
|
<property name="lib.optional" value="${lib}/optional"/>
|
||||||
|
|
||||||
|
<property name="src" location="src"/>
|
||||||
|
<property name="src.java" value="${src}/java"/>
|
||||||
|
|
||||||
|
<property name="test" value="${src}/test"/>
|
||||||
|
<property name="src.test" value="${test}/java"/>
|
||||||
|
|
||||||
|
<property name="build" location="build"/>
|
||||||
|
<property name="build.test" value="${build}/test"/>
|
||||||
|
<property name="build.java-test" value="${build}/java-test"/>
|
||||||
|
<property name="build.java" value="${build}/java"/>
|
||||||
|
<property name="build.clover" value="${build}/clover"/>
|
||||||
|
<property name="dist" location="dist"/>
|
||||||
|
|
||||||
|
<property name="docs" location="docs"/>
|
||||||
|
<property name="docs.packages" value="com.opensymphony.*"/>
|
||||||
|
|
||||||
|
<property name="jar.manifest" value="${common.dir}/EMPTY.MF"/>
|
||||||
|
<property name="jar.excludes" value=""/>
|
||||||
|
|
||||||
|
<property name="testcase" value="*"/>
|
||||||
|
<patternset id="src.test.pattern">
|
||||||
|
<exclude name="**/Abstract*.java"/>
|
||||||
|
<include name="**/${testcase}Test.java"/>
|
||||||
|
<include name="**/${testcase}TestCase.java"/>
|
||||||
|
</patternset>
|
||||||
|
|
||||||
|
<path id="cp">
|
||||||
|
<fileset dir="lib">
|
||||||
|
<include name="**/*.jar"/>
|
||||||
|
<include name="**/*.zip"/>
|
||||||
|
<exclude name="**/jalopy/**"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<path id="junit.cp">
|
||||||
|
<pathelement location="${build.test}"/>
|
||||||
|
<pathelement location="${build.java-test}"/>
|
||||||
|
<path refid="cp"/>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<available property="junit.available" classname="junit.framework.TestCase"/>
|
||||||
|
<available property="clover.available" classname="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
|
||||||
|
|
||||||
|
<target name="init" depends="init-anthill, init-standalone">
|
||||||
|
<tstamp/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- in Anthill, the docs should be the Intranet copyDir -->
|
||||||
|
<target name="init-anthill" if="anthill.copyDir">
|
||||||
|
<property name="dist.docs" value="${anthill.copyDir}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- when building Standalone, the docs should be the normal place -->
|
||||||
|
<target name="init-standalone" unless="anthill.copyDir">
|
||||||
|
<property name="dist.docs" value="${dist}/docs"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="junit-check" depends="init" unless="junit.available">
|
||||||
|
<fail message="Cannot run test cases. Please copy lib/build/junit-3.8.1.jar to ${ant.home}/lib"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clover-check" depends="init" unless="clover.available">
|
||||||
|
<fail message="Cannot run coverage tests. Please copy lib/build/clover.jar and lib/build/clover.license (if it exists) to ${ant.home}/lib"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clean" depends="init">
|
||||||
|
<delete dir="${build}"/>
|
||||||
|
<delete dir="${dist}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="precompile"/>
|
||||||
|
|
||||||
|
<macrodef name="compile">
|
||||||
|
<attribute name="srcdir"/>
|
||||||
|
<attribute name="destdir"/>
|
||||||
|
<attribute name="classpath" default=""/>
|
||||||
|
<attribute name="classpathref" default="cp"/>
|
||||||
|
<attribute name="excludes" default=""/>
|
||||||
|
<attribute name="source" default="${compile.version}"/>
|
||||||
|
<attribute name="target" default="${compile.version}"/>
|
||||||
|
<sequential>
|
||||||
|
<mkdir dir="@{destdir}"/>
|
||||||
|
<javac srcdir="@{srcdir}" destdir="@{destdir}" classpath="@{classpath}" classpathref="@{classpathref}"
|
||||||
|
debug="on" source="@{source}" target="@{target}"/>
|
||||||
|
<copy filtering="no" todir="@{destdir}">
|
||||||
|
<fileset dir="@{srcdir}">
|
||||||
|
<exclude name="**/*.java"/>
|
||||||
|
<exclude name="**/package.html"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="compile" depends="init,precompile" description="compile project">
|
||||||
|
<compile srcdir="${src.java}" destdir="${build.java}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jar" depends="compile" description="build the project jar file">
|
||||||
|
<mkdir dir="${build}"/>
|
||||||
|
|
||||||
|
<jar basedir="${build.java}" excludes="${jar.excludes}" jarfile="${build}/${name}-${version}.jar"
|
||||||
|
manifest="${jar.manifest}">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Implementation-Title" value="${fullname}"/>
|
||||||
|
<attribute name="Implementation-Version" value="${version}"/>
|
||||||
|
<attribute name="Implementation-Vendor" value="OpenSymphony"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
<!-- <jar basedir="${src.java}" jarfile="${build}/${name}-${version}-src.jar">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Implementation-Title" value="${fullname}" />
|
||||||
|
<attribute name="Implementation-Version" value="${version}" />
|
||||||
|
<attribute name="Implementation-Vendor" value="OpenSymphony" />
|
||||||
|
</manifest>
|
||||||
|
</jar> -->
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="src-jar" depends="init" description="build a jar of the project source code">
|
||||||
|
<mkdir dir="${build}"/>
|
||||||
|
<jar basedir="${src.java}" jarfile="${build}/${name}-${version}-src.jar">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Implementation-Title" value="${fullname}"/>
|
||||||
|
<attribute name="Implementation-Version" value="${version}"/>
|
||||||
|
<attribute name="Implementation-Vendor" value="OpenSymphony"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test-compile" unless="skip.tests">
|
||||||
|
<compile srcdir="${src.test}" destdir="${build.test}" classpath="${build.java}"
|
||||||
|
source="${test.compile.version}" target="${test.compile.version}"/>
|
||||||
|
|
||||||
|
<taskdef resource="clovertasks"/>
|
||||||
|
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
||||||
|
|
||||||
|
<mkdir dir="${build.clover}"/>
|
||||||
|
<clover-setup initString="${build.clover}/coverage.db">
|
||||||
|
<files>
|
||||||
|
<exclude name="${src.test}/**/*.java"/>
|
||||||
|
</files>
|
||||||
|
</clover-setup>
|
||||||
|
|
||||||
|
<compile srcdir="${src.java}" destdir="${build.java-test}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test" depends="junit-check, clover-check, compile, test-compile" description="run tests"
|
||||||
|
unless="skip.tests">
|
||||||
|
<run-junit />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<macrodef name="run-junit">
|
||||||
|
<attribute name="classpathref" default="junit.cp" />
|
||||||
|
<sequential>
|
||||||
|
<mkdir dir="${dist.docs}/junit"/>
|
||||||
|
<junit haltonfailure="no" haltonerror="yes" fork="yes" forkmode="once" failureproperty="test.failure">
|
||||||
|
<jvmarg value="-Djava.awt.headless=true"/>
|
||||||
|
<jvmarg value="-Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl"/>
|
||||||
|
<classpath>
|
||||||
|
<path refid="@{classpathref}"/>
|
||||||
|
</classpath>
|
||||||
|
|
||||||
|
<formatter type="plain" useFile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
|
||||||
|
<batchtest todir="${dist.docs}/junit">
|
||||||
|
<fileset dir="${src.test}">
|
||||||
|
<patternset refid="src.test.pattern"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="javadocs" description="generate javadocs" depends="init">
|
||||||
|
<mkdir dir="${dist.docs}/api"/>
|
||||||
|
<javadoc sourcepath="${src.java}"
|
||||||
|
destdir="${dist.docs}/api"
|
||||||
|
packagenames="${docs.packages}"
|
||||||
|
classpathref="cp"
|
||||||
|
author="true"
|
||||||
|
version="true"
|
||||||
|
overview="${src.java}/overview.html"
|
||||||
|
windowTitle="${fullname} API - ${version}"
|
||||||
|
doctitle="${fullname} API (${version})"
|
||||||
|
footer="<a href="http://www.opensymphony.com/${name}/" target="_top">${fullname} Project Page</a>"
|
||||||
|
use="true"
|
||||||
|
verbose="false">
|
||||||
|
<link href="http://java.sun.com/j2se/${compile.version}/docs/api/"/>
|
||||||
|
<link href="http://java.sun.com/j2ee/${compile.version}/docs/api/"/>
|
||||||
|
</javadoc>
|
||||||
|
<!-- <copy overwrite="yes" file="${docs}/main.css" tofile="${docs}/api/stylesheet.css"/> -->
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="docs.impl">
|
||||||
|
<copy todir="${dist.docs}">
|
||||||
|
<fileset dir="${docs}"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="reports" depends="junit.report, clover.report, javadocs"
|
||||||
|
description="generate javadocs and junit and coverage reports"/>
|
||||||
|
|
||||||
|
<target name="docs" depends="reports, docs.impl"/>
|
||||||
|
|
||||||
|
<target name="clover.report" depends="test" description="generate coverage reports" unless="skip.tests">
|
||||||
|
<clover-report>
|
||||||
|
<current outfile="${dist.docs}/clover">
|
||||||
|
<format type="html"/>
|
||||||
|
</current>
|
||||||
|
</clover-report>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clover.historical" depends="clover.report" description="generate coverage historical reports"
|
||||||
|
unless="skip.tests">
|
||||||
|
<clover-historypoint historyDir="${build.clover}"/>
|
||||||
|
|
||||||
|
<clover-report>
|
||||||
|
<historical outfile="${dist.docs}/clover" historyDir="${build.clover}">
|
||||||
|
<format type="html"/>
|
||||||
|
</historical>
|
||||||
|
</clover-report>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="junit.report" depends="test" description="generate junit reports" unless="skip.tests">
|
||||||
|
<junitreport todir="${dist.docs}/junit">
|
||||||
|
<fileset dir="${dist.docs}/junit">
|
||||||
|
<include name="TEST-*.xml"/>
|
||||||
|
</fileset>
|
||||||
|
<report format="frames" todir="${dist.docs}/junit"/>
|
||||||
|
</junitreport>
|
||||||
|
|
||||||
|
<!-- we fail here (instead of in the test target) so that the reports get generated first) -->
|
||||||
|
<fail if="test.failure" message="Tests did not all pass, failing!"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="predist"/>
|
||||||
|
|
||||||
|
<target name="predist.zip"/>
|
||||||
|
|
||||||
|
<target name="dist" depends="jar, docs, predist" description="generate distribution zip file">
|
||||||
|
<copy todir="${dist}">
|
||||||
|
<fileset dir="${build}">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<copy todir="${dist}/src">
|
||||||
|
<fileset dir="${src}"/>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<mkdir dir="${dist}/lib"/>
|
||||||
|
<copy todir="${dist}/lib">
|
||||||
|
<fileset dir="${lib}">
|
||||||
|
<exclude name="**/no_dist/**"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<copy todir="${dist}">
|
||||||
|
<fileset dir="${basedir}">
|
||||||
|
<include name="*build.*"/>
|
||||||
|
<include name="readme.txt"/>
|
||||||
|
<include name="license.txt"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<!-- give a chance for project builds to do more before the zip is made. -->
|
||||||
|
<antcall target="predist.zip"/>
|
||||||
|
|
||||||
|
<zip zipfile="${build}/${name}-${version}.zip" basedir="${dist}">
|
||||||
|
<exclude name="docs/clover/**/*"/>
|
||||||
|
<exclude name="docs/junit/**/*"/>
|
||||||
|
</zip>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="website" depends="javadocs, docs.impl"/>
|
||||||
|
|
||||||
|
<target name="ivyrep" depends="jar">
|
||||||
|
<tstamp>
|
||||||
|
<format property="TIME" pattern="yyyyMMddHHmmss"/>
|
||||||
|
</tstamp>
|
||||||
|
|
||||||
|
<!-- make sure we have the latest -->
|
||||||
|
<echo>svn update</echo>
|
||||||
|
<exec executable="svn">
|
||||||
|
<arg value="update"/>
|
||||||
|
<arg line="${ivyrep.path}/opensymphony/${name}"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<!-- delete the old timestamped builds and commit -->
|
||||||
|
<fileset dir="${ivyrep.path}/opensymphony/${name}" id="filesref">
|
||||||
|
<include name="${name}-${version}-*"/>
|
||||||
|
<include name="ivy-${version}-*"/>
|
||||||
|
</fileset>
|
||||||
|
<pathconvert property="files" refid="filesref" pathsep=" "/>
|
||||||
|
<echo>svn delete: ${files}</echo>
|
||||||
|
<exec executable="svn">
|
||||||
|
<arg value="delete"/>
|
||||||
|
<arg line="${files}"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<!-- copy over the new build -->
|
||||||
|
<copy file="${build}/${name}-${version}.jar"
|
||||||
|
tofile="${ivyrep.path}/opensymphony/${name}/${name}-${version}-${TIME}.jar"/>
|
||||||
|
<echo>svn add (jar)</echo>
|
||||||
|
<exec executable="svn">
|
||||||
|
<arg value="add"/>
|
||||||
|
<arg value="${ivyrep.path}/opensymphony/${name}/${name}-${version}-${TIME}.jar"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<antcall target="ivyrep.copy-ivy"/>
|
||||||
|
<exec executable="svn">
|
||||||
|
<arg value="add"/>
|
||||||
|
<arg value="${ivyrep.path}/opensymphony/${name}/ivy-${version}-${TIME}.xml"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<!-- now commit everything -->
|
||||||
|
<echo>svn commit</echo>
|
||||||
|
<exec executable="svn">
|
||||||
|
<arg value="commit"/>
|
||||||
|
<arg value="--username"/>
|
||||||
|
<arg value="${ivyrep.username}"/>
|
||||||
|
<arg value="--password"/>
|
||||||
|
<arg value="${ivyrep.password}"/>
|
||||||
|
<arg value="--non-interactive"/>
|
||||||
|
<arg value="-m"/>
|
||||||
|
<arg value="automatic commit"/>
|
||||||
|
<arg value="${ivyrep.path}/opensymphony/${name}"/>
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="ivyrep.copy-ivy">
|
||||||
|
<!--
|
||||||
|
Note: Default implementation does not use Ivy itself to generate these files.
|
||||||
|
However, Ivy is really the best way to generate these, so projects that
|
||||||
|
do use Ivy should override this target like so:
|
||||||
|
|
||||||
|
<ivy-deliver deliverpattern="${ivyrep.path}/opensymphony/${name}/[artifact]-[revision].[ext]"
|
||||||
|
pubrevision="${version}-${TIME}" pubdate="${TIME}"/>
|
||||||
|
|
||||||
|
Over time as more projects adopt Ivy, this may become built in to the
|
||||||
|
common build.
|
||||||
|
-->
|
||||||
|
<copy file="ivy.xml" tofile="${ivyrep.path}/opensymphony/${name}/ivy-${version}-${TIME}.xml">
|
||||||
|
<filterset id="ivy.filter">
|
||||||
|
<filter token="VERSION" value="${version}-${TIME}"/>
|
||||||
|
<filter token="STATUS" value="${status}"/>
|
||||||
|
<filter token="PUBLICATION" value="${TIME}"/>
|
||||||
|
</filterset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
</project>
|
1
settings.gradle
Normal file
1
settings.gradle
Normal file
|
@ -0,0 +1 @@
|
||||||
|
rootProject.name = 'oscache'
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue