New jre layout broke Maven and Ant
Mike Swingler
swingler at apple.com
Mon Oct 3 08:38:53 PDT 2011
On Oct 2, 2011, at 11:35 PM, Henri Gomez wrote:
>> This also broke building OpenJDK8 (mlvm)
>>
>> The build system for OpenJDK 8 requires a working Java 1.7.
>>
>> The build fails with this error (confusing because I have ant v1.8.2 installed):
>>
>> ANT_VER = 1.7.0. [requires at least 1.7.1]
>>
>> When ant -version is called from the build scripts this is the output:
>>
>> Unable to locate tools.jar. Expected to find it in /Users/stephen/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Home/lib/tools.jar Apache Ant(TM) version 1.8.2 compiled on June 3 2011
>>
>> And unfortunately the code that looks for a version string finds the Java version '1.7.0' first:
>>
>> jdk/make/shared/common/Defs.gmk:135
>>
>
> Yes, we should get back to regular layout, ie the same one used in
> Linux, BSD and Windows (and Solaris I think).
>
> OpenJDK being Java 7 RI, having a common / consistent layout for all
> platforms executing it, is just mandatory.
> Using symlink hacks to solve detection of locations problems are
> dirty, and requiring app developers to add specific hacks for OpenJDK
> 7 on OSX, will slow down its adoption on OS/X.
> Seeing the hard works done on porting Apple works on OpenJDK, it will
> be a strange signal to OSX users/developpers community.
We still need a .jre bundle to support double-clickable .app launching, so my thinking is that two separate .jre and .jdk bundles should be created. The .jdk bundle with contain a Contents/Home/jre, which will match the conventional layout.
In addition, I'm thinking that we should discontinue the j2sdk-image and j2re-image output targets, because they are just copies of the (required) bundle's contents.
Sound reasonable?
Mike Swingler
Java Engineering
Apple Inc.
More information about the macosx-port-dev
mailing list