openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Enforcing JDK 1.4-specific modules
Date Wed, 13 Jun 2007 14:21:56 GMT
There is a maven flag that you can put into maven's that specifies the level of jdk to use for that  

maven.compile.source = 1.4 = 1.4

This can be dropped into those projects that we want to compile with  
1.4. This will enforce the dependency at compile time.


On Jun 13, 2007, at 12:55 AM, Marc Prud'hommeaux wrote:

> We recently had some problems where JDK 1.5-specific methods (e.g.,  
> String.contains(String)) were slipping into JDK 1.4-specific  
> modules. This isn't a problem for stand-alone OpenJPA (whose only  
> implementation is JPA, which is JDK 1.5-dependent), but other  
> products built on OpenJPA may still support JDK 1.4.
> To that end, I've added a 'java14.jar' property to the pom.xml  
> files that can be used to specify the location of the JDK 1.4  
> runtime jar, against which we will compile the JDK 1.4-specific  
> modules. Since the location of the JDK 1.4 runtime jar is platform-  
> and installation- dependent, we can't just rely on a single  
> location (nor is there any maven-friendly JDK 1.4 runtime jar that  
> I am aware of), the flag needs to be specified manually.
> Note that the flag will be silently ignored when it is unspecified,  
> which I expect will be the common case for most OpenJPA developers.  
> You only need to use it if you are interested in ensuring that any  
> code you add to JDK 1.4 modules won't break 1.4 compatibility.

Craig Russell
Architect, Sun Java Enterprise System
408 276-5638
P.S. A good JDO? O, Gasp!

View raw message