Search in sources :

Example 1 with MavenResource

use of org.eclipse.che.maven.data.MavenResource in project che by eclipse.

the class MavenModelUtil method convertToMavenResource.

private static Resource convertToMavenResource(MavenResource mavenResource) {
    Resource resource = new Resource();
    resource.setDirectory(mavenResource.getDirectory());
    resource.setFiltering(mavenResource.isFiltered());
    resource.setTargetPath(mavenResource.getTargetPath());
    resource.setIncludes(mavenResource.getIncludes());
    resource.setExcludes(mavenResource.getExcludes());
    return resource;
}
Also used : MavenResource(org.eclipse.che.maven.data.MavenResource) Resource(org.apache.maven.model.Resource)

Example 2 with MavenResource

use of org.eclipse.che.maven.data.MavenResource in project che by eclipse.

the class MavenModelReader method fillModelByDefaults.

private void fillModelByDefaults(MavenModel model) {
    model.setMavenKey(new MavenKey("unknown", "unknown", "unknown"));
    final MavenKey parentKey = new MavenKey("unknown", "unknown", "unknown");
    model.setParent(new MavenParent(parentKey, "../pom.xml"));
    model.setPackaging("jar");
    model.setModules(emptyList());
    final MavenBuild build = model.getBuild();
    build.setSources(singletonList(DEFAULT_SOURCE_FOLDER));
    build.setTestSources(singletonList(DEFAULT_TEST_SOURCE_FOLDER));
    build.setResources(singletonList(new MavenResource(DEFAULT_RESOURCES_FOLDER, false, null, Collections.emptyList(), Collections.emptyList())));
    build.setTestResources(singletonList(new MavenResource(DEFAULT_TEST_RESOURCES_FOLDER, false, null, Collections.emptyList(), Collections.emptyList())));
}
Also used : MavenBuild(org.eclipse.che.maven.data.MavenBuild) MavenKey(org.eclipse.che.maven.data.MavenKey) MavenResource(org.eclipse.che.maven.data.MavenResource) MavenParent(org.eclipse.che.maven.data.MavenParent)

Aggregations

MavenResource (org.eclipse.che.maven.data.MavenResource)2 Resource (org.apache.maven.model.Resource)1 MavenBuild (org.eclipse.che.maven.data.MavenBuild)1 MavenKey (org.eclipse.che.maven.data.MavenKey)1 MavenParent (org.eclipse.che.maven.data.MavenParent)1