ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Levine <BLev...@blueripple.com>
Subject Incremental updates not working using <ejbjar> task
Date Fri, 17 Aug 2001 15:04:15 GMT
Hi,

This is pretty strange so it could be operator error but...

I'm running ANT 1.3 with JDK 1.3 on Win2K.  I'm using the the <ejbjar> task
to build a number of EJB JAR files for WebLogic 5.1.  I have a rebuild
target which does a full clean and then rebuilds everything from scratch.  I
also have a "build" target which does an incremental build rebuilding only
those sources that have been modified.  Everything works fine in the rebuild
case.  However, the following scenario does not work in the incremental
case:

I modify a support class that is included in the EJB JAR via the <support>
element.  This file is re-compiled and, according to the ant -debug output,
ANT correctly determines that this file is newer than the JAR file and adds
it to the JAR file.  However, it isn't really added to the JAR!  If I take a
look at the JAR, although the timestamp of the .class file has changed, it's
still the old .class file.  I know this because the size of the .class file
in the JAR file does not match the size of the .class file in my build tree.
It still has the same size as before I modified the file.  However, if I
delete the JAR file before building, everything works fine and the new
.class file is included.  To investigate this a bit further, I set
keepgeneric="true".  In the incremental case, the generic JAR file *does*
contain the new .class file but the weblogic JAR file does not.

Has anyone seen this?  I'm looking at the ANT 1.3 sources now but the
problem is not immediately apparent.  The ANT target I use for this is
included below.

Thanks.

-brian

    <target name="deploy-brxml" depends="compile">
        <ejbjar srcdir="${build.dir}"
descriptordir="com/blueripple/brxml/META-INF" basejarname="brxml" >
        	<classpath refid="weblogic.classpath" />        	
            <weblogic compiler="${build.compiler}" destdir="${build.dir}"
args="-nowarn"  rebuild="false" keepgeneric="true">
            	<classpath refid="classpath" />
            </weblogic>            
            <include name="ejb-jar.xml" />
            <exclude name="weblogic-ejb-jar.xml" />            
            <support dir="${build.dir}">
                <include name="com/blueripple/brxml/**/*.class" />
                <exclude name="com/blueripple/brxml/BrxmlErrorHandler.class"
/>
                <exclude name="com/blueripple/Xmlizable.class" />
            </support>
            <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN"
 
location="${BR_WL_HOME}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
            <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
 
location="${BR_WL_HOME}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-jar
.dtd"/>     
        </ejbjar>
    </target>

Mime
View raw message