SERG-Delft / jpacman-framework

Pacman-inspired game, for teaching testing purposes.
126 stars 253 forks source link

Investigate dependency resolution issue with JUnit #82

Closed TimvdLippe closed 7 years ago

TimvdLippe commented 8 years ago

There appears to be a dependency resolution issue with JUnit. Cucumber 1.2.4 requires JUnit 4.11, whereas the framework requires JUnit 4.12.

There seem to be two possible solutions:

  1. Exclude the JUnit dependency on Cucumber in the pom.xml
  2. Bump cucumber to version 1.2.5-SNAPSHOT which does depend on JUnit 4.12 (originally junit 4.12 broke compatibility with android) See https://github.com/SERG-Delft/jpacman-framework/issues/82#issuecomment-215454113
avandeursen commented 8 years ago

I'd say updating the dependency (to 1.2.5-SNAPSHOT) is the best thing to do, and then bump to 1.2.5 as soon as it is available.

jwgmeligmeyling commented 8 years ago

Dependency divergence in the minor part of the version number, for test scoped dependencies, doesn't seem any problem to me? Otherwise we would be writing [version] everywhere in our pom.xml versions, right?

TimvdLippe commented 8 years ago

Option 2 appears to be impossible, as 1.2.5-SNAPSHOT is not published on the mvn repository and therefore mvn install will fail with the message

[ERROR] Failed to execute goal on project jpacman-framework: Could not resolve dependencies for project nl.tudelft.jpacman:jpacman-framework:jar:6.4.0: The following artifacts could not be resolved: info.cukes:cucumber-java:jar:1.2.5-SNAPSHOT, info.cukes:cucumber-junit:jar:1.2.5-SNAPSHOT: Could not find artifact info.cukes:cucumber-java:jar:1.2.5-SNAPSHOT -> [Help 1]

TimvdLippe commented 8 years ago

Cucumber 1.2.5 has been released and uses JUnit 4.12

TimvdLippe commented 7 years ago

We probably need to see if there again problems with the adoption of JUnit 5 per #99

avandeursen commented 7 years ago

Thanks! We're using Cucumber 1.2.5 now, and it works. It does still rely on good old JUnit 4 and its RunWith extensions at the moment, but that works.