當前位置: 首頁>>代碼示例>>Java>>正文


Java Resource.addExclude方法代碼示例

本文整理匯總了Java中org.apache.maven.model.Resource.addExclude方法的典型用法代碼示例。如果您正苦於以下問題:Java Resource.addExclude方法的具體用法?Java Resource.addExclude怎麽用?Java Resource.addExclude使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.maven.model.Resource的用法示例。


在下文中一共展示了Resource.addExclude方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getResources

import org.apache.maven.model.Resource; //導入方法依賴的package包/類
Resource[] getResources() throws MojoExecutionException {
    final Resource resourceNonGenerated = new Resource();
    resourceNonGenerated.setDirectory(getTopDirectory().getPath());
    try {
        addNonPartialsToResources(getTopDirectory(),resourceNonGenerated);
    } catch (CodeGenException e) {
        throw new MojoExecutionException("Couldn't add non partial specifications to resources");
    }
    if (resourceNonGenerated.getIncludes().isEmpty()) {
        resourceNonGenerated.addExclude("**/*");
    }
    Resource resourceGenerated = new Resource();
    final File specificationOutputDir = getSpecificationOutput();
    resourceGenerated.setDirectory(specificationOutputDir.getPath());
    resourceGenerated.addInclude("**/*.json");
    final Resource[] resources = {resourceNonGenerated,resourceGenerated};
    return resources;

}
 
開發者ID:indeedeng,項目名稱:proctor,代碼行數:20,代碼來源:AbstractProctorMojo.java

示例2: addResource

import org.apache.maven.model.Resource; //導入方法依賴的package包/類
private Resource addResource(File srcDirectory) {
	Resource r = new Resource();

	r.setDirectory(srcDirectory.getAbsolutePath());
	r.setFiltering(true);
	r.addExclude("**/*TestSuite/"); // exclude FCUnit TestSuites

	return r;
}
 
開發者ID:fastconnect,項目名稱:tibco-bwmaven,代碼行數:10,代碼來源:CopyBWSourcesMojo.java

示例3: createResource

import org.apache.maven.model.Resource; //導入方法依賴的package包/類
protected Resource createResource(String source, String target) {
    Resource resource = new Resource();
    resource.setDirectory(source);
    resource.addExclude("jetty*.css");
    resource.addExclude("plugin.properties");
    resource.addExclude("about.html");
    resource.addExclude("about_files/**");
    resource.addExclude("META-INF/ECLIPSE*");
    resource.addExclude("META-INF/eclipse*");
    resource.addExclude("META-INF/maven/**");
    resource.addExclude("WEB-INF/**");
    resource.addExclude("**/web.xml");
    if (target != null) resource.setTargetPath(target);
    return resource;
}
 
開發者ID:torquebox,項目名稱:jruby9-maven-plugins,代碼行數:16,代碼來源:WarMojo.java

示例4: createGemsResource

import org.apache.maven.model.Resource; //導入方法依賴的package包/類
protected Resource createGemsResource(String gemHome) {
    Resource resource = new Resource();
    resource.setDirectory(gemHome);
    resource.addInclude("bin/*");
    resource.addInclude("specifications/*");
    resource.addInclude("gems/**");
    resource.addExclude("gems/*/test/**");
    resource.addExclude("gems/*/tests/**");
    resource.addExclude("gems/*/spec/**");
    resource.addExclude("gems/*/specs/**");
    resource.addExclude("gems/*/features/**");
    resource.addExclude("gems/**/*.java");
    return resource;
}
 
開發者ID:torquebox,項目名稱:jruby9-maven-plugins,代碼行數:15,代碼來源:AbstractGenerateMojo.java


注:本文中的org.apache.maven.model.Resource.addExclude方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。