In the quest to solve this and somehow that, I was trying out to create packages to subdivide main
and test
classes and then to make use of compiler with added modules to execute the unit-tests. Not a very good way agreed, but just a hypothetical structure for now.
Few open questions as I proceeded further were:-
- Add a JDK9 based module to the project.
- Add JUnit5 to the classpath using IntelliJ's shortcut. (lib folder) [
junit-jupiter-api-5.0.0.jar
]
Q. Note that it brings along the opentest4j-1.0.0.jar
to the lib/ folder. Why is that so, what is the other jar used for?
Add the classes and generate some tests method correspondingly.
Compile the sample project (shared just to draw a picture of the directory structure in use) using the command
javac --module-path lib -d "target" $(find src -name "*.java")
Results into warnings as -
warning: unknown enum constant Status.STABLE reason: class file for org.apiguardian.api.API$Status not found warning: unknown enum constant Status.STABLE 2 warnings
Note:-
I find the usage of junit-jupiter
suspicious since if I comment out the code using JUnit and execute the same command, things seem to be working fine.
Libraries/Tools used if that might matter:-
junit-jupiter-api-5.0.0
with- Java version
"9" (build 9+181)
- IntelliJ
2017.2.5
Q. What could be a probable cause to such a warning? Moreover, I am unable to find the API.Status
in my project and outside the project classes as well.