maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schulte>
Subject Re: 3.4.0 SNAPSHOT breaks Log4j build
Date Wed, 06 Jul 2016 21:49:47 GMT
Am 07/06/16 um 23:40 schrieb Stuart McCulloch:
> On Wednesday, 6 July 2016 at 22:17, Christian Schulte wrote:
>> Am 07/06/16 um 23:08 schrieb Stuart McCulloch:
>>> On Wednesday, 6 July 2016 at 21:53, Christian Schulte wrote:
>>>> Am 07/06/16 um 22:21 schrieb Ralph Goers:
>>>>> This is an interesting situation. The classes that use Jackson are all
considered optional in Log4j, so having optional set to true is indeed what is desired. However,
we require those dependencies to compile and to run the unit tests. With scope set to test
I would expect that the non-test classes that need them would fail to compile. So it sounds
like we have to make sure all transitive dependencies needed for testing are also specified
with optional set to true?
>>>>> Ralph
>>>> Not sure I understand the situation correctly. If the scope is set to
>>>> test, it's not available in any other scope than test. Could you please
>>>> point me at the POM in question? So I can 'mvn compile' that project
>>>> successfully and you would expect it to not compile due to some optional
>>>> transitive dependency?
>>> Hi Christian,
>>> Gary posted a link to the build in his original post.
>>> Basically at the moment it has a dependencyManagement section in the top-level
pom that declares various jackson dependencies as optional, including jackson-module-jaxb-annotations.
The log4j-core sub-project declares a direct dependency to jackson-dataformat-xml with compile
scope, marked as optional (also note that jackson-module-jaxb-annotations is a transitive
dependency of jackson-dataformat-xml).
>>> With the fix for MNG-5227 the transitive dependency to jackson-module-jaxb-annotations
is managed as optional and is removed from the compile and test classpath. Because the code
doesn’t directly depend on jackson-module-jaxb-annotations then it compiles ok. However,
the tests fail because both jackson-dataformat-xml and jackson-module-jaxb-annotations are
needed at test time.
>>> Without the fix for MNG-5227 the optional flags in the dependencyManagement section
are ignored, and jackson-module-jaxb-annotations is included on the compile and test classpath
(because the optional jackson-dataformat-xml dependency is selected and jackson-module-jaxb-annotations
is now seen as a non-optional transitive dependency of jackson-dataformat-xml).
>> Ok. That's MNG-5935.
> But also related to MNG-5227 right?  Since the build fails with the old maven snapshot
that had the fix for MNG-5227 (and the fix for MNG-5935) but passes with the more recent snapshot
where MNG-5227 was reverted (but still contains the fix for MNG-5935)

I'll take a closer look at the project tomorrow. Could be it's the
Aether bug I mentioned in that other mail which got reverted and makes
the project build again. That would mean the project really should not
build and error out but does not, because there is a bug in Aether.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message