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

Tibor Digana commented on SUREFIRE-1168:
----------------------------------------

See the implementation of constructor 
https://fossies.org/linux/misc/apache-maven-3.3.3-src.tar.gz/apache-maven-3.3.3/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/AbstractScopeArtifactFilter.java
Consider this plugin is compliant with Maven 2.2.1 and two combinations are 
missing and the implementation is different in this class.

To workaround this all you need to do is to extend Artifact, implement missing 
constants (diff between 2.2.1 and 3.0), call super constructor, override 
#include() method, implement few if-else branching, call super-method in 
else-branch and verify by unit test.
The fix is quite simple in surefire. Feel free to open a new PR on GitHub with 
the fix.

> failsafe won't exclude scope 'provided'
> ---------------------------------------
>
>                 Key: SUREFIRE-1168
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1168
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin
>    Affects Versions: 2.18.1
>            Reporter: Benson Margulies
>
> https://github.com/bimargulies/failsafe-cp-tc is a test case.
> I have a jar with provided scope which needs to _not_ be in the classpath 
> when running the tests. So, I wrote:
> {code}
>             <configuration>
>                 
> <classpathDependencyScopeExclude>provided</classpathDependencyScopeExclude>
>             </configuration>
> {code}
> No such luck, the jar remains in the classpath. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to