[GitHub] maven-surefire issue #157: SUREFIRE-1383 dependenciesToScan Does Not Leverag...

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[GitHub] maven-surefire issue #157: SUREFIRE-1383 dependenciesToScan Does Not Leverag...

Github user Tibor17 commented on the issue:

    My tests passed on this code. I have to continue to develop and refactor more.
    List<Artifact> testDepends = project.getTestArtifacts();
                    removeReactorDependencies( session.getSortedProjects(), testDepends.iterator() );
                    List<File> dependenciesToScan = filter( testDepends, asList( getDependenciesToScan() ) );
                    TestListResolver testFilter = getIncludedAndExcludedTests();
                    DefaultScanResult scanResult =  new DependencyScanner( dependenciesToScan, testFilter ).scan();
                    for ( MavenProject project : session.getSortedProjects() )
                        if ( !"pom".equals( project.getPackaging() ) && !containsProjectArtifact( testDepends, project ) )
                            // zapracuj getDependenciesToScan()
                            File reactorChildProjectOutputDir = new File( project.getBuild().getOutputDirectory() );
                            if ( reactorChildProjectOutputDir.isDirectory() )
                                DirectoryScanner scanner = new DirectoryScanner( reactorChildProjectOutputDir, testFilter );
                                scanResult = scanResult.append( scanner.scan() );

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]