| 1 |
<project name="master-build" default="usage"> |
|---|
| 2 |
|
|---|
| 3 |
<!-- |
|---|
| 4 |
This script just kicks off the scripts for each project in the |
|---|
| 5 |
subdirectories. It demonstrates a few things: |
|---|
| 6 |
|
|---|
| 7 |
- How to use ant sshexec task to run a command on the server. Note you |
|---|
| 8 |
can separate the commands using commas. |
|---|
| 9 |
- Call ant tasks in other files. |
|---|
| 10 |
|
|---|
| 11 |
See the dependant build script for info on how to configure eclipse so it |
|---|
| 12 |
passes user name and pass into the script. You don't want them stored in |
|---|
| 13 |
SVN do you? |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
--> |
|---|
| 18 |
|
|---|
| 19 |
<property name="server" value="my-dev-server.umd.edu" /> |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
<property name="master.build.file" |
|---|
| 23 |
location="F:/bedework-3.4.1/bedework/build.xml" /> |
|---|
| 24 |
|
|---|
| 25 |
<property name="skin.dir" |
|---|
| 26 |
location="F:/bedework-3.4.1/bedework/deployment/webpublic/webapp/resources/demoskins/" /> |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
<target name="usage" description="."> |
|---|
| 32 |
|
|---|
| 33 |
</target> |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
<target name="internal.prepare"> |
|---|
| 37 |
<!-- Copy dept skins so build will work --> |
|---|
| 38 |
<copy overwrite="true" todir="${skin.dir}/OitDepartmental/"> |
|---|
| 39 |
<fileset dir="${skin.dir}/SoEDepartmental"> |
|---|
| 40 |
</fileset> |
|---|
| 41 |
</copy> |
|---|
| 42 |
<copy overwrite="true" todir="${skin.dir}/Holidays/"> |
|---|
| 43 |
<fileset dir="${skin.dir}/SoEDepartmental"> |
|---|
| 44 |
</fileset> |
|---|
| 45 |
</copy> |
|---|
| 46 |
</target> |
|---|
| 47 |
|
|---|
| 48 |
<target name="internal.fixperms"> |
|---|
| 49 |
<sshexec failonerror="false" |
|---|
| 50 |
output="CMD_OUTPUT" |
|---|
| 51 |
trust="true" |
|---|
| 52 |
host="${server}" |
|---|
| 53 |
username="${usr}" |
|---|
| 54 |
password="${password}" |
|---|
| 55 |
command="cd /opt/portal/tomcat/bedework/current/webapps/;run fixowner;run setgroupwrite ." /> |
|---|
| 56 |
</target> |
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
<target name="build.all"> |
|---|
| 60 |
|
|---|
| 61 |
<antcall target="internal.prepare" /> |
|---|
| 62 |
|
|---|
| 63 |
<!-- It would be nice to automatically kick off the bedework build here, but |
|---|
| 64 |
it is a pain to get working because it's not using the eclipse ant instance |
|---|
| 65 |
to build with. So instead we pause with a popup. --> |
|---|
| 66 |
|
|---|
| 67 |
<input>We're ready. Go to command line and run 'ant clean.deploy' then hit OK when build is done.</input> |
|---|
| 68 |
<ant antfile="eventsubmit/build.xml" |
|---|
| 69 |
inheritall="false" |
|---|
| 70 |
target="build.all" /> |
|---|
| 71 |
<ant antfile="caladmin/build.xml" |
|---|
| 72 |
inheritall="false" |
|---|
| 73 |
target="build.all" /> |
|---|
| 74 |
<ant antfile="campus/build.xml" inheritall="false" target="build.all" /> |
|---|
| 75 |
<ant antfile="dumpres/build.xml" |
|---|
| 76 |
inheritall="false" |
|---|
| 77 |
target="build.all" /> |
|---|
| 78 |
<ant antfile="holidays/build.xml" |
|---|
| 79 |
inheritall="false" |
|---|
| 80 |
target="build.all" /> |
|---|
| 81 |
<ant antfile="oit/build.xml" inheritall="false" target="build.all" /> |
|---|
| 82 |
<ant antfile="soedept/build.xml" |
|---|
| 83 |
inheritall="false" |
|---|
| 84 |
target="build.all" /> |
|---|
| 85 |
<ant antfile="ucal/build.xml" inheritall="false" target="build.all" /> |
|---|
| 86 |
|
|---|
| 87 |
</target> |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
<target name="deploy.all"> |
|---|
| 91 |
|
|---|
| 92 |
<antcall target="internal.fixperms" /> |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
<!-- Remove this if you like. Tomcat isn't properly deleting stuff so |
|---|
| 96 |
I do it manually here --> |
|---|
| 97 |
|
|---|
| 98 |
<input>About to delete exploded WAR directories on server so tomcat will redeploy wars</input> |
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
<ant antfile="delete.xml" |
|---|
| 102 |
inheritall="false" |
|---|
| 103 |
target="delete.all" /> |
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
<ant antfile="eventsubmit/build.xml" inheritall="false" target="deploy.all" /> |
|---|
| 107 |
|
|---|
| 108 |
<ant antfile="caladmin/build.xml" |
|---|
| 109 |
inheritall="false" |
|---|
| 110 |
target="deploy.all" /> |
|---|
| 111 |
<ant antfile="campus/build.xml" inheritall="false" target="deploy.all" /> |
|---|
| 112 |
|
|---|
| 113 |
<ant antfile="holidays/build.xml" |
|---|
| 114 |
inheritall="false" |
|---|
| 115 |
target="deploy.all" /> |
|---|
| 116 |
<ant antfile="oit/build.xml" inheritall="false" target="deploy.all" /> |
|---|
| 117 |
<ant antfile="soedept/build.xml" |
|---|
| 118 |
inheritall="false" |
|---|
| 119 |
target="deploy.all" /> |
|---|
| 120 |
<ant antfile="ucal/build.xml" inheritall="false" target="deploy.all" /> |
|---|
| 121 |
|
|---|
| 122 |
</target> |
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
</project> |
|---|