Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 22a0532f0f4351d8147c73d7d777d24e > files > 1

geronimo-specs-1.0-3.8.1mdv2008.0.src.rpm

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--

    Copyright 2005 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.
-->
  

<!-- $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $ -->

<project default="default"
    xmlns:j="jelly:core"
    xmlns:define="jelly:define"
    xmlns:maven="jelly:maven"
    xmlns:idlj="corba:idlj"
    >

    <property name="idlj.verbose" value="-verbose"/>
    <property name="pkg.prefix" value="org.omg"/>

    <preGoal name="java:compile">
        <attainGoal name="interop:idlj"/>
    </preGoal>

    <goal name="interop:idlj">
        <idlj:idlj idlFile="IOP"/>
        <idlj:idlj idlFile="GIOP"/>
        <idlj:idlj idlFile="IIOP"/>
        <idlj:idlj idlFile="CosNaming"/>
        <idlj:idlj idlFile="CSI"/>
        <idlj:idlj idlFile="GSSUP"/>
        <idlj:idlj idlFile="CSIIOP"/>
        <idlj:idlj idlFile="TimeBase"/>
        <idlj:idlj idlFile="Security"/>
        <idlj:idlj idlFile="SSLIOP"/>
        <idlj:idlj idlFile="CosTransactions"/>
        <idlj:idlj idlFile="CosTSInteroperation"/>
    </goal>

    <!--
      #
      # Be carefull about changing the package prefix.  When generating the java
      # files for the .IDL files, they will normally go into a package that
      # corresponds with the module.  I originally had o.a.g.i.org.omg as the
      # prefix, but the idlj tool would generate the GIOP in a wrong package:
      # o.a.g.i.org.omg.o.a.g.i for some strange reason.
    -->
    <define:taglib uri="corba:idlj">
        <define:tag name="idlj">
            <j:if test="${context.getVariable('idlFile') == null}">
                <fail>Missing required attribute: idlFile=${idlFile}</fail>
            </j:if>

            <!-- Create an output directory for the generated sources-->
            <property name="maven.idl.target" value="${maven.build.dir}/idl"/>
            <mkdir dir="${maven.idl.target}"/>

            <!-- Add the output directory the the maven list of sources -->
            <j:if test="${context.getVariable('idl.src.added') == null}">
                <j:if test="${context.antProject.getReference('maven.compile.src.set') != null}">
                    <path id="maven.idl.compile.src.set" location="${maven.idl.target}"/>
                    <maven:addPath id="maven.compile.src.set" refid="maven.idl.compile.src.set"/>
                </j:if>
                <j:if test="${context.antProject.getReference('maven.compile.src.set') == null}">
                    <echo message="Maven cannot find the generated sources unless you provide a dummy source directory in project.xml"/>
                </j:if>
                <property name="idl.src.added" value="true"/>
            </j:if>

            <!-- check if we are up to date -->
            <uptodate property="idl.build.not.required"
                srcfile="${maven.src.dir}/idl/${idlFile}.idl"
                targetfile="${maven.idl.target}/${idlFile}.ts"/>

            <!-- if we are not up to date generate the source -->
            <j:if test="${context.getVariable('idl.build.not.required') != 'true'}">
                <echo>


Interop :: idlj :: ${idlFile}</echo>
                <exec dir="${maven.idl.target}" executable="idlj" failonerror='true'>
                    <arg value="-i"/>
                    <arg file="${java.home}/lib"/>
                    <arg value="-i"/>
                    <arg file="${maven.src.dir}/idl"/>
                    <arg value="${idlj.verbose}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="IOP"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="IIOP"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="GIOP"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="CosNaming"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="CSI"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="GSSUP"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="CSIIOP"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="TimeBase"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="Security"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="SSLIOP"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="CosTransactions"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="CosTSInteroperation"/>
                    <arg value="${pkg.prefix}"/>
                    <arg value="-pkgPrefix"/>
                    <arg value="CosTSPortability"/>
                    <arg value="${pkg.prefix}"/>
                    <arg file="${maven.src.dir}/idl/${idlFile}.idl"/>
                </exec>
                <!-- We generated the source, so touch the timestamp file -->
                <touch file="${maven.idl.target}/${idlFile}.ts"/>
            </j:if>
        </define:tag>
    </define:taglib>
</project>