jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: [continuum] BUILD FAILURE: Apache Jackrabbit - Jackrabbit Core - Build Def: Jackrabbit build with Java 1.4
Date Mon, 18 Feb 2008 13:52:30 GMT

On Feb 18, 2008 3:45 PM, Martijn Hendriks <martijnh@gx.nl> wrote:
> Sorry about that. I see that I accidentally used a Java 1.5 method (java.lang.String.contains).
> The strange thing is, however, that it compiles fine locally despite of the configuration
> of the maven-compiler-plugin (source and target set to 1.4). I assumed that this setting
> would catch anything w.r.t. Java 1.5 features. Should it, or am I missing something here?

I've stumbled on the same thing a few times... The problem is that the
compiler plugin settings only affect the Java language features, not
the standard library against which the code is compiled. So even if
you're restricted from using generics or other Java 5 features, all
the new methods, classes and interfaces in the standard library are
still available if you use Java 5 or higher to run Maven and thus
compile the code.

The best workaround to this problem that I've come across so far is to
create custom mvn4 and mvn5 scripts that start Maven with JAVA_HOME
set to Java 1.4 and Java 5 installations respectively. Then you just
need to use "mvn4 clean install" whenever compiling Jackrabbit trunk.

> Anyway, going to fix it now.

ACK, thanks.


Jukka Zitting

View raw message