home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java EE 6 example source code file (build.xml)

This example Java EE 6 source code file (build.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Java EE 6 tags/keywords

all, ant, connector, connector, copyright, create, create, deploy, glassfish, javamail, javamail, rar, rar, undeploy

The Java EE 6 build.xml source code

<?xml version="1.0"?>

<!-- ============================================================== -->
<!-- Ant XML MailConnector Connector sample application as deployed to -->
<!-- GlassFish.                                    -->
<!--                                                                -->
<!--
 Copyright 2004-2009 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.
-->
<!-- ============================================================== -->

<project name="mailconnector-connector-sample-ra" default="core" basedir=".">

    <property name="sample.home" value="../../../../../../"/>
    <property name="sample.name" value="mailconnector"/>

    <!-- include common properties -->
    <property file="../../../../../bp-project/common.properties"/>

    <!-- include main build file -->
    <import file="../../../../../bp-project/main.xml"/>

    <!-- rar specific properties -->
    <property name="rar" value="${sample.name}.rar"/>
    <property name="assemble.rar" value="${dist.dir}/rar"/>
    <property name="connector.dir" value="${sample.name}-ra/${assemble.rar}"/>
    <property name="connector.rar" value="${sample.name}-ra/${assemble.rar}/${rar}"/>
    <property name="rar.jar" value="${sample.name}.jar"/>

    <property name="specificjar.dir" value="${connector.dir}"/>
    <property name="specificjar.name" value="${rar}"/>

    <!--  javadocs -->
    <property name="javadoc.pkgnames" value="samples.connectors.mailconnector.*"/>



    <!-- =================== ASSEMBLE: Create JavaMail Connector RAR ========= -->

    <target name="add_classes_to_rar_jar">
        <jar destfile="${assemble.rar}/${rar.jar}" update="true">
            <zipfileset dir="${build.classes.dir}" includes="**/*.class"/>
        </jar>
    </target>

    <target name="add_properties_to_rar_jar">
        <jar destfile="${assemble.rar}/${rar.jar}" update="true">
            <zipfileset dir="${src.conf}" includes="**/*.properties"/>
        </jar>
    </target>


    <target name="mkdir_rar_common">
        <mkdir dir="${assemble.rar}"/>
        <mkdir dir="${build.classes.dir}"/>
    </target>

    <target name="assemble_connector_jar"
            depends="clean_rar_common, mkdir_rar_common,compile,
          add_classes_to_rar_jar, add_properties_to_rar_jar"
            description="Create Connector jar"/>

    <target name="assemble_rar" depends="assemble_connector_jar"
            description="Create JavaMail Rar">
        <echo message="Creating connector rar "/>
        <copy file="${assemble.rar}/${rar.jar}" tofile="${assemble.rar}/${rar}"/>
        <copy file="${assemble.rar}/${rar.jar}" tofile="../${rar.jar}"/>
        <copy file="${assemble.rar}/${rar.jar}" tofile="../${rar}"/>
    </target>

    <!-- =================== CLEAN : JavaMail Connector RAR ========= -->

    <target name="clean_rar_common">
        <delete dir="${assemble.rar}"/>
        <delete dir="${build.classes.dir}"/>
    </target>

    <!-- =================== DEPLOY : JavaMail Connector RAR ========= -->

    <target name="deploy_rar">
        <antcall target="deploy">
            <param name="app.module" value="${assemble.rar}/${rar}"/>
            <param name="module.name" value="${sample.name}"/>
        </antcall>
    </target>

    <!-- =================== UNDEPLOY : JavaMail Connector RAR ========= -->

    <target name="undeploy_rar">
        <antcall target="undeploy">
            <param name="module.name" value="${sample.name}"/>
        </antcall>
    </target>

</project>

Other Java EE 6 examples (source code examples)

Here is a short list of links related to this Java EE 6 build.xml source code file:



my book on functional programming

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.