Skip to main content

Source code file content

Revision: 64079 (of 64079)

setting clean revision
» Project Revision History

» Checkout URL

svn / tags / source-build-3.0.1 / mojarra.xml

Size: 12960 bytes, 1 line
<?xml version="1.0" encoding="iso-8859-1"?>

<project name="Mojarra source integration" default="build" basedir="." xmlns:artifact="urn:maven-artifact-ant">

    <!-- import build.xml for init target and inherited properties -->
    <import file="build.xml"/>
    <property name="jsf.build.home" value="${external.dir}/mojarra"/>
    <property name="container.name" value="glassfishV3"/>
    <property name="yuicompressor.jar" value="${external.dir}/yuicompressor/build/yuicompressor-2.4.2.jar"/>
    <property name="yuicompressor.jar.dest" value="${external.dir}/mojarra/dependencies/jars/yuicompressor.jar"/>
    <property name="jargs.jar.dest" value="${external.dir}/yuicompressor/lib/jargs-1.0.jar"/>
    <property name="jargs.jar" value="${external.dir}/jargs/lib/jargs.jar"/>
    <property name="commons.logging.pom.loc" value="${external.dir}/commons-logging/commons-logging-1.0.4.pom"/>
    <property name="commons.logging.jar" value="${external.dir}/commons-logging/target/commons-logging.jar"/>
    <property name="commons.collections.pom.loc" value="${external.dir}/commons-collections/commons-collections-2.1.1.pom"/>
    <property name="commons.collections.jar" value="${external.dir}/commons-collections/dist/commons-collections-2.1.1.jar"/>
    <property name="commons.beanutils.pom.loc" value="${external.dir}/commons-beanutils/commons-beanutils-1.6.1.pom"/>
    <property name="commons.beanutils.jar" value="${external.dir}/commons-beanutils/dist/commons-beanutils.jar"/>
    <property name="commons.digester.pom.loc" value="${external.dir}/commons-digester/commons-digester-1.5.pom"/>
    <property name="commons.digester.jar" value="${external.dir}/commons-digester/dist/commons-digester.jar"/>
    <property name="groovy.pom.loc" value="${external.dir}/groovy/groovy-all-1.6.4.pom"/>
    <property name="groovy.jar" value="${external.dir}/groovy/groovy-all-1.6.4.jar"/>
    <property name="jsf-api.pom.template" value="${external.dir}/mojarra/common/ant/template/jsf-api-pom-template.xml"/>
    <property name="jsf-api.jar" value="${external.dir}/mojarra/jsf-api/build/lib/jsf-api.jar"/>
    <property name="jsf-impl.pom.template" value="${external.dir}/mojarra/common/ant/template/jsf-api-pom-template.xml"/>
    <property name="jsf-impl.jar" value="${external.dir}/mojarra/jsf-ri/build/lib/jsf-impl.jar"/>
    
    
    <target name="build" depends="init">
        <antcall target="mojarra.build" />
    </target>

    <target name="initialize.maven">
        <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
                 classpath="lib/maven-ant-tasks-2.0.10.jar"/>
        <condition property="maven.repo.local" value="${maven.repo.local}" else="${user.home}/.m2/repository">
            <isset property="maven.repo.local"/>
        </condition>
    </target>

    <!--
        Checkout Mojarra source and build
    -->
    <target name="mojarra.checkout">
        <echo message="checkout Mojarra from ${mojarra.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${mojarra.svn.url}" />
            <arg line="mojarra" />
        </exec>
    </target>
    
    <target name="mojarra.build" depends="yuicompressor.build, mojarra.checkout, commons.digester.install, groovy.install" >
        <!-- copy yui compressor jar -->
        <copy file="${yuicompressor.jar}" tofile="${yuicompressor.jar.dest}" overwrite="true"/>    

        <!-- build mojarra -->
        <exec executable="ant" dir="${external.dir}/mojarra" failonerror="true" >
            <arg line="-Djsf.build.home=${jsf.build.home}" />
            <arg line="-Dmaven.repo.local=${maven.repo.local}" />
            <arg line="-Dcontainer.name=${container.name}" />
            <arg line="-f build-source.xml" />
            <arg line="main" />
        </exec>
    </target>

    <target name="mojarra.install" depends="mojarra.build, initialize.maven">
        <echo>maven.repo.local=${maven.repo.local}</echo>
        <echo>creating JSF poms</echo>
        <copy file="${jsf-api.pom.template}" tofile="${external.dir}/mojarra/jsf-api.pom" 
              overwrite="true"/>
            <replace file="${external.dir}/mojarra/jsf-api.pom"
                     token="@version@"
                     value="${mojarra.version}" />
        <copy file="${jsf-impl.pom.template}" tofile="${external.dir}/mojarra/jsf-impl.pom"
              overwrite="true"/>
            <replace file="${external.dir}/mojarra/jsf-impl.pom"
                     token="@version@"
                     value="${mojarra.version}" />
        <artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
        <artifact:pom file="${external.dir}/mojarra/jsf-api.pom" id="jsf-api.pom"/>
        <artifact:install file="${jsf-api.jar}">
            <pom refid="jsf-api.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>    
        <artifact:pom file="${external.dir}/mojarra/jsf-impl.pom" id="jsf-impl.pom"/>
        <artifact:install file="${jsf-impl.jar}">
            <pom refid="jsf-impl.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>    
    </target>

    <macrodef name="create.pom">
        <attribute name="template.file"/>
        <attribute name="output.file"/>
        <attribute name="version"/>
        <sequential>
            <copy file="@{template.file}" tofile="@{output.file}"/>
            <replace file="@{output.file}"
                     token="@version@"
                     value="@{version}"/>
        </sequential>
    </macrodef>

    <target name="yuicompressor.checkout">
        <echo message="checkout YUI Compressor from ${yuicompressor.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${yuicompressor.svn.url}" />
            <arg line="yuicompressor" />
        </exec>
    </target>

    <target name="yuicompressor.build" depends="yuicompressor.checkout, jargs.build" >
        <!-- copy jargs jar -->
        <copy file="${jargs.jar}" tofile="${jargs.jar.dest}" overwrite="true"/>    

        <!-- build YUI Compressor -->
        <exec executable="ant" dir="${external.dir}/yuicompressor" failonerror="true" />
    </target>


    <target name="jargs.checkout">
        <echo message="checkout JArgs from ${jargs.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${jargs.svn.url}" />
            <arg line="jargs" />
        </exec>    
    </target>

    <target name="jargs.build" depends="jargs.checkout" >
        <!-- build JArgs -->
        <exec executable="ant" dir="${external.dir}/jargs" failonerror="true" >
            <arg line="-Djunit.jar=${maven.repo.local}/${junit.mvn.path}" />
        </exec>
    </target>
    
    <target name="commons.logging.checkout">
        <echo message="checkout Commons Logging from ${commons.logging.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${commons.logging.svn.url}" />
            <arg line="commons-logging" />
        </exec>    
    </target>
   
    <target name="commons.logging.build" depends="commons.logging.checkout">
        <!-- build Commons Logging -->
        <exec executable="ant" dir="${external.dir}/commons-logging" failonerror="true" />
    </target>

    <target name="commons.logging.install" depends="commons.logging.build, initialize.maven" >
        <echo>maven.repo.local=${maven.repo.local}</echo>
        <artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
        <artifact:pom file="${commons.logging.pom.loc}" id="commons.logging.pom"/>
        <artifact:install file="${commons.logging.jar}">
            <pom refid="commons.logging.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>
    </target>

    <target name="commons.collections.checkout">
        <echo message="checkout Commons Collections from ${commons.collections.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${commons.collections.svn.url}" />
            <arg line="commons-collections" />
        </exec>    
    </target>
   
    <target name="commons.collections.build" depends="commons.collections.checkout">
        <!-- build Commons Logging -->
        <exec executable="ant" dir="${external.dir}/commons-collections" failonerror="true">
            <arg line="dist-jar"/>
        </exec>
    </target>
   
    <target name="commons.collections.install" depends="commons.collections.build, initialize.maven" >
        <echo>maven.repo.local=${maven.repo.local}</echo>
        <artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
        <artifact:pom file="${commons.collections.pom.loc}" id="commons.collections.pom"/>
        <artifact:install file="${commons.collections.jar}">
            <pom refid="commons.collections.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>
    </target>

    <target name="commons.beanutils.checkout">
        <echo message="checkout Commons Beanutils from ${commons.beanutils.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${commons.beanutils.svn.url}" />
            <arg line="commons-beanutils" />
        </exec>    
    </target>

    <target name="commons.beanutils.build" depends="commons.beanutils.checkout, commons.logging.install, commons.collections.install">
        <!-- build Commons Beanutils -->
        <exec executable="ant" dir="${external.dir}/commons-beanutils" failonerror="true">
            <arg line="-Dcommons-collections.jar=${commons.collections.jar}"/>
            <arg line="-Dcommons-logging.jar=${commons.logging.jar}"/>
            <arg line="dist"/>
        </exec>
    </target>

    <target name="commons.beanutils.install" depends="commons.beanutils.build, initialize.maven">
        <echo>maven.repo.local=${maven.repo.local}</echo>
        <artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
        <artifact:pom file="${commons.beanutils.pom.loc}" id="commons.beanutils.pom"/>
        <artifact:install file="${commons.beanutils.jar}">
            <pom refid="commons.beanutils.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>
    </target>

    <target name="commons.digester.checkout">
        <echo message="checkout Commons Digester from ${commons.digester.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${commons.digester.svn.url}" />
            <arg line="commons-digester" />
        </exec>    
    </target>

    <target name="commons.digester.build" depends="commons.digester.checkout, commons.beanutils.install">
        <!-- build Commons Beanutils -->
        <exec executable="ant" dir="${external.dir}/commons-digester" failonerror="true">
            <arg line="-Dcommons-collections.jar=${commons.collections.jar}"/>
            <arg line="-Dcommons-logging.jar=${commons.logging.jar}"/>
            <arg line="-Dcommons-beanutils.jar=${commons.beanutils.jar}"/>
            <arg line="dist"/>
        </exec>
    </target>


    <target name="commons.digester.install" depends="commons.digester.build, initialize.maven" >
        <echo>maven.repo.local=${maven.repo.local}</echo>
        <artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
        <artifact:pom file="${commons.digester.pom.loc}" id="commons.digester.pom"/>
        <artifact:install file="${commons.digester.jar}">
            <pom refid="commons.digester.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>
    </target>

    <target name="groovy.checkout">
        <echo message="checkout Groovy Binary from ${groovy.svn.url}."/>
        <exec executable="svn" dir="${external.dir}" failonerror="true" >
            <arg line="checkout" />
            <arg line="${groovy.svn.url}" />
            <arg line="groovy" />
        </exec>    
    </target>

    <target name="groovy.install" depends="groovy.checkout, initialize.maven" >
        <echo>maven.repo.local=${maven.repo.local}</echo>
        <artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
        <artifact:pom file="${groovy.pom.loc}" id="groovy.pom"/>
        <artifact:install file="${groovy.jar}">
            <pom refid="groovy.pom"/>
            <localRepository refid="local.repository"/>
        </artifact:install>    
    </target>

</project>
 
 
Close
loading
Please Confirm
Close