Package org.apache.maven.model

Examples of org.apache.maven.model.Resource.addInclude()


            } finally {
                out.close();
            }
            Resource resource = new Resource();
            resource.setDirectory(targetDir.getPath());
            resource.addInclude(pluginMetadataFileName);
            getProject().getResources().add(resource);
            //also attach plugin metadata as an additional artifact, like the pom
            projectHelper.attachArtifact(getProject(), "plugin-metadata", targetFile);
        } catch (Exception e) {
            throw new MojoExecutionException("Could not create plugin metadata", e);
View Full Code Here


        // #12549 - add resources generated by MSBuild to the project
        // TODO: should be configurable?
        Resource resource = new Resource();
        resource.setDirectory( "obj/Debug" );
        resource.addInclude( "**/*.resources" );
        project.addResource( resource );

        return super.preExecute();
    }
}
View Full Code Here

            resourceNonGenerated.addExclude("**/*");
        }
        Resource resourceGenerated = new Resource();
        final File specificationOutputDir = getSpecificationOutput();
        resourceGenerated.setDirectory(specificationOutputDir.getPath());
        resourceGenerated.addInclude("**/*.json");
        final Resource[] resources = {resourceNonGenerated,resourceGenerated};
        return resources;

    }

View Full Code Here

            } finally {
                out.close();
            }
            Resource resource = new Resource();
            resource.setDirectory(targetDir.getPath());
            resource.addInclude(pluginMetadataFileName);
            getProject().getResources().add(resource);
        } catch (Exception e) {
            throw new MojoExecutionException("Could not create plugin metadata", e);
        }
    }
View Full Code Here

    resource.setDirectory(getProjectFolder().getAbsolutePath());

    if (resourcesInclude != null) {
      for (String resourceInclude : resourcesInclude) {
        resource.addInclude(resourceInclude);
      }
    }

    if (resourcesExclude != null) {
      for (String resourceExclude : resourcesExclude) {
View Full Code Here

    Resource resource = findOrCreateResource(getProject().getResources(), resourcesDirectory.getAbsolutePath());

    resource.addExclude("*.lproj/**");

    if (flattenResources()) {
      resource.addInclude("*");
      resource.addInclude("*.wo/**");
      resource.addInclude("*.eomodeld/**");
    }

    resource.setTargetPath(fullTargetPath);
 
View Full Code Here

    resource.addExclude("*.lproj/**");

    if (flattenResources()) {
      resource.addInclude("*");
      resource.addInclude("*.wo/**");
      resource.addInclude("*.eomodeld/**");
    }

    resource.setTargetPath(fullTargetPath);

 
View Full Code Here

    resource.addExclude("*.lproj/**");

    if (flattenResources()) {
      resource.addInclude("*");
      resource.addInclude("*.wo/**");
      resource.addInclude("*.eomodeld/**");
    }

    resource.setTargetPath(fullTargetPath);

    List<Resource> resources = new ArrayList<Resource>();
View Full Code Here

        List<Resource> resources = new ArrayList<Resource>();
        for (String root: (List<String>)project.getCompileSourceRoots()) {
            if (new File(root).exists()) {
                Resource resource = new Resource();
                resource.setDirectory(root);
                resource.addInclude("*.java");
                resources.add(resource);
            }
        }
        return areStale(resources, project.getBuild().getOutputDirectory());
    }
View Full Code Here

        } finally {
            out.close();
        }
        Resource resource = new Resource();
        resource.setDirectory(targetDir.getPath());
        resource.addInclude(pluginMetadataFileName);
        getProject().getResources().add(resource);
    }

    private void addDependencies(PluginArtifactType instance) throws InvalidConfigException, IOException, NoSuchConfigException {
        if (useMavenDependencies == null || !useMavenDependencies.isValue()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.