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

Module not found during test when requiring a module with no test #67

Open
pacien opened this issue Oct 13, 2018 · 1 comment
Open

Module not found during test when requiring a module with no test #67

pacien opened this issue Oct 13, 2018 · 1 comment
Assignees

Comments

@pacien
Copy link

pacien commented Oct 13, 2018

Given a module a requiring a module b, with the former having a test but not the latter, tests ran by the tester plugin fail with a java.lang.module.FindException: Module b not found, required by a.

A workaround for this is to create an empty test module for b in such a way that the target "exploded" and "merged" test folders are properly generated.

Non-working tree:

├── build.pro
├── src
│   ├── main
│   │   └── java
│   │       ├── a
│   │       │   └── module-info.java
│   │       └── b
│   │           └── module-info.java
│   └── test
│       └── java
│           └── a
│               └── module-info.java
└── target
    ├── main
    │   └── exploded
    │       ├── a
    │       │   └── module-info.class
    │       └── b
    │           └── module-info.class
    └── test
        ├── exploded
        │   └── a
        │       └── module-info.class
        └── merged
            └── a
                └── module-info.java

Working tree:

├── build.pro
├── src
│   ├── main
│   │   └── java
│   │       ├── a
│   │       │   └── module-info.java
│   │       └── b
│   │           └── module-info.java
│   └── test
│       └── java
│           ├── a
│           │   └── module-info.java
│           └── b
│               └── module-info.java
└── target
    ├── main
    │   └── exploded
    │       ├── a
    │       │   └── module-info.class
    │       └── b
    │           └── module-info.class
    └── test
        ├── exploded
        │   ├── a
        │   │   └── module-info.class
        │   └── b
        │       └── module-info.class
        └── merged
            ├── a
            │   └── module-info.java
            └── b
                └── module-info.java
@forax
Copy link
Owner

forax commented Oct 13, 2018

Seen to be a bug when we analyze the module graph from merged, the source module should be used as a backup (the one from main/java)

@forax forax self-assigned this Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants