testClasspath, providerClasspath, effectiveIsEnableAssertions(), isChildDelegation() ); getConsoleLogger().debug( testClasspath.getLogMessage( "test classpath:" ) ); getConsoleLogger().debug( testModulepath.getLogMessage( "test modulepath:" ) ); getConsoleLogger().debug( providerClasspath.getLogMessage( "provider classpath:" ) ); getConsoleLogger().debug( testClasspath.getCompactLogMessage( "test(compact) classpath:" ) ); getConsoleLogger().debug( testModulepath.getCompactLogMessage( "test(compact) modulepath:" ) );
private StartupConfiguration newStartupConfigWithClasspath( @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull Set<Artifact> providerArtifacts, @Nonnull String providerName ) { TestClassPath testClasspathWrapper = generateTestClasspath(); Classpath testClasspath = testClasspathWrapper.toClasspath(); testClasspathWrapper.avoidArtifactDuplicates( providerArtifacts ); Classpath providerClasspath = ClasspathCache.getCachedClassPath( providerName ); if ( providerClasspath == null ) { providerClasspath = ClasspathCache.setCachedClasspath( providerName, providerArtifacts ); } getConsoleLogger().debug( testClasspath.getLogMessage( "test classpath:" ) ); getConsoleLogger().debug( providerClasspath.getLogMessage( "provider classpath:" ) ); getConsoleLogger().debug( testClasspath.getCompactLogMessage( "test(compact) classpath:" ) ); getConsoleLogger().debug( providerClasspath.getCompactLogMessage( "provider(compact) classpath:" ) ); Artifact[] additionalInProcArtifacts = { getCommonArtifact(), getApiArtifact() }; Set<Artifact> inProcArtifacts = retainInProcArtifactsUnique( providerArtifacts, additionalInProcArtifacts ); Classpath inProcClasspath = createInProcClasspath( providerClasspath, inProcArtifacts ); getConsoleLogger().debug( inProcClasspath.getLogMessage( "in-process classpath:" ) ); getConsoleLogger().debug( inProcClasspath.getCompactLogMessage( "in-process(compact) classpath:" ) ); ClasspathConfiguration classpathConfiguration = new ClasspathConfiguration( testClasspath, providerClasspath, inProcClasspath, effectiveIsEnableAssertions(), isChildDelegation() ); return new StartupConfiguration( providerName, classpathConfiguration, classLoaderConfiguration, isForking(), false ); }
testClasspath, providerClasspath, inProcClasspath, effectiveIsEnableAssertions(), isChildDelegation() ); getConsoleLogger().debug( testClasspath.getLogMessage( "test classpath:" ) ); getConsoleLogger().debug( testModulepath.getLogMessage( "test modulepath:" ) ); getConsoleLogger().debug( providerClasspath.getLogMessage( "provider classpath:" ) ); getConsoleLogger().debug( testClasspath.getCompactLogMessage( "test(compact) classpath:" ) ); getConsoleLogger().debug( testModulepath.getCompactLogMessage( "test(compact) modulepath:" ) ); getConsoleLogger().debug( providerClasspath.getCompactLogMessage( "provider(compact) classpath:" ) ); getConsoleLogger().debug( inProcClasspath.getLogMessage( "in-process classpath:" ) ); getConsoleLogger().debug( inProcClasspath.getCompactLogMessage( "in-process(compact) classpath:" ) );
private StartupConfiguration newStartupConfigWithClasspath( @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull Set<Artifact> providerArtifacts, @Nonnull String providerName ) { TestClassPath testClasspathWrapper = generateTestClasspath(); Classpath testClasspath = testClasspathWrapper.toClasspath(); testClasspathWrapper.avoidArtifactDuplicates( providerArtifacts ); Classpath providerClasspath = ClasspathCache.getCachedClassPath( providerName ); if ( providerClasspath == null ) { providerClasspath = ClasspathCache.setCachedClasspath( providerName, providerArtifacts ); } getConsoleLogger().debug( testClasspath.getLogMessage( "test classpath:" ) ); getConsoleLogger().debug( providerClasspath.getLogMessage( "provider classpath:" ) ); getConsoleLogger().debug( testClasspath.getCompactLogMessage( "test(compact) classpath:" ) ); getConsoleLogger().debug( providerClasspath.getCompactLogMessage( "provider(compact) classpath:" ) ); Artifact[] additionalInProcArtifacts = { getCommonArtifact(), getApiArtifact(), getLoggerApiArtifact() }; Set<Artifact> inProcArtifacts = retainInProcArtifactsUnique( providerArtifacts, additionalInProcArtifacts ); Classpath inProcClasspath = createInProcClasspath( providerClasspath, inProcArtifacts ); getConsoleLogger().debug( inProcClasspath.getLogMessage( "in-process classpath:" ) ); getConsoleLogger().debug( inProcClasspath.getCompactLogMessage( "in-process(compact) classpath:" ) ); ClasspathConfiguration classpathConfiguration = new ClasspathConfiguration( testClasspath, providerClasspath, inProcClasspath, effectiveIsEnableAssertions(), isChildDelegation() ); return new StartupConfiguration( providerName, classpathConfiguration, classLoaderConfiguration, isForking(), false ); }
@Nonnull protected List<String> toCompleteClasspath( StartupConfiguration conf ) throws SurefireBooterForkException { AbstractPathConfiguration pathConfig = conf.getClasspathConfiguration(); if ( pathConfig.isClassPathConfig() == pathConfig.isModularPathConfig() ) { throw new SurefireBooterForkException( "Could not find class-path config nor modular class-path either." ); } Classpath bootClasspath = getBooterClasspath(); Classpath testClasspath = pathConfig.getTestClasspath(); Classpath providerClasspath = pathConfig.getProviderClasspath(); Classpath completeClasspath = join( join( bootClasspath, testClasspath ), providerClasspath ); log.debug( completeClasspath.getLogMessage( "boot classpath:" ) ); log.debug( completeClasspath.getCompactLogMessage( "boot(compact) classpath:" ) ); return completeClasspath.getClassPath(); }
@Nonnull protected List<String> toCompleteClasspath( StartupConfiguration conf ) throws SurefireBooterForkException { AbstractPathConfiguration pathConfig = conf.getClasspathConfiguration(); if ( pathConfig.isClassPathConfig() == pathConfig.isModularPathConfig() ) { throw new SurefireBooterForkException( "Could not find class-path config nor modular class-path either." ); } Classpath bootClasspath = getBooterClasspath(); Classpath testClasspath = pathConfig.getTestClasspath(); Classpath providerClasspath = pathConfig.getProviderClasspath(); Classpath completeClasspath = join( join( bootClasspath, testClasspath ), providerClasspath ); getLogger().debug( completeClasspath.getLogMessage( "boot classpath:" ) ); getLogger().debug( completeClasspath.getCompactLogMessage( "boot(compact) classpath:" ) ); return completeClasspath.getClassPath(); }