You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project which uses a dependency (let's call it otj-pg-embedded for now) which does not use any module info. I want to add this to the plugin (so when it scans my dependencies, it correctly generates the line requires transitive otj.pg.embedded; in my module-info.
However, the dependency tree of that module is a mess. Mainly there is testcontainers hanging off it and scanning those jars results in:
Modules postgresql and jdbc export package org.testcontainers.containers to module org.apache.commons.compress (both of those are badly named testcontainers automatic modules).
In my list of deps in the pom, the test container deps are not listed at all. So I have to do "mvn dependency:tree" in the repo, find the offenders and add them to the exclusion list. This seems inefficient. It would be good to have some option in the pom, e.g.
I am looking into this on a fork.I propose that moditect not traverse dependencies marked as optional which are not in the dependency graph of the current maven project as this is the situation which most often causes the bug behaviour as well as generating requires for distant dependencies not atually required to either compile or run the resulting code.
The change to implement this will also fix #191, #159 and #122.
Hi,
I have a project which uses a dependency (let's call it
otj-pg-embedded
for now) which does not use any module info. I want to add this to the plugin (so when it scans my dependencies, it correctly generates the linerequires transitive otj.pg.embedded;
in my module-info.However, the dependency tree of that module is a mess. Mainly there is testcontainers hanging off it and scanning those jars results in:
Modules postgresql and jdbc export package org.testcontainers.containers to module org.apache.commons.compress
(both of those are badly named testcontainers automatic modules).In my list of deps in the pom, the test container deps are not listed at all. So I have to do "mvn dependency:tree" in the repo, find the offenders and add them to the exclusion list. This seems inefficient. It would be good to have some option in the pom, e.g.
which allows me to keep the
otj-pg-embedded
thing on the module path for jdeps but drop everything that hangs off it:(obviously unless it gets pulled in through some other context).
The current workaround is cumbersome and prone to break when versions change.
The text was updated successfully, but these errors were encountered: