Re-reading your "I tried to make a JAR that included the Maven Resolver Ant
Tasks uber JAR plus some extra stuff"...

The Maven Resolver Ant Tasks uber JAR contains _relocated_ classes (see
POM).

Hence, using this uber JAR to create another uber JAR is not recommended
(or make sure there are no shared dependencies).

You'd be better if you used non-uber JAR dependencies of Ant Tasks and
other stuff and create uber jar out of those instead.

T

On Fri, Mar 1, 2024 at 4:55 PM Alan Snyder <gunpolishing...@cbfiddle.com>
wrote:

> So how should this issue be resolved?
>
> Should the exclusion be removed?
>
> > On Feb 28, 2024, at 9:33 PM, Thorsten Heit <th...@gmx.de.INVALID> wrote:
> >
> > Hi,
> >
> >> For reasons that I may no longer believe, I tried to make a JAR that
> included the Maven Resolver Ant Tasks uber JAR plus some extra stuff.
> >> I figured I could do that by resolving the Maven Resolver Ant Tasks and
> including all those artifacts in my JAR.
> >> But that did not work.
> >> The resulting JAR fails because of a class not found:
> org/apache/commons/logging/LogFactory [called from http AbstractVerifier].
> >> What seems odd is that the POM for maven-resolver-transport-http
> *explicitly excludes commons-logging*.
> >> The stated explanation is that jcl-over-slf4j is used instead.
> >> But obviously, there is some need for commons-logging, and the MRAT
> uber JAR includes commons-logging.
> >> Is commons-logging added to the MRAT uber JAR as a special case?
> >
> > As long as *jcl-over-slf4j* itself is included, that explains the
> > presence of commons-logging stuff:
> >
> >
> > % jar tf
> > ~/.m2/repository/org/slf4j/jcl-over-slf4j/2.0.9/jcl-over-slf4j-2.0.9.jar
> > | sort
> > META-INF/
> > (...)
> > org/
> > org/apache/
> > org/apache/commons/
> > org/apache/commons/logging/
> > org/apache/commons/logging/Log.class
> > org/apache/commons/logging/LogConfigurationException.class
> > org/apache/commons/logging/LogFactory.class
> > org/apache/commons/logging/impl/
> > org/apache/commons/logging/impl/NoOpLog.class
> > org/apache/commons/logging/impl/SLF4JLocationAwareLog.class
> > org/apache/commons/logging/impl/SLF4JLog.class
> > org/apache/commons/logging/impl/SLF4JLogFactory.class
> > org/apache/commons/logging/impl/SimpleLog.class
> >
> >
> > Regards
> >
> > Thorsten
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to