[ https://issues.apache.org/jira/browse/SUREFIRE-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145380#comment-16145380 ]
ASF GitHub Bot commented on SUREFIRE-1383: ------------------------------------------ Github user owenfarrell commented on the issue: https://github.com/apache/maven-surefire/pull/157 I don't think that logic would work for my scenario. For example: 1. Create multi-module project with a test runner JAR (a la `org.apache.maven.surefire:surefire-1383:1.0-SNAPSHOT`) 2. Recursively run the `install` goal over the multi-module project 3. Modify the test runner module (`org.apache.maven.surefire:surefire-1383-runner:1.0-SNAPSHOT`) 4. Run the `test` goal over the multi-module project According to your logic, Surefire would prefer the already-installed artifact, effectively ignoring those changes made in step 3. That would put us right back where we started. Using my logic, Surefire would prefer the working copy changes and execute accordingly. Since the existing `DependencyScanner` doesn't support classifiers as written, I don't think my approach is introducing any new limitations there. `DependencyScanner.java:114` ``` String[] groupArtifact = groups.split( ":" ); if ( groupArtifact.length != 2 ) { throw new IllegalArgumentException(...); } ``` > dependenciesToScan Does Not Leverage Classpath Elements > -------------------------------------------------------- > > Key: SUREFIRE-1383 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1383 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.20 > Reporter: Owen Farrell > Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: scanned-dependencies-sample.zip > > > The <dependenciesToScan> configuration attribute relies solely on installed > artifacts. This is an issue when the targeted dependencies were built as part > of the current session. The net result is that stale artifacts are used (i.e. > if the dependency has changed since it was last installed) or the tests are > not executed at all (if the dependency has not been previously installed. > Attached is a sample project that illustrates this issue: > Given I have a multi-module project > And the first module built includes test classes as part of the project > artifact > And subsequent modules scan the first for unit tests to execute > When I execute the _*test*_ goal (prior to any install) > Then the build should succeed > And tests should be executed with each module -- This message was sent by Atlassian JIRA (v6.4.14#64029)