Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
purplefox committed Oct 13, 2009
1 parent 8149ab8 commit b6574c9
Show file tree
Hide file tree
Showing 66 changed files with 12,958 additions and 1 deletion.
54 changes: 54 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@echo off

rem Copyright 2009 Red Hat, Inc.
rem Red Hat licenses this file to you under the Apache License, version
rem 2.0 (the "License"); you may not use this file except in compliance
rem with the License. You may obtain a copy of the License at
rem http://www.apache.org/licenses/LICENSE-2.0
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
rem implied. See the License for the specific language governing
rem permissions and limitations under the License.

rem -------------------------------------------------------------------------
rem HornetQ Build Script for Windows
rem -------------------------------------------------------------------------

rem $Id: $

rem This build script will ensure a correct ant version is used.
rem Users can also pass in options on the command line.

rem First check for the existence of JAVA_HOME. It doesn't have to be set,
rem but it may be an indication that javac is not available on the command line.

if "x%JAVA_HOME%" == "x" (
echo WARNING: JAVA_HOME is not set. Build may fail.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
)
else (
if exist "%JAVA_HOME%\bin\javac.exe" (
echo Build script found javac.
) else (
echo WARNING: javac was not found. Make sure it is available in the path.
))

rem Save off the original ANT_HOME. We don't want to destroy environments.
set "ORIG_ANT_HOME=%ANT_HOME%"

rem Set the new one
set "ANT_HOME=tools\ant"

rem build HornetQ

echo "Using the following ant version from %ANT_HOME%:"

call tools\ant\bin\ant.bat -version

call tools\ant\bin\ant.bat %* -Dhornetq.run_script=true

rem Restore the original ANT_HOME values
set "ANT_HOME=%ORIG_ANT_HOME%"

echo Done
63 changes: 63 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/sh

# Copyright 2009 Red Hat, Inc.
# Red Hat licenses this file to you under the Apache License, version
# 2.0 (the "License"); you may not use htis file except in compliance
# with the License. You may obtain a copy of the License at
# http://www.apache.org/license/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.

# ------------------------------------------------
# HornetQ Build Script for Linux
# ------------------------------------------------

# $Id: $

# This build script will ensure the correct ant version is used.
# Users can also pass in options on the command line.

warn() {
echo "${PROGNAME}: $*"
}

die() {
warn $*
exit 1
}

# Save off the original ANT_HOME value
export ORIG_ANT_HOME=$ANT_HOME

# Set the temporary ANT_HOME
export ANT_HOME=tools/ant

# Check for JAVA_HOME. If it is not there, warn the user

if [ -n "$JAVA_HOME" ]; then

if [ -f "$JAVA_HOME/bin/javac" ]; then
echo "Found javac"
else
die "Could not find javac."
fi
else
warn "JAVA_HOME is not set. Build may fail."
warn "Set JAVA_HOME to the directory of your local JDK to avoid this message."
fi

# Call ant
chmod +x $ANT_HOME/bin/ant

echo "Using the following ant version from ${ANT_HOME}:"

$ANT_HOME/bin/ant -version

$ANT_HOME/bin/ant "$@" -Dhornetq.run_script=true


# Restore the original path
export ANT_HOME=$ORIG_ANT_HOME
12 changes: 11 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ Copyright 2009 Red Hat, Inc.
<!-- =========================================================================================== -->


<project default="unit-tests" name="HornetQ">
<project name="HornetQ" default="jar">

<property name="hornetq.run_script" value="false" />

<fail message="Please build by using the build.sh script (or build.bat on Windows)">
<condition>
<not>
<equals arg1="${hornetq.run_script}" arg2="true"/>
</not>
</condition>
</fail>

<!--
Setting "external.project" to true makes jbossbuild use the current directory, and not its
Expand Down
2 changes: 2 additions & 0 deletions tools/ant/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
For installation instructions see the manual in the docs subdirectory
or online at <http://ant.apache.org/manual/index.html>.
Loading

0 comments on commit b6574c9

Please sign in to comment.