I have tried it, but it does not seem to provide helpful information for me. Setting the level to 1, 2 or 3 provides progressively more information (a LOT of information for 2 and 3).
The information that helps me comes from a tracepoint in org.apache.felix.resolver.ResolverImpl.ResolveSession.setCurrentError(ResolutionError). There, I log the ResolutionError which produces output like e.g.
Uses constraint violation. Unable to resolve resource plugin-a [plugin-a version=1.0.0-SNAPSHOT] because it is exposed to package 'some.package' from resources plugin-b [plugin-b version=2.3.1] and plugin-c [plugin-c version=1.4.2] via two dependency chains.
Chain 1:
plugin-a [plugin-a version=1.0.0-SNAPSHOT]
import: (&(osgi.wiring.package=some.package)(version>=1.0.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package: some.package
plugin-b [plugin-b version=2.3.1]
Chain 2:
plugin-a [plugin-a version=1.0.0-SNAPSHOT]
import: (&(osgi.wiring.package=some.other.package)(version>=1.0.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package: some.other.package; uses:=some.package
export: osgi.wiring.package=some.package
plugin-c [plugin-c version=1.4.2]
There is a org.apache.felix.resolver.ResolverImpl.m_logger which the BndResolver populates with biz.aQute.resolve.ResolverLogger that delegates to an biz.aQute.resolve.InternalResolverLogger.InternalResolverLogger(ResolverLogger):
public static RunResolution resolve(Project project, Processor actualProperties,
Collection<ResolutionCallback> callbacks, ResolverLogger resolverLogger) {
if (callbacks == null)
callbacks = Collections.emptyList();
ResolverLogger logger = resolverLogger == null ? new ResolverLogger() : resolverLogger;
try {
try {
ResolveProcess resolve = new ResolveProcess();
Resolver resolver = new BndResolver(logger);
I didn’t find a call to biz.aQute.resolve.RunResolution.resolve(Project, Processor, Collection<ResolutionCallback>, ResolverLogger) in particular from the bnd-maven-plugin that would allow me to increase the log level for the logger and/or to redirect it through the Maven logging system. I also didn’t find a system property to override the log level in the ResolverLogger. I am also not 100% if the ResolverImpl would actually log helpful information through that logger.
Is there a way to see the errors reported in the ResolverImpl’s session when using the bnd-maven-plugin without having to resort to using a tracepoint?