Re: a question about the Maven Resolver Ant Tasks uber JAR

2024-03-01 Thread Tamás Cservenák
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 
wrote:

> So how should this issue be resolved?
>
> Should the exclusion be removed?
>
> > On Feb 28, 2024, at 9:33 PM, Thorsten Heit  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
>
>


Re: a question about the Maven Resolver Ant Tasks uber JAR

2024-03-01 Thread Alan Snyder
So how should this issue be resolved?

Should the exclusion be removed?

> On Feb 28, 2024, at 9:33 PM, Thorsten Heit  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



Re: a question about the Maven Resolver Ant Tasks uber JAR

2024-02-28 Thread Thorsten Heit

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



Re: a question about the Maven Resolver Ant Tasks uber JAR

2024-02-28 Thread Tamás Cservenák
Howdy,

This is probably an oversight, as Resolver does use SLF4J and yes, in Maven
for example jcl-over-slf4j is used. Or a bug? As jcl-over-slf4j is here:
https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.18/maven-resolver-transport-http/pom.xml#L81-L86

Can you post some reproducer?

T

On Wed, Feb 28, 2024 at 10:50 PM Alan Snyder 
wrote:

> 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?
>
> Seems like something is wrong here.
>
> I can fix my problem by adding commons-logging explicitly to my JAR, so I
> don’t need a solution, but I would still
> like to know why I had this problem.
>
>