dev@glassfish.java.net

Re: Work around for current build failures

From: Harsha Godugu <Harsha.Godugu_at_Sun.COM>
Date: Mon, 04 Aug 2008 13:52:05 -0700

Shing Wai Chan wrote:
> Jan.Luehe_at_Sun.COM wrote:
>> Sahoo wrote:
>>
>>> Thanks to Jan, who pointed out that URL does not work any more. Ti
>>> check out hk2, use this instead:
>>>
>>> svn co https://svn.dev.java.net/svn/hk2/trunk/hk2
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> Sahoo wrote:
>>>
>>>> Currently various v3 jobs are failing because of what appears to be
>>>> hudson issues. If you have revision #21565 of v3, then to have a
>>>> successful build follow the procedure below:
>>>>
>>>> svn co http://hk2.dev.java.net/svn/hk2/trunk/hk2
>>>> cd hk2
>>>> mvn install
>>>
>>
>> Is anybody else getting the attached error during "mvn install"?
> This is a known issue.
> Just run mvn install "again". Then the error will be gone.
A possible workaround is, to do an incremental build. Means, goto
sub-dirs and do mvn isntall at that level. Then come back to the top
level and give mvn install.
A bug in maven-bundle plug-in is causing this failure. The jar file in
question (here,

/space/luehe/ws/hk2/external/tiger-types/target/tiger-types-osgi-0.3.11-SNAPSHOT.jar ) is getting corrupted as it was opened for reading earlier, by another thread, during bundling process.

Maven-bundle-plugin is doing a stupid thing. It's opening the jar files (using file i/o) and leaving them for GC to run finalizers to close the streams.
A good programming practice is to close the accessed streams explicitly.

-hg