| 1 |
<!-- |
| 2 |
Copyright 2004 The Apache Software Foundation |
| 3 |
|
| 4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
you may not use this file except in compliance with the License. |
| 6 |
You may obtain a copy of the License at |
| 7 |
|
| 8 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
|
| 10 |
Unless required by applicable law or agreed to in writing, software |
| 11 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
See the License for the specific language governing permissions and |
| 14 |
limitations under the License. |
| 15 |
|
| 16 |
$Id: build.xml,v 1.1 2007/03/10 01:15:38 shinsuke Exp $ |
| 17 |
--> |
| 18 |
<project name="JetspeedInstaller" default="install" basedir="."> |
| 19 |
|
| 20 |
<taskdef name="checkConnection" classname="org.apache.jetspeed.anttasks.AntInstallerCheckConnection" /> |
| 21 |
|
| 22 |
<property file="ant.install.properties" /> |
| 23 |
|
| 24 |
<target name="install"> |
| 25 |
<echo>Starting the installation</echo> |
| 26 |
|
| 27 |
<condition property="jdk15Installed"> |
| 28 |
<equals arg1="${ant.java.version}" arg2="1.5" /> |
| 29 |
</condition> |
| 30 |
|
| 31 |
<echo>Deleting all content from the installation target directory</echo> |
| 32 |
<delete includeemptydirs="true"> |
| 33 |
<fileset dir="${installDir}" includes="**/*"/> |
| 34 |
</delete> |
| 35 |
|
| 36 |
<echo>Installing Jetspeed-2.1 Enterprise Portal</echo> |
| 37 |
<unzip src="${antinstaller.jar}" dest="${installDir}"> |
| 38 |
<patternset> |
| 39 |
<include name="portal.zip" /> |
| 40 |
<include name="database.zip" /> |
| 41 |
<include name="tomcat-compat.zip" unless="jdk15Installed" /> |
| 42 |
</patternset> |
| 43 |
</unzip> |
| 44 |
<unzip dest="${installDir}"> |
| 45 |
<fileset dir="${installDir}" includes="*.zip"/> |
| 46 |
</unzip> |
| 47 |
<delete> |
| 48 |
<fileset dir="${installDir}" includes="*.zip"/> |
| 49 |
</delete> |
| 50 |
<chmod perm="700" dir="${installDir}/bin" includes="**/*.sh" /> |
| 51 |
|
| 52 |
<echo>Setting up the database configuration</echo> |
| 53 |
<condition property="jdbcjar" value="${installDir}/database/lib/derby-10.1.1.0.jar"> |
| 54 |
<equals arg1="${jdbc.driver.jar}" arg2="" /> |
| 55 |
</condition> |
| 56 |
<property name="jdbcjar" value="${jdbc.driver.jar}" /> |
| 57 |
<copy failonerror="false" todir="${installDir}/shared/lib" file="${jdbcjar}" /> |
| 58 |
|
| 59 |
<move file="${installDir}/database/database.properties.template" tofile="${installDir}/database/database.properties" |
| 60 |
overwrite="true"> |
| 61 |
<filterset begintoken="@" endtoken="@"> |
| 62 |
<filter token="db.type" value="${db.type}" /> |
| 63 |
<filter token="db.username" value="${db.username}" /> |
| 64 |
<filter token="db.password" value="${db.password}" /> |
| 65 |
<filter token="jdbc.url" value="${jdbc.url}" /> |
| 66 |
<filter token="jdbc.driver.class" value="${jdbc.driver.class}" /> |
| 67 |
</filterset> |
| 68 |
</move> |
| 69 |
<echo>Setting up the Jetspeed database (if selected)</echo> |
| 70 |
<ant antfile="${installDir}/database/build.xml" target="${setupDBAntTarget}" dir="${installDir}/database" /> |
| 71 |
</target> |
| 72 |
|
| 73 |
<target name="antinstaller-checkdb" depends=""> |
| 74 |
|
| 75 |
<checkConnection driver="${jdbcDriverClass}" url="${jdbcUrl}" userid="${dbUser}" password="${dbPassword}"> |
| 76 |
<classpath> |
| 77 |
<pathelement location="${jdbcDriverJar}" /> |
| 78 |
</classpath> |
| 79 |
</checkConnection> |
| 80 |
<antinstaller-property name="dbvalid" value="true" /> |
| 81 |
</target> |
| 82 |
|
| 83 |
<target name="mailServerConfiguration"> |
| 84 |
<echo>starting Mail server configuration</echo> |
| 85 |
<copy file="${installDir}/temp/administration.xml" |
| 86 |
tofile="${installDir}/webapps/palportal/WEB-INF/assembly/administration.xml" overwrite="true"> |
| 87 |
<filterset begintoken="@" endtoken="@"> |
| 88 |
<filter token="MAIL_SERVER" value="${mailServer}"/> |
| 89 |
<filter token="MAIL_USERNAME" value="${msUsername}"/> |
| 90 |
<filter token="MAIL_PASSWORD" value="${msPassword}"/> |
| 91 |
<filter token="MAIL_AUTH" value="${msAuth}"/> |
| 92 |
</filterset> |
| 93 |
</copy> |
| 94 |
<delete file="${installDir}/temp/administration.xml" failonerror="false"/> |
| 95 |
<echo>Mail server configuration done!</echo> |
| 96 |
</target> |
| 97 |
|
| 98 |
</project> |