vendredi 3 avril 2020

Find package URL from same test package

I have a Java 11 based project, built with Maven, making use of the JPMS.

I'd like to list all classes in a given package in my test case. The package is present in both the main source set and the test source set.

The problem I face is that no matter how I try to get the package resource for that given package, I can't seem to get an URL that points to the package in the main source set. I can only reach the package in the test source set with reflection.

For example, have a look at this git repo.

For the record: The functionality is needed for Spring Data, to initialize the Repositories for my integration tests





Aucun commentaire:

Enregistrer un commentaire