[ 
https://issues.apache.org/jira/browse/WICKET-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206128#comment-17206128
 ] 

ASF subversion and git services commented on WICKET-6837:
---------------------------------------------------------

Commit 465c94f42fa4be1ee8488b610dcda94324b5ce30 in wicket's branch 
refs/heads/master from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=465c94f ]

WICKET-6837 Jupiter engine transitively included in war file

All modules should depend on junit5, to run their tests.
The -guide module does not need it but it does not any harm.


> Jupiter engine transitively included in war file
> ------------------------------------------------
>
>                 Key: WICKET-6837
>                 URL: https://issues.apache.org/jira/browse/WICKET-6837
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 9.0.0
>            Reporter: Gert-Jan Schouten
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>             Fix For: 9.1.0
>
>
> If I run mvn dependency:tree on this basic war pom:
> {noformat}
> <?xml version="1.0"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>test</groupId>
>       <artifactId>test</artifactId>
>       <packaging>war</packaging>
>       <version>1.0</version>
>       <dependencies>
>                       <dependency>
>                               <groupId>org.apache.wicket</groupId>
>                               <artifactId>wicket-core</artifactId>
>                               <version>9.0.0</version>
>                               <type>jar</type>
>                               <scope>compile</scope>
>                       </dependency>
>       </dependencies>
> </project>{noformat}
> then the output is this:
>  
>  
> {noformat}
> [INFO] test:test:war:1.0
> [INFO] \- org.apache.wicket:wicket-core:jar:9.0.0:compile
> [INFO]    +- com.github.openjson:openjson:jar:1.0.12:compile
> [INFO]    +- org.apache.wicket:wicket-request:jar:9.0.0:compile
> [INFO]    +- org.apache.wicket:wicket-util:jar:9.0.0:compile
> [INFO]    |  +- commons-fileupload:commons-fileupload:jar:1.4:compile
> [INFO]    |  +- commons-io:commons-io:jar:2.6:compile
> [INFO]    |  +- org.apache.commons:commons-collections4:jar:4.4:compile
> [INFO]    |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.2:compile
> [INFO]    |     +- org.apiguardian:apiguardian-api:jar:1.1.0:compile
> [INFO]    |     +- org.junit.platform:junit-platform-engine:jar:1.6.2:compile
> [INFO]    |     |  +- org.opentest4j:opentest4j:jar:1.2.0:compile
> [INFO]    |     |  \- 
> org.junit.platform:junit-platform-commons:jar:1.6.2:compile
> [INFO]    |     \- org.junit.jupiter:junit-jupiter-api:jar:5.6.2:compile
> [INFO]    +- org.danekja:jdk-serializable-functional:jar:1.9.0:compile
> [INFO]    \- org.slf4j:slf4j-api:jar:1.7.25:compile{noformat}
> The org.junit.jupiter:junit-jupiter-engine:jar should not have compile scope, 
> because it means that it will be included in war files that use wicket-core.
>  
> I believe this is caused by the fact that wicket-util overrides the scope of 
> org.junit.jupiter:junit-jupiter-engine:jar and sets it to "compile". As far 
> as I understand, overriding the <scope> stops a dependency from inheriting 
> the <optional> element, after which the <optional> element will default to 
> "false".
> This can be solved by adding the <optional> element to 
> org.junit.jupiter:junit-jupiter-engine:jar and setting it to "true" in 
> wicket-util.
> The wicket-examples war is not affected by this. I think this is because the 
> wicket-examples war file _itself_ inherits from wicket-parent, in which case 
> I have no idea how it affects the scope/optional resolution :) Anyway, this 
> is not representative of a typical war file, which would not inherit from 
> wicket-parent.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to