Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Replace version of JUnit in Galileo with previous version from Ganymede?
icon5.gif  Replace version of JUnit in Galileo with previous version from Ganymede? [message #375274] Wed, 29 July 2009 18:54 Go to next message
Mike Norman is currently offline Mike NormanFriend
Messages: 35
Registered: July 2009
Member
Is there a way to 'downgrade' the version of JUnit4 shipped in Galileo?

Our internal use hasn't gone past JUnit 4.3.1 and the new
Galileo release has 4.5.0, which includes references to
'org.hamcrest.*', causing some problems Sad
Re: Replace version of JUnit in Galileo with previous version from Ganymede? [message #407509 is a reply to message #375274] Thu, 30 July 2009 06:57 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Mike Norman ha scritto:
> Is there a way to 'downgrade' the version of JUnit4 shipped in Galileo?
>
> Our internal use hasn't gone past JUnit 4.3.1 and the new
> Galileo release has 4.5.0, which includes references to
> 'org.hamcrest.*', causing some problems :(

Couldn't you simply replace the JUnit library from Eclipse 3.5 with your
JUnit 4.3.1 JAR in the project buildpath configuration?

Mauro.
Re: Replace version of JUnit in Galileo with previous version from Ganymede? [message #412548 is a reply to message #375274] Thu, 30 July 2009 09:08 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Mike Norman wrote:
> Is there a way to 'downgrade' the version of JUnit4 shipped in Galileo?
>
> Our internal use hasn't gone past JUnit 4.3.1 and the new
> Galileo release has 4.5.0, which includes references to
> 'org.hamcrest.*', causing some problems :(
What problems?

Dani
Re: Replace version of JUnit in Galileo with previous version from Ganymede? [message #424652 is a reply to message #412548] Thu, 30 July 2009 13:28 Go to previous messageGo to next message
Mike Norman is currently offline Mike NormanFriend
Messages: 35
Registered: July 2009
Member

Well. we have Ant build scripts that operate across all the project's modules - and these scripts don't 'know' anything about JUnit 4.5 (which includes references to the classes in org.hamcrest.*).
So, if you re-compile the classes external to the Eclipse IDE, then JUnit 4.3.1 references are compiled in; if the classes are re-compiled internal to Eclipse, then 4.5 references are compiled in.

In addition to org.hamcrest references, it appears that some assert APIs are not backwards-compatible (class linkage errors - different method signature)
Re: Replace version of JUnit in Galileo with previous version from Ganymede? [message #430120 is a reply to message #424652] Thu, 30 July 2009 15:30 Go to previous message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Mike Norman ha scritto:
> In addition to org.hamcrest references, it appears that some assert APIs
> are not backwards-compatible (class linkage errors - different method
> signature)

I think that your only problem is the latter one. There should be no
problems to compile against JUnit 4.3.1 or JUnit 4.5 and run using one
another if you don't use org.hamcrest.* classes.

For instance, for a long time we internally wrote tests using Eclipse
3.3/3.4 (so JUnit 4.3.1) while having configured our Ant script to use
JUnit 4.4.0. The only problem was to avoid the use of boxing/unboxing in
some cases, otherwise some code did compile against JUnit 4.3.1 but not
against JUnit 4.4.0, because of the introduction of new overloadings for
some assert methods.

Mauro.
Previous Topic:Ecliple copying plugins into project directory
Next Topic:Strange message hover Enums
Goto Forum:
  


Current Time: Fri Apr 19 05:18:51 GMT 2024

Powered by FUDForum. Page generated in 0.02114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top