ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Nicholson" <rob...@elastica.com>
Subject Don't understand ejb-jar examples.
Date Sat, 12 May 2001 20:01:21 GMT
Why is the weblogic-ejb-jar.xml descriptor _excluded_?

<ejbjar srcdir="${build.classes}"
            descriptordir="${descriptor.dir}"
            basejarname="TheEJBJar">
      <weblogic destdir="${deploymentjars.dir}"
                classpath="${descriptorbuild.classpath}"/>
      <include name="**/ejb-jar.xml"/>
      <exclude name="**/weblogic*.xml"/>
</ejbjar>

So the idea is to always build a generic jar and use a nested element
to build a vendors server jar?

Using this example will the weblogic descriptor get included or not?

    <ejbjar srcdir="${build.classes}"
            descriptordir="${descriptor.dir}"
            basejarname="TheEJBJar">
      <weblogic destdir="${deploymentjars.dir}"
                classpath="${descriptorbuild.classpath}"/>
      <include name="**/ejb-jar.xml"/>
      <exclude name="**/weblogic*.xml"/>
    </ejbjar>

If I'm not mistaken I'm assuming ejbjar is simply not vendor specific but
the
nested weblogic element knows to look for weblogic descriptors and include
them.

This would make sense as obviously once can then add vendor nested
extensions
to the ejbjar element.

Here's question. How do you specify multiple srcdir's?

If you look at the following Petstore rule you'll see they copy both util
and customer classes from the same level into the buildjar directory. It
would appear that I would
have to do the same in order to specify a common directory that contains
both sets
of classes. If I was able to specify mutiple sources I wouldn't have to do
to this.

<target name="customerejbjar" depends="init">
    <property name="customer.buildjardir"
value="${customer.home}/build/ejbjar"/>
    <mkdir dir="${customer.buildjardir}/META-INF"/>
    <copydir src="${customer.classbindir}" dest="${customer.buildjardir}" />
    <copydir src="${util.classbindir}" dest="${customer.buildjardir}" />
    <copyfile src="customer_ejb.xml"
dest="${customer.buildjardir}/META-INF/ejb-jar.xml" />
    <copyfile src="weblogic-ejb-jar.xml"
dest="${customer.buildjardir}/META-INF/weblogic-ejb-jar.xml" />
    <delete file="${customer.ejbjar}"/>
    <jar jarfile="${customer.ejbjar}" basedir="${customer.buildjardir}"/>
    <deltree dir="${customer.buildjardir}"/>
  </target>



Mime
View raw message