| 55 | | if "%quickstart%" != "" GOTO :checkBwConfig |
|---|
| 56 | | if "%BWCONFIGS%" != "" GOTO doneQB |
|---|
| 57 | | set BWCONFIGS=%HOME%\bwbuild |
|---|
| 58 | | GOTO :doneQB |
|---|
| | 44 | :bwc |
|---|
| | 45 | SHIFT |
|---|
| | 46 | SET bwc=%1 |
|---|
| | 47 | SHIFT |
|---|
| | 48 | IF "%1noarg" == "noarg" GOTO doneWithArgs |
|---|
| | 49 | GOTO branch |
|---|
| | 50 | |
|---|
| | 51 | :offline |
|---|
| | 52 | ECHO Setting to offline mode; libraries will not be downloaded ... |
|---|
| | 53 | SET offline="-Dorg.bedework.offline.build=yes" |
|---|
| | 54 | SHIFT |
|---|
| | 55 | IF "%1noarg" == "noarg" GOTO doneWithArgs |
|---|
| | 56 | GOTO branch |
|---|
| | 57 | |
|---|
| | 58 | :doneWithArgs |
|---|
| | 59 | |
|---|
| | 60 | IF NOT "%quickstart%empty" == "empty" GOTO checkBwConfig |
|---|
| | 61 | IF NOT "%BWCONFIGS%empty" == "empty" GOTO DoneQB |
|---|
| | 62 | SET BWCONFIGS=%HOME%\bwbuild |
|---|
| | 63 | GOTO doneQB |
|---|
| 61 | | if "%BWCONFIGS" == "" GOTO QB |
|---|
| 62 | | echo ******************************************************* |
|---|
| 63 | | echo Error: Cannot specify both -quickstart and -bwchome |
|---|
| 64 | | echo ******************************************************* |
|---|
| 65 | | GOTO :EOF |
|---|
| | 66 | REM IF "%BWCONFIGS%empty" == "empty" GOTO doneQB |
|---|
| | 67 | REM ECHO ******************************************************* |
|---|
| | 68 | REM ECHO Error: Cannot specIFy both -quickstart and -bwchome |
|---|
| | 69 | REM ECHO ******************************************************* |
|---|
| | 70 | REM GOTO:EOF |
|---|
| 71 | | export BEDEWORK_CONFIGS_HOME=%BWCONFIGS% |
|---|
| 72 | | export BEDEWORK_CONFIG=%BWCONFIGS%\%bwc% |
|---|
| 73 | | |
|---|
| 74 | | if exist %BEDEWORK_CONFIG%/build.properties GOTO foundBuildProperties |
|---|
| 75 | | echo ******************************************************* |
|---|
| 76 | | echo Error: Configuration %BEDEWORK_CONFIG% does not exist or is not a bedework configuration. |
|---|
| 77 | | echo ******************************************************* |
|---|
| 78 | | GOTO :EOF |
|---|
| | 78 | IF EXIST "%BEDEWORK_CONFIG%\build.properties" GOTO foundBuildProperties |
|---|
| | 79 | ECHO ******************************************************* |
|---|
| | 80 | ECHO Error: Configuration %BEDEWORK_CONFIG% does not exist or is not a bedework configuration. |
|---|
| | 81 | ECHO ******************************************************* |
|---|
| | 82 | GOTO:EOF |
|---|
| 81 | | if not "%JAVA_HOME%"=="" goto javaOk |
|---|
| 82 | | echo ******************************************************* |
|---|
| 83 | | echo Error: JAVA_HOME is not defined correctly for bedework. |
|---|
| 84 | | echo ******************************************************* |
|---|
| 85 | | GOTO :EOF |
|---|
| | 85 | IF NOT "%JAVA_HOME%empty"=="empty" GOTO javaOk |
|---|
| | 86 | ECHO ******************************************************* |
|---|
| | 87 | ECHO Error: JAVA_HOME is not defined correctly for bedework. |
|---|
| | 88 | ECHO ******************************************************* |
|---|
| | 89 | GOTO:EOF |
|---|
| 88 | | :: Make available for ant |
|---|
| 89 | | set BWCONFIG=-Dorg.bedework.user.build.properties=%BEDEWORK_CONFIG%/build.properties" |
|---|
| | 92 | :runBedework |
|---|
| | 93 | :: Make available for ant |
|---|
| | 94 | SET BWCONFIG=-Dorg.bedework.user.build.properties=%BEDEWORK_CONFIG%\build.properties" |
|---|
| | 95 | |
|---|
| | 96 | ECHO. |
|---|
| | 97 | ECHO BWCONFIGS = %BWCONFIGS% |
|---|
| | 98 | ECHO BWCONFIG = %BWCONFIG% |
|---|
| | 99 | ECHO. |
|---|
| | 100 | |
|---|
| | 101 | SET ANT_HOME=%QUICKSTART_HOME%\apache-ant-1.7.0 |
|---|
| | 102 | |
|---|
| | 103 | SET CLASSPATH="%ANT_HOME%\lib\ant-launcher.jar" |
|---|
| | 104 | |
|---|
| | 105 | "%JAVA_HOME%\bin\java.exe" -classpath %CLASSPATH% %offline% -Dant.home=%ANT_HOME% org.apache.tools.ant.launch.Launcher %BWCONFIG% %*% |
|---|
| | 106 | |
|---|
| | 107 | GOTO:EOF |
|---|
| 91 | | echo BWCONFIGS=%BWCONFIGS% |
|---|
| 92 | | echo BWCONFIG=%BWCONFIG% |
|---|
| 93 | | |
|---|
| 94 | | set ANT_HOME=`dirname "$PRG"`/apache-ant-1.7.0 |
|---|
| 95 | | set ANT_HOME=`cd "$ANT_HOME" && pwd` |
|---|
| 96 | | |
|---|
| 97 | | set CLASSPATH=%ANT_HOME%/lib/ant-launcher.jar |
|---|
| 98 | | |
|---|
| 99 | | %JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %offline% -Dant.home=%ANT% org.apache.tools.ant.launch.Launcher %BWCONFIG% %*% |
|---|
| 100 | | |
|---|
| 101 | | GOTO :EOF |
|---|
| 102 | | |
|---|
| | 109 | |
|---|
| | 110 | :: Iterate over the command line arguments; |
|---|
| | 111 | :: DOS Batch labels can't contain hyphens, so convert them |
|---|
| | 112 | :: (otherwise, we could just "GOTO %1") |
|---|
| | 113 | :branch |
|---|
| | 114 | IF "%1" == "-quickstart" GOTO quickstart |
|---|
| | 115 | IF "%1" == "-bwchome" GOTO bwchome |
|---|
| | 116 | IF "%1" == "-bwc" GOTO bwc |
|---|
| | 117 | IF "%1" == "-offline" GOTO offline |
|---|
| | 118 | |
|---|
| 104 | | echo %PRG [-bwchome path | -quickstart ] [ -bwc configname ] [ -offline } [ target ] |
|---|
| 105 | | echo |
|---|
| 106 | | echo -bwchome specify path to configurations |
|---|
| 107 | | echo -quickstart Use the current quickstart configurations |
|---|
| 108 | | echo - bwc specify configuration name |
|---|
| 109 | | echo -offline build without atempting to retrieve library jars |
|---|
| 110 | | echo target ant target to execute |
|---|
| 111 | | echo |
|---|
| 112 | | echo Invokes ant to build or deploy the bedework system. Uses a configuration |
|---|
| 113 | | echo directory which contains one directory per configuration. |
|---|
| 114 | | echo |
|---|
| 115 | | echo Within each configuration directory we expect a file called build.properties |
|---|
| 116 | | echo which should point to the proerty and options file needed for the deploy process |
|---|
| 117 | | echo |
|---|
| 118 | | echo In general these files will be in the same directory as build.properties. |
|---|
| 119 | | echo The environment variable BEDEWORK_CONFIG contains the path to the current |
|---|
| 120 | | echo configuration directory and can be used to build a path to the other files. |
|---|
| 121 | | echo |
|---|
| 122 | | |
|---|
| | 120 | ECHO Usage: |
|---|
| | 121 | ECHO. |
|---|
| | 122 | ECHO %0 [ -quickstart OR -bwchome path ] [ -bwc configname ] [ -offline ] [ target ] |
|---|
| | 123 | ECHO. |
|---|
| | 124 | ECHO -quickstart Use the current quickstart configurations. |
|---|
| | 125 | ECHO -bwchome Specify path to configurations |
|---|
| | 126 | ECHO -bwc Specify configuration name |
|---|
| | 127 | ECHO -offline Build without atempting to retrieve library jars |
|---|
| | 128 | ECHO target Ant target to execute |
|---|
| | 129 | ECHO. |
|---|
| | 130 | ECHO Invokes ant to build or deploy the bedework system. Uses a configuration |
|---|
| | 131 | ECHO directory which contains one directory per configuration. |
|---|
| | 132 | ECHO. |
|---|
| | 133 | ECHO Within each configuration directory we expect a file called |
|---|
| | 134 | ECHO build.properties which should point to the property and options file |
|---|
| | 135 | ECHO needed for the deploy process. |
|---|
| | 136 | ECHO. |
|---|
| | 137 | ECHO In general these files will be in the same directory as build.properties. |
|---|
| | 138 | ECHO The environment variable BEDEWORK_CONFIG contains the path to the current |
|---|
| | 139 | ECHO configuration directory and can be used to build a path to the other files. |
|---|
| | 140 | ECHO. |
|---|
| | 141 | ECHO. |
|---|