public void preserveTestCompileSourceRoots( List originalInterpolatedTestCompileSourceRoots ) { dynamicTestCompileSourceRoots = getTestCompileSourceRoots(); this.originalInterpolatedTestCompileSourceRoots = originalInterpolatedTestCompileSourceRoots; }
public void addTestCompileSourceRoot( String path ) { if ( path != null ) { path = path.trim(); if ( path.length() != 0 ) { if ( !getTestCompileSourceRoots().contains( path ) ) { getTestCompileSourceRoots().add( path ); } } } }
public void addTestCompileSourceRoot( String path ) { addPath( getTestCompileSourceRoots(), path ); }
if ( project.getTestCompileSourceRoots() != null ) setTestCompileSourceRoots( ( new ArrayList<>( project.getTestCompileSourceRoots() ) ) );
if ( project.getTestCompileSourceRoots() != null ) setTestCompileSourceRoots( ( new ArrayList( project.getTestCompileSourceRoots() ) ) );
: translateListOfPaths( originalInterpolatedCompileSourceRoots, basedir ) ); List originalInterpolatedTestCompileSourceRoots = interpolateListOfStrings( project.getTestCompileSourceRoots(), model, project.getBasedir(),
private void restoreBuildRoots( MavenProject project, ProjectBuilderConfiguration config, boolean debugMessages ) throws ModelInterpolationException { project.setCompileSourceRoots( restoreListOfStrings( project.getDynamicCompileSourceRoots(), project.getOriginalInterpolatedCompileSourceRoots(), project.getCompileSourceRoots(), project, config, debugMessages ) ); project.setTestCompileSourceRoots( restoreListOfStrings( project.getDynamicTestCompileSourceRoots(), project.getOriginalInterpolatedTestCompileSourceRoots(), project.getTestCompileSourceRoots(), project, config, debugMessages ) ); project.setScriptSourceRoots( restoreListOfStrings( project.getDynamicScriptSourceRoots(), project.getOriginalInterpolatedScriptSourceRoots(), project.getScriptSourceRoots(), project, config, debugMessages ) ); project.clearRestorableRoots(); }
@SuppressWarnings("unchecked") @Override public boolean test(MavenProject project) { return FCollection.contains(project.getTestCompileSourceRoots(), exists()) && FCollection.contains(project.getCompileSourceRoots(), exists()); }
private void addProjectFiles( final ReportAggregator.Builder reportAggregationBuilder, final MavenProject proj) throws IOException, Exception { final File projectBaseDir = proj.getBasedir(); List<File> files = getProjectFilesByFilter(projectBaseDir, MUTATION_RESULT_FILTER); for (final File file : files) { reportAggregationBuilder.addMutationResultsFile(file); } files = getProjectFilesByFilter(projectBaseDir, LINECOVERAGE_FILTER); for (final File file : files) { reportAggregationBuilder.addLineCoverageFile(file); } files = convertToRootDirs(proj.getCompileSourceRoots(), proj.getTestCompileSourceRoots()); for (final File file : files) { reportAggregationBuilder.addSourceCodeDirectory(file); } files = getCompiledDirs(proj); for (final File file : files) { reportAggregationBuilder.addCompiledCodeDirectory(file); } }
/** {@inheritDoc} */ @Override protected List<String> getProjectSourceRoots( MavenProject p ) { return ( p.getTestCompileSourceRoots() == null ? Collections.<String>emptyList() : new LinkedList<>( p.getTestCompileSourceRoots() ) ); }
@Override protected List<String> getProjectSourceRoots( MavenProject p ) { if ( "pom".equals( p.getPackaging().toLowerCase() ) ) { return Collections.emptyList(); } return ( p.getTestCompileSourceRoots() == null ? Collections.<String>emptyList() : new LinkedList<>( p.getTestCompileSourceRoots() ) ); }
/** * Get the directories containg sources */ @SuppressWarnings( "unchecked" ) protected List<String> getSourceDirectories() { List<String> sourceDirectories = new ArrayList<String>(); sourceDirectories.addAll( project.getCompileSourceRoots() ); sourceDirectories.addAll( project.getTestCompileSourceRoots() ); return sourceDirectories; }
protected void addTestSourcePath(String path) { if (!project.getTestCompileSourceRoots().contains(path)) { log.debug("Added Test Source directory: " + path); project.addTestCompileSourceRoot(path); } }
sourceRoots.addAll(this.mojo.getProject().getTestCompileSourceRoots());
@Override protected List<String> getExecutionProjectSourceRoots( MavenProject p ) { if ( "pom".equals( p.getExecutionProject().getPackaging().toLowerCase() ) ) { return Collections.emptyList(); } return ( p.getExecutionProject().getTestCompileSourceRoots() == null ? Collections.<String>emptyList() : new LinkedList<>( p.getExecutionProject().getTestCompileSourceRoots() ) ); }
@Override protected List<String> getExecutionProjectSourceRoots( MavenProject p ) { if ( "pom".equals( p.getExecutionProject().getPackaging().toLowerCase() ) ) { return Collections.emptyList(); } return p.getExecutionProject().getTestCompileSourceRoots(); }
/** * Adds the specified test source path to the project's test compile sources. * * @param path The test source path to add to the project's test compile sources */ protected void addTestSourcePath(final String path) { if (!project.getTestCompileSourceRoots().contains(path)) { getLog().debug("Added test source directory: " + path); project.addTestCompileSourceRoot(path); } }
@Override protected String getSourcePath() { return StringUtils.joinWith(File.pathSeparator, StringUtils.join(this.project.getCompileSourceRoots(), File.pathSeparatorChar), StringUtils.join(this.project.getTestCompileSourceRoots(), File.pathSeparatorChar) ); }
/** {@inheritDoc} */ @Override public ParserResult perform(final MavenBuildProxy build, final MavenProject pom, final MojoInfo mojo, final PluginLogger logger) throws InterruptedException, IOException { List<String> sources = new ArrayList<String>(pom.getCompileSourceRoots()); sources.addAll(pom.getTestCompileSourceRoots()); FilesParser findBugsCollector = new FilesParser(logger, determineFileName(mojo), new FindBugsParser(sources), getModuleName(pom)); return getTargetPath(pom).act(findBugsCollector); }
@SuppressWarnings("unchecked") @Override public boolean test(MavenProject project) { return FCollection.contains(project.getTestCompileSourceRoots(), exists()) && FCollection.contains(project.getCompileSourceRoots(), exists()); }