Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven deps picks up junit 4.11-beta-1 #24

Open
binkley opened this issue Nov 25, 2014 · 9 comments
Open

Maven deps picks up junit 4.11-beta-1 #24

binkley opened this issue Nov 25, 2014 · 9 comments

Comments

@binkley
Copy link
Contributor

binkley commented Nov 25, 2014

This may not be an issue. Tests work fine that I can tell. More of a "hygiene" concern.

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ system-rules ---
[WARNING] The artifact junit:junit-dep:jar:4.11-beta-1 has been relocated to junit:junit:jar:4.11-beta-1
[INFO] com.github.stefanbirkner:system-rules:jar:1.8.0-SNAPSHOT
[INFO] +- junit:junit:jar:4.11-beta-1:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] \- org.mockito:mockito-core:jar:1.10.8:test
[INFO]    \- org.objenesis:objenesis:jar:2.1:test
@stefanbirkner
Copy link
Owner

I think this is because junit:junit-dep 4.11-beta-1 is the first release that relocates to junit:junit. It looks like being a Maven bug. Hopefully I find the bug.

@binkley
Copy link
Contributor Author

binkley commented Jan 16, 2015

@ShaneSkyWalker
Copy link

I just came across a problem.
When I use "mvn package" to package a project it tells "org.junit.contrib.java.lang.system" not found.
[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/huangxiangyu/Documents/Coding/JudgeEncode/Huang/src/main/java/soundsystem/CDPlayerTest.java:[8,42] 程序包org.junit.contrib.java.lang.system不存在 [ERROR] /Users/huangxiangyu/Documents/Coding/JudgeEncode/Huang/src/main/java/soundsystem/CDPlayerTest.java:[20,22] 找不到符号 符号: 类 StandardOutputStreamLog 位置: 类 soundsystem.CDPlayerTest [ERROR] /Users/huangxiangyu/Documents/Coding/JudgeEncode/Huang/src/main/java/soundsystem/CDPlayerTest.java:[20,56] 找不到符号 符号: 类 StandardOutputStreamLog 位置: 类 soundsystem.CDPlayerTest [INFO] 3 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.282 s [INFO] Finished at: 2016-11-09T11:16:21+08:00 [INFO] Final Memory: 15M/168M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Huang: Compilation failure: Compilation failure: [ERROR] /Users/huangxiangyu/Documents/Coding/JudgeEncode/Huang/src/main/java/soundsystem/CDPlayerTest.java:[8,42] 程序包org.junit.contrib.java.lang.system不存在 [ERROR] /Users/huangxiangyu/Documents/Coding/JudgeEncode/Huang/src/main/java/soundsystem/CDPlayerTest.java:[20,22] 找不到符号 [ERROR] 符号: 类 StandardOutputStreamLog [ERROR] 位置: 类 soundsystem.CDPlayerTest [ERROR] /Users/huangxiangyu/Documents/Coding/JudgeEncode/Huang/src/main/java/soundsystem/CDPlayerTest.java:[20,56] 找不到符号 [ERROR] 符号: 类 StandardOutputStreamLog [ERROR] 位置: 类 soundsystem.CDPlayerTest [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

The Chinese words generally means the package "org.junit.contrib.java.lang.system" not exist.

@sschuberth
Copy link

This is probably solved by #60. The problem is that a few "strange" versions of junit-dep seem to be floating around, which Maven regards as the newest version as more recent JUnit versions were only published under the junit name (not under the junit-dep name).

@matthewmcgarvey
Copy link

Can the junit-dep dependency version just be hardcoded 4.11? We just ran into this problem as well. The dependency is 6 years old now, I doubt it will change.

@stefanbirkner
Copy link
Owner

Did you encounter any problems with JUnit 4.11-beta-1 or is it "only" a "hygiene concern".

@matthewmcgarvey
Copy link

that dependency has a dependency that can resolve to a snapshot

@stefanbirkner
Copy link
Owner

I know, but I like to understand your problem. Do you "only" want no snapshot dependencies or do you have a more serious problem?

@matthewmcgarvey
Copy link

matthewmcgarvey commented Aug 23, 2018

The snapshot dependency has been the only issue. I've read your reasoning elsewhere for why you have it versioned as you do, but hopefully there can be a way to resolve this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants