本文整理汇总了Java中org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner类的典型用法代码示例。如果您正苦于以下问题:Java SourceInclusionScanner类的具体用法?Java SourceInclusionScanner怎么用?Java SourceInclusionScanner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SourceInclusionScanner类属于org.codehaus.plexus.compiler.util.scan包,在下文中一共展示了SourceInclusionScanner类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getSatuModelDefinitionFiles
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner; //导入依赖的package包/类
private List<File> getSatuModelDefinitionFiles() throws InclusionScanException {
final Log log = getLog();
final Set<String> inculdePatterns = includes == null || includes.isEmpty() ? Collections.singleton("**/*.satu") : includes;
final SourceInclusionScanner scanner = new SimpleSourceInclusionScanner(inculdePatterns, excludes);
scanner.addSourceMapping(new SuffixMapping("satu", Collections.<String> emptySet()));
final Set<File> modelFiles = scanner.getIncludedSources(sourceDirectory, null);
if (modelFiles.isEmpty()) {
log.info("No Satu model files to process");
return Collections.emptyList();
}
final List<File> retVal = new ArrayList<File>();
for (File modelFile : modelFiles) {
if (!buildContext.hasDelta(modelFile)) {
continue;
}
buildContext.removeMessages(modelFile);
log.debug("Satu model file detected: " + modelFile.getPath());
retVal.add(modelFile);
}
Collections.sort(retVal);
return retVal;
}
开发者ID:kaaprotech,项目名称:satu,代码行数:26,代码来源:SatuMojo.java
示例2: scanSrcDir
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner; //导入依赖的package包/类
/**
* Determines source files to be compiled, based on the SourceMapping. No
* longer needs to be recursive, since the SourceInclusionScanner handles
* that.
*
* @param mapping
* @return
* @throws MojoExecutionException
*/
protected Set scanSrcDir(final SourceMapping mapping)
throws MojoExecutionException {
final int staleMillis = 0;
final SourceInclusionScanner scanner = new StaleSourceScanner(
staleMillis);
scanner.addSourceMapping(mapping);
try {
return scanner.getIncludedSources(sourceDirectory, outputDirectory);
} catch (final InclusionScanException e) {
throw new MojoExecutionException(
"Error scanning source root: \'" + sourceDirectory + "\' "
+ "for stale files to recompile.", e);
}
}
开发者ID:Slipstone,项目名称:jasperreports-maven-plugin,代码行数:26,代码来源:JasperReportsMojo.java
示例3: findSources
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner; //导入依赖的package包/类
@Nonnull
public Set<File> findSources(@Nonnull final File targetDirectory) throws MojoExecutionException {
try {
final SourceInclusionScanner scanner = new SimpleSourceInclusionScanner(this.includes, this.excludes);
scanner.addSourceMapping(new SuffixMapping("JBBP", "jbbp"));
return scanner.getIncludedSources(this.source, targetDirectory);
} catch (InclusionScanException ex) {
throw new MojoExecutionException("Error during sources scanning", ex);
}
}
开发者ID:raydac,项目名称:java-binary-block-parser,代码行数:11,代码来源:AbstractJBBPMojo.java
示例4: computeStaleGrammars
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner; //导入依赖的package包/类
private Set computeStaleGrammars()
throws MojoExecutionException
{
SuffixMapping mapping = new SuffixMapping(".jj", ".jj");
SuffixMapping mappingCAP = new SuffixMapping(".JJ", ".JJ");
SourceInclusionScanner scanner = new StaleSourceScanner(staleMillis);
scanner.addSourceMapping(mapping);
scanner.addSourceMapping(mappingCAP);
Set staleSources = new HashSet();
File sourceDir = new File(sourceDirectory, sourcePath);
try
{
staleSources.addAll(scanner.getIncludedSources(sourceDir,
timestampDirectory));
}
catch (InclusionScanException e)
{
throw new MojoExecutionException("Error scanning source root: \'" +
sourceDir +
"\' for stale grammars to reprocess.",
e);
}
return staleSources;
}
开发者ID:alessandroleite,项目名称:maven-jdev-plugin,代码行数:31,代码来源:JavaCCMojo.java
示例5: getSourceInclusionScanner
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner; //导入依赖的package包/类
/**
* <p>getSourceInclusionScanner.</p>
*
* @param staleMillis a int.
* @return a {@link org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner} object.
*/
protected abstract SourceInclusionScanner getSourceInclusionScanner( int staleMillis );
开发者ID:strator-dev,项目名称:greenpepper,代码行数:8,代码来源:AbstractCompilerMojo.java
示例6: getSourceInclusionScanner
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner; //导入依赖的package包/类
protected abstract SourceInclusionScanner getSourceInclusionScanner(int scannerStaleMillis);
开发者ID:testIT-LivingDoc,项目名称:livingdoc-core,代码行数:2,代码来源:AbstractCompilerMojo.java
注:本文中的org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论