I suspect that this happens because the tests are not part of the module. C:\projects\com.example\my-module-test\my-impl-module\src\test\java\com\example\impl\FooImplTest.java: error: cannot find symbol However, when trying to execute the test phase of the Maven build, the sub module will fail with: Failed to execute goal :maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project my-impl-module: Compilation failure: Compilation failure: Then, there are one or more sub modules, with implementations of the interface/abstract class and tests extending the abstract test. In the same Maven module, I have abstract tests to ensure proper behavior for the implementation of these interfaces/abstract classes. In my case, I have a "common" Maven module, which contains some interfaces and/or abstract classes (but no concrete implementation). How can I have inter-module test dependencies with Maven and Java modules? However, I stumbled upon a problem I have not been able to solve, and not found any descriptions on how to solve: There is no module descriptor for the test classes. As the project was already consisting of Maven modules, and the dependencies were straight, creating module descriptors for the project was quite straight forward.Įach Maven module now has their own module descriptor ( module-info.java), in the src/main/java folder. I am now trying to migrate to Java 9/10/11 and implement modules (as in JSR 376: Java Platform Module System, JPMS). I have a multi-module project using Maven and Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |