Re: Unable to update version for provided transient dependencies

2020-05-28 Thread Tomo Suzuki
Hi Mitchell,

Does your "mvn dependency:tree" contain the unwanted logging library?
If yes, that's strange. Maven does not automatically include Provided
transitive dependencies as far as I know.
If not, then it's Storm that brought the library by reading the dependency
graph in their way.



On Thu, May 28, 2020 at 1:41 PM Mitchell Rathbun (BLOOMBERG/ 731 LEX) <
mrathb...@bloomberg.net> wrote:

> We are currently using Storm 1.2.3, and we want to update the version of
> log4j2 being used. In our Maven file, we specify storm-core with version
> 1.2.3 and provided scope. This dependency has dependencies on log4j-api,
> log4j-core, slf4j-log4j-impl, etc. The provided version of these
> dependencies is 2.8.2. I have tried declaring the log4j dependencies in our
> top level pom.xml with version 2.13.2 and compile scope, and have excluded
> these dependencies from the storm-core dependency. Regardless, when
> submitting our Storm topology, we always get the issue:
>
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/bb/bin/package/a/apache-storm-1.2.3/1.2.3-3+b20200407T00292257/libexec/apache-storm-1.2.3/lib/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> .
>
> The 2.8.2 version of log4j2 is always used. So it doesn't seem like
> excluding provided transient dependencies is working as hoped. How can we
> update the transient log4j2 dependencies that are brought in with provided
> scope by the storm-core dependency?



-- 
Regards,
Tomo


Unable to update version for provided transient dependencies

2020-05-28 Thread Mitchell Rathbun (BLOOMBERG/ 731 LEX)
We are currently using Storm 1.2.3, and we want to update the version of log4j2 
being used. In our Maven file, we specify storm-core with version 1.2.3 and 
provided scope. This dependency has dependencies on log4j-api, log4j-core, 
slf4j-log4j-impl, etc. The provided version of these dependencies is 2.8.2. I 
have tried declaring the log4j dependencies in our top level pom.xml with 
version 2.13.2 and compile scope, and have excluded these dependencies from the 
storm-core dependency. Regardless, when submitting our Storm topology, we 
always get the issue:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/bb/bin/package/a/apache-storm-1.2.3/1.2.3-3+b20200407T00292257/libexec/apache-storm-1.2.3/lib/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
.

The 2.8.2 version of log4j2 is always used. So it doesn't seem like excluding 
provided transient dependencies is working as hoped. How can we update the 
transient log4j2 dependencies that are brought in with provided scope by the 
storm-core dependency?

Re: Maven brings “test” transitive dependency as “compile”

2020-05-28 Thread Debraj Manna
Thanks Andy.

It was a part of big multi-module project which I tried to extract out. So
I missed excluding it in some places.

On Wed, May 27, 2020 at 5:01 AM Andy Feldman  wrote:

> Thanks for an easy public reproduction!
>
> netty-common is coming through with compile scope from:
> org.elasticsearch.client:transport:jar:5.6.16:compile
>  -> org.elasticsearch.plugin:transport-netty4-client:jar:5.6.16:compile
>  ---> io.netty:netty-common:jar:4.1.13.Final:compile
>
> I found this by excluding the netty-common dependency
> from bookkeeper-common and running dependency:tree again, which actually
> you said you did as well, so I'm curious what we did differently.
>
> Anyway, I hope this helps!
> --
> Andy Feldman
> Wealthfront
>
>
>
> On Tue, May 26, 2020 at 11:59 AM Debraj Manna 
> wrote:
>
> > You can reproduce the issue in
> > https://github.com/debraj-manna/dependency-issue
> >
> > In dependency tree of delete I am seeing dependency as below
> >
> > [INFO] \-
> > org.apache.bookkeeper:bookkeeper-common:test-jar:tests:4.10.0:test
> > [INFO]+-
> > org.apache.bookkeeper.stats:bookkeeper-stats-api:jar:4.10.0:test
> > [INFO]+- org.apache.bookkeeper:cpu-affinity:jar:4.10.0:test
> > *[INFO]+- io.netty:netty-common:jar:4.1.32.Final:compile*
> > [INFO]+-
> com.fasterxml.jackson.core:jackson-databind:jar:2.9.7:compile
> > [INFO]+-
> > com.fasterxml.jackson.core:jackson-annotations:jar:2.9.7:compile
> > [INFO]+- org.jctools:jctools-core:jar:2.1.2:test
> > [INFO]+- org.slf4j:slf4j-api:jar:1.7.25:test
> > [INFO]\- commons-configuration:commons-configuration:jar:1.10:test
> >
> >
> > On Sun, May 24, 2020 at 2:47 AM Nick Stolwijk 
> > wrote:
> >
> > > The verbose flag was removed in newer versions of the plugin. You could
> > try
> > > an old pluginversion:
> > >
> > > mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:tree
> -Dverbose
> > >
> > > With regards,
> > >
> > > Nick Stolwijk
> > >
> > > ~~~ Try to leave this world a little better than you found it and, when
> > > your turn comes to die, you can die happy in feeling that at any rate
> you
> > > have not wasted your time but have done your best ~~~
> > >
> > > Lord Baden-Powell
> > >
> > >
> > > On Sat, May 23, 2020 at 7:53 PM Debraj Manna  >
> > > wrote:
> > >
> > > > Yes I saw the documentation. It is not behaving as expected.
> > > >
> > > > Can you let me know what is the alternative for maven dependency:tree
> > > > -Dverbose  ? If I get the verbose mode for dependency:tree then I
> think
> > > > that will provide us more information.
> > > >
> > > > On Sat, May 23, 2020 at 6:09 PM Tomo Suzuki
>  > >
> > > > wrote:
> > > >
> > > > > Debraj,
> > > > >
> > > > > I couldn't reproduce the problem in my setting. Netty-common
> appears
> > as
> > > > > test scope.
> > > > > https://gist.github.com/suztomo/69f854bddd102b3fe83eae8f0720c494
> > > > >
> > > > > Would you be willing to create a minimum reproducible project?
> > > > > Hopefully it builds only artifacts available on the public Internet
> > (no
> > > > > artifactory.arkin.local:8000).
> > > > >
> > > > > BTW, this is the documentation I think your Maven tree is not
> > behaving
> > > as
> > > > > documented:
> > > > >
> > > > >
> > > >
> > >
> >
> https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#dependency-scope
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Sat, May 23, 2020 at 12:40 AM Debraj Manna <
> > > subharaj.ma...@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > Thanks Andy for replying.
> > > > > >
> > > > > > maven dependency:tree -Dverbose does not seem to work for me. It
> > > gives
> > > > me
> > > > > > the below message
> > > > > >
> > > > > > ...
> > > > > > [INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @
> > delete
> > > > ---
> > > > > > [INFO] Verbose not supported since maven-dependency-plugin 3.0
> > > > > > [INFO] com.vnera:delete:jar:0.001-SNAPSHOT
> > > > > > ...
> > > > > >
> > > > > > If I just exclude netty-common from apache-bookkeeper then
> > > netty-common
> > > > > > 4.1.32 does not show up in the dependency tree.
> > > > > >
> > > > > >
> > > > > > On Sat, May 23, 2020 at 3:57 AM Andy Feldman <
> > an...@wealthfront.com>
> > > > > > wrote:
> > > > > >
> > > > > > > On Fri, May 22, 2020 at 6:31 AM Debraj Manna <
> > > > subharaj.ma...@gmail.com
> > > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > > > bookkeeper-common is in test scope but still netty-common is
> > > > showing
> > > > > up
> > > > > > > as
> > > > > > > > compile dependency.
> > > > > > > >
> > > > > > >
> > > > > > > Is it possible that netty-common is a transitive dependency of
> > > > another
> > > > > > > dependency as well? Running dependency:tree does not show all
> > paths
> > > > to
> > > > > > each
> > > > > > > dependency.
> > > > > > >
> > > > > > > You can try running dependency:tree with the verbose flag to
> see
> > > more
> > > > > > > branches of the tree, although the documentation sa

[maven-assembly-plugin] tries to find tools.jar which does not exist in adoptopenjdk-11

2020-05-28 Thread Knoche, Heinz
Hello,

I am wondering if someone could give me a hint regarding the following error 
when building a maven project (Maven 3.6.1, adoptopenjdk 11.0.6)
"Could not find artifact com.sun:tools:jar:2.0.5 at specified path 
/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/../lib/tools.jar"

It seems to arise from the "single"-goal of the maven-assembly-plugin.
I know that there is no tools.jar in Java 11 JDKs in general any more.

I tried versions 3.0.0, 3.2.0 and 3.3.0 of maven-assembly-plugin, which yield 
the above error.
I also tried Version 2.6 which does not yield the above error.

Thank you very much in advance, kind regards,
Heinz

-- 
Heinz KnocheConsultantDevelopmentPublic Authorities Web & Application 
Securitysecunet Security Networks AG
+49 201 5454-3933+49 1512 4169541heinz.kno...@secunet.com
Konrad-Zuse-Platz 281829 Munich, Germanywww.secunet.com

Sitz: Kurfürstenstraße 58, 45138 Essen, DeutschlandAmtsgericht Essen HRB 
13615Vorstand: Dr. Rainer Baumgart (Vors.), Thomas 
PleinesAufsichtsratsvorsitzender: Ralf Wintergerst



signature.asc
Description: This is a digitally signed message part