use of org.apache.maven.model.Resource in project camel by apache.
the class SpringBootAutoConfigurationMojo method findComponentNames.
private List<String> findComponentNames() {
List<String> componentNames = new ArrayList<String>();
for (Resource r : project.getBuild().getResources()) {
File f = new File(r.getDirectory());
if (!f.exists()) {
f = new File(project.getBasedir(), r.getDirectory());
}
f = new File(f, "META-INF/services/org/apache/camel/component");
if (f.exists() && f.isDirectory()) {
File[] files = f.listFiles();
if (files != null) {
for (File file : files) {
// skip directories as there may be a sub .resolver directory
if (file.isDirectory()) {
continue;
}
String name = file.getName();
if (name.charAt(0) != '.') {
componentNames.add(name);
}
}
}
}
}
return componentNames;
}
use of org.apache.maven.model.Resource in project camel by apache.
the class SpringBootAutoConfigurationMojo method findLanguageNames.
private List<String> findLanguageNames() {
List<String> languageNames = new ArrayList<String>();
for (Resource r : project.getBuild().getResources()) {
File f = new File(r.getDirectory());
if (!f.exists()) {
f = new File(project.getBasedir(), r.getDirectory());
}
f = new File(f, "META-INF/services/org/apache/camel/language");
if (f.exists() && f.isDirectory()) {
File[] files = f.listFiles();
if (files != null) {
for (File file : files) {
// skip directories as there may be a sub .resolver directory
if (file.isDirectory()) {
continue;
}
String name = file.getName();
if (name.charAt(0) != '.') {
languageNames.add(name);
}
}
}
}
}
return languageNames;
}
use of org.apache.maven.model.Resource in project camel by apache.
the class UpdateReadmeMojo method findLanguageNames.
private List<String> findLanguageNames() {
List<String> languageNames = new ArrayList<String>();
for (Resource r : project.getBuild().getResources()) {
File f = new File(r.getDirectory());
if (!f.exists()) {
f = new File(project.getBasedir(), r.getDirectory());
}
f = new File(f, "META-INF/services/org/apache/camel/language");
if (f.exists() && f.isDirectory()) {
File[] files = f.listFiles();
if (files != null) {
for (File file : files) {
// skip directories as there may be a sub .resolver directory
if (file.isDirectory()) {
continue;
}
String name = file.getName();
if (name.charAt(0) != '.') {
languageNames.add(name);
}
}
}
}
}
return languageNames;
}
use of org.apache.maven.model.Resource in project camel by apache.
the class UpdateReadmeMojo method findDataFormatNames.
private List<String> findDataFormatNames() {
List<String> dataFormatNames = new ArrayList<String>();
for (Resource r : project.getBuild().getResources()) {
File f = new File(r.getDirectory());
if (!f.exists()) {
f = new File(project.getBasedir(), r.getDirectory());
}
f = new File(f, "META-INF/services/org/apache/camel/dataformat");
if (f.exists() && f.isDirectory()) {
File[] files = f.listFiles();
if (files != null) {
for (File file : files) {
// skip directories as there may be a sub .resolver directory
if (file.isDirectory()) {
continue;
}
String name = file.getName();
if (name.charAt(0) != '.') {
dataFormatNames.add(name);
}
}
}
}
}
return dataFormatNames;
}
use of org.apache.maven.model.Resource 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;
}
Aggregations