Subversion Repositories linid-om

[/] [trunk/] [misc/] [build.xml] - Rev 283

Compare with Previous | Blame | View Log

<project name="jetty" default="help" basedir=".." xmlns:artifact="urn:maven-artifact-ant">
    
    <!-- look for properties in ~/.lsc-build.properties, ~/lsc.properties -->
        <property file="${user.home}/.${ant.project.name}-build.properties" />
        <property file="${user.home}/build.properties" />
        <property file="build.properties" />
        <property environment="env" />
    
        <property name="jetty.version" value="9.0.1.v20130408" />
        <property name="jetty.url" value="http://eclipse.ialto.com/jetty/${jetty.version}/dist/jetty-distribution-${jetty.version}.zip" />
        <property name="build.dir" value="${basedir}/target" />
        <property name="build.classes.dir" value="${build.dir}/classes" />
        <property name="misc.dir" value="${basedir}/misc" />
        <property name="src.main.dir" value="${basedir}/src/main" />
        <property name="src.test.dir" value="${basedir}/src/test" />
        <property name="build.test-classes.dir" value="${build.dir}/test-classes" />
    
  <!--
            ===================================================================
              Download the Jetty package
            ===================================================================
        -->
        <target name="download-jetty" description="Download the Jetty archive" unless="jetty.archive.notexists">
                <fail unless="jetty.url" message="You must specify Jetty URL in this Ant build file in jetty.url variable"/>
                <get src="${jetty.url}" dest="${misc.dir}/jetty.zip" />
        </target>

        <target name="prepare-jetty" description="Prepare Jetty">
                <available file="${misc.dir}/jetty.zip" property="jetty.archive.notexists" value="true" />
                <antcall target="download-jetty" />

                <unzip src="${misc.dir}/jetty.zip" dest="${misc.dir}" overwrite="true">
                    <patternset>
                        <exclude name="jetty-*/contexts/**"/>
                        <exclude name="jetty-*/contrib/**"/>
                        <exclude name="jetty-*/distribution/**"/>
                        <exclude name="jetty-*/examples/**"/>
                        <exclude name="jetty-*/extras/**"/>
                        <exclude name="jetty-*/javadoc/**"/>
                        <exclude name="jetty-*/jxr/**"/>
                        <exclude name="jetty-*/modules/**"/>
                        <exclude name="jetty-*/patches/**"/>
                        <exclude name="jetty-*/project-website/**"/>
                        <exclude name="jetty-*/webapps/**"/>
                    </patternset>
                </unzip>
                <move todir="${misc.dir}/jetty" >
                        <fileset dir="${misc.dir}/jetty-distribution-${jetty.version}" />
                </move>
                <mkdir dir="${misc.dir}/jetty/contexts"/>
                <mkdir dir="${misc.dir}/jetty/webapps"/>
        </target>

        <target name="clean">
                <delete dir="${misc.dir}/jetty" />
                <delete file="${misc.dir}/jetty.zip" />
        </target>

    <!--
        ===================================================================
          Print the help message
        ===================================================================
        -->
        <target name="help">
                <echo>
            *****************************************
            LinShare Jetty packaging script
            *****************************************
            
            To get a embedded Jetty distribution
            &gt; ant prepare-jetty

            To clean
            &gt; ant clean
            
                </echo>
        </target>
    
</project>

Compare with Previous | Blame | View Log