<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project [
  <!ENTITY % locator-entities SYSTEM "file:locator.ent"> %locator-entities;
]>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/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.
-->
<project default="build.installer"
         xmlns:j="jelly:core"
         xmlns:define="jelly:define"
         xmlns:maven="jelly:maven"         
         xmlns:ant="jelly:ant">
         
 <goal name="build.installer" prereqs="define.izpack">
   <copy todir="${install.src}/"  >
  	    <fileset dir="${basedir}/src"/>
   </copy>
   
   <!-- Copy ant -->
   <copy todir="${install.src}/ant/bin" >
		<fileset dir="${ant.home}/bin"/>
   </copy>
   
   <copy todir="${install.src}/ant/lib" file="${ant.home}/lib/ant.jar"  />
   
   <!-- Copy our SQL -->
  	<copy todir="${install.src}/sql"  >
  	  <fileset dir="${basedir}/../target/src/sql"/>
  	</copy>
  	
  	<!-- Copy tomcat -->
  	<copy todir="${install.src}/tomcat"  file="${tomcat.dist}" />
  	
  	<!-- Copy core -->
  	<copy todir="${install.src}/jetspeed"  >
  	   <fileset dir="${basedir}/../portal/target/jetspeed" />
  	</copy>  
  	
  	<!-- Copy jetspeed.xml -->
  	<copy todir="${install.src}/resources" file="${basedir}/../portal/src/resources/jetspeed.xml" />
  	
  	<!-- Copy OJB stuff -->
  	<copy file="${basedir}/../etc/db-ojb/repository_database.xml" todir="${install.src}/resources" overwrite="true" />   
  	
  	<!-- Copy Properties -->
  	<copy file="${basedir}/../portal/src/webapp/WEB-INF/conf/jetspeed.properties" todir="${install.src}/resources" overwrite="true" />
  	
  	<!-- Stuff that goes in shared/lib -->
  	<copy file="${maven.repo.local}/pluto/jars/pluto-&pluto-version;.jar" todir="${install.src}/resources"/>
    <copy file="${maven.repo.local}/portals-bridges/jars/portals-bridges-common-&portals-bridges-jsf-version;.jar" todir="${install.src}/resources"/>
    <copy file="../commons/target/jetspeed-commons-&jetspeed-version;.jar" todir="${install.src}/resources"/>
    <copy file="../jetspeed-api/target/jetspeed-api-&jetspeed-version;.jar" todir="${install.src}/resources"/>
    <copy file="../portlet-api/target/portlet-api-1.0.jar" todir="${install.src}/resources"/>
    
    <!--portlet apps -->
    <copy file="../layout-portlets/target/jetspeed-layouts.war" todir="${install.src}/resources"/>
    <copy file="../applications/demo/target/demo.war" todir="${install.src}/resources"/>
    <copy file="../applications/pam/target/pam.war" todir="${install.src}/resources"/>
    <copy file="../applications/jsf-demo/target/jsf-demo.war" todir="${install.src}/resources"/>
    <copy file="../applications/security/target/security.war" todir="${install.src}/resources"/>
    <copy file="../applications/php/target/php.war" todir="${install.src}/resources"/>
    <copy file="../applications/perl/target/perl.war" todir="${install.src}/resources"/>
    <copy file="../applications/rss/target/rss.war" todir="${install.src}/resources"/>
     	
  	
  	
  	<izpack input="${install.src}/install.xml"
  	        output="${basedir}/target/j2-install.jar"
  	        installerType="standard"
  	        basedir="${install.src}"
  	        izPackDir="${izpack.home}/"/>
 </goal>
 
 <goal name="define.izpack" >
   <ant:taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask">
     <ant:classpath> 
        <ant:path refid="maven.dependency.classpath"/>
     </ant:classpath>
    </ant:taskdef>
 </goal>

</project>