ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <Wendy.Sm...@asu.edu>
Subject Javac target="1.4" not complaining about a method new in 1.5
Date Fri, 03 Dec 2004 21:44:12 GMT

I have Java 1.5 on my development machine, and just deployed a webapp to
the HP-UX server which has 1.4.2.  And it broke, because I used
String.replace(String,String) which is new in 1.5.

So I went back and changed my javac task to include target="1.4".  But
it still compiles with no errors.

    <!-- Normal build of application -->
    <target name="compile" depends="init">
        <javac srcdir="src" destdir="classes" deprecation="on" 
               debug="on" target="1.4">
            <classpath refid="compile.classpath"/>
        </javac>
    </target>

n:\SharedSource\BenefactorAuth\benauth-dev>ant
Buildfile: build.xml
clean:
   [delete] Deleting directory
N:\SharedSource\BenefactorAuth\benauth-dev\classes
    [mkdir] Created dir:
N:\SharedSource\BenefactorAuth\benauth-dev\classes
compile:
    [javac] Compiling 26 source files to
N:\SharedSource\BenefactorAuth\benauth-dev\classes

One of those classes contains:
    String orgCode = "ASU";
    String fixedUrl = harrisUrl.replace( "ORG_CODE", orgCode );

??  I think it should have complained about that line, as the JVM on the
server did.  Or am I using 'target' incorrectly?  (Ant 1.6.2)

Thanks,
-- 
Wendy Smoak

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message