[
https://issues.apache.org/jira/browse/SUREFIRE-1396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107865#comment-16107865
]
ASF GitHub Bot commented on SUREFIRE-1396:
------------------------------------------
Github user Tibor17 commented on a diff in the pull request:
https://github.com/apache/maven-surefire/pull/161#discussion_r130445317
--- Diff:
surefire-integration-tests/src/test/resources/surefire-1396-pluggableproviders-classpath-provider/pom.xml
---
@@ -0,0 +1,61 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>surefire-test-classpath-provider</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test provider</name>
+
+ <properties>
+ <surefire.version>2.21-SNAPSHOT</surefire.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-api</artifactId>
--- End diff --
Why?
See the `build.log` in target and you will see project version and all
necessary dependencies hidden in the fork transitive deps.
> Provider class path is incorrect for custom provider in Failsafe
> ----------------------------------------------------------------
>
> Key: SUREFIRE-1396
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1396
> Project: Maven Surefire
> Issue Type: Bug
> Reporter: Jonathan Bell
>
> Hi,
> When using a custom Surefire provider with Surefire (not Failsafe), the
> "provider classpath" contains only the provider and surefire-api. However,
> when using a custom provider with Failsafe, the provider class path ends up
> including a lot more... it seems like perhaps all plugins that are loaded?
> This has caused some mayhem for me when using a custom provider in projects
> that use a specific version of SLF4J... because then failsafe forces 1.5.6 to
> be loaded (from this process of incorrectly finding the custom provider),
> causing a crash.
> It is a simple fix (3 lines in AbstractSurefireMojo - it had the name of the
> Surefire plugin hardcoded, which isn't correct when it's actually Failsafe).
> I've got a patched fork of master on GitHub
> (https://github.com/jon-bell/maven-surefire/commit/04f66cdd828d131a028eb400d1ed26fe104fe3f2)
> that fixes it and an integration test that demonstrates the flaw. I am not
> 100% sure on the formatting of the integration test (i.e., I am opening a
> JIRA ticket so that I suppose I can name it under the JIRA issue? How should
> I specify the current version of surefire in the integration test package?) -
> if the fix is welcome against master I'd be happy to open a PR on GitHub. I
> am also happy to merge against a different branch if it's more helpful.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)