Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 118489

Summary: dev-java/junit ebuild uses previously installed junit during build
Product: Gentoo Linux Reporter: Mikko Tiihonen <mikko.tiihonen>
Component: New packagesAssignee: Java team <java>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mikko Tiihonen 2006-01-09 23:08:16 UTC
I had previously compiled dev-java/junit with java 5.0.
To get support for java 1.4 I wanted to recompiled junit with 1.4.2 jdk.
Unfortunately it fails because the junit build seems to put the previous junit jar into it's classpath and miserably fails. To fix this I had to emerge -C junit before re-emerging the junit with 1.4 jdk.

versiontag:
     [copy] Copying 1 file to /var/tmp/portage/junit-3.8.1-r1/work/junit3.8.1/junit/runner
     [move] Moving 1 file to /var/tmp/portage/junit-3.8.1-r1/work/junit3.8.1/junit/runner

build:

BUILD FAILED
java.lang.UnsupportedClassVersionError: (junit/framework/TestListener) bad major version at offset=6
Comment 1 Josh Nichols (RETIRED) gentoo-dev 2006-01-10 06:07:37 UTC
(In reply to comment #0)
> I had previously compiled dev-java/junit with java 5.0.
> To get support for java 1.4 I wanted to recompiled junit with 1.4.2 jdk.
> Unfortunately it fails because the junit build seems to put the previous junit
> jar into it's classpath and miserably fails. To fix this I had to emerge -C
> junit before re-emerging the junit with 1.4 jdk.

Ant puts junit on the classpath, so that a user has access to the junit task.

Aside from that, marking invalid, because this is the fun type of problem you'll run into when dealing with a system that runs, or used to run, a 1.5 JDK for a system VM.