use of org.eclipse.ceylon.aether.apache.maven.model.Model in project ceylon by eclipse.
the class AetherResolverImpl method getDependencies.
@Override
public DependencyDescriptor getDependencies(File pomXml, String name, String version) throws IOException {
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model;
try (FileReader fileReader = new FileReader(pomXml)) {
model = reader.read(fileReader);
} catch (XmlPullParserException e) {
throw new IOException(e);
}
return new ModelDependencyDescriptor(model);
}
use of org.eclipse.ceylon.aether.apache.maven.model.Model in project ceylon by eclipse.
the class AetherResolverImpl method getDependencies.
@Override
public DependencyDescriptor getDependencies(InputStream pomXml, String name, String version) throws IOException {
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model;
try {
model = reader.read(pomXml);
} catch (XmlPullParserException e) {
throw new IOException(e);
}
return new ModelDependencyDescriptor(model);
}
use of org.eclipse.ceylon.aether.apache.maven.model.Model in project ceylon by eclipse.
the class AetherResolverImpl method findExtension.
private String findExtension(File pomFile) {
if (pomFile != null && pomFile.exists()) {
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model;
try (FileReader fileReader = new FileReader(pomFile)) {
model = reader.read(fileReader);
return model.getPackaging();
} catch (XmlPullParserException | IOException e) {
return null;
}
}
;
return null;
}
Aggregations