Java 类org.apache.maven.model.io.ModelReader 实例源码
项目:spring-cloud-function
文件:DependencyResolver.java
@Override
protected void configure() {
bind(ModelLocator.class).to(DefaultModelLocator.class).in(Singleton.class);
bind(ModelReader.class).to(DefaultModelReader.class).in(Singleton.class);
bind(ModelValidator.class).to(DefaultModelValidator.class).in(Singleton.class);
bind(RepositoryConnectorFactory.class).to(BasicRepositoryConnectorFactory.class)
.in(Singleton.class);
bind(ArtifactDescriptorReader.class) //
.to(DefaultArtifactDescriptorReader.class).in(Singleton.class);
bind(VersionResolver.class) //
.to(DefaultVersionResolver.class).in(Singleton.class);
bind(VersionRangeResolver.class) //
.to(DefaultVersionRangeResolver.class).in(Singleton.class);
bind(MetadataGeneratorFactory.class).annotatedWith(Names.named("snapshot")) //
.to(SnapshotMetadataGeneratorFactory.class).in(Singleton.class);
bind(MetadataGeneratorFactory.class).annotatedWith(Names.named("versions")) //
.to(VersionsMetadataGeneratorFactory.class).in(Singleton.class);
bind(TransporterFactory.class).annotatedWith(Names.named("http"))
.to(HttpTransporterFactory.class).in(Singleton.class);
bind(TransporterFactory.class).annotatedWith(Names.named("file"))
.to(FileTransporterFactory.class).in(Singleton.class);
}
项目:jCode
文件:POMManager.java
public POMManager(String inputResource, Project project) {
this(project, false);
try {
//source
ModelReader reader = EmbedderFactory.getProjectEmbedder().lookupComponent(ModelReader.class);
sourceModel = reader.read(FileUtil.loadResource(inputResource), Collections.singletonMap(ModelReader.IS_STRICT, false));
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
}
项目:eclipselink-example
文件:POM.java
private static Model getModel() {
ModelReader modelReader = new DefaultModelReader();
try {
return modelReader.read(new File("pom.xml"), null);
} catch (IOException cause) {
throw new RuntimeException(cause);
}
}
项目:eclipselink-example
文件:POM.java
private static Model getModel() {
ModelReader modelReader = new DefaultModelReader();
try {
return modelReader.read(new File("pom.xml"), null);
} catch (IOException cause) {
throw new RuntimeException(cause);
}
}
项目:oceano
文件:DefaultInheritanceAssemblerTest.java
@Override
protected void setUp()
throws Exception
{
super.setUp();
reader = lookup( ModelReader.class );
writer = lookup( ModelWriter.class );
assembler = lookup( InheritanceAssembler.class );
}
项目:oceano
文件:DefaultModelProcessor.java
public DefaultModelProcessor setModelReader( ModelReader reader )
{
this.reader = reader;
return this;
}
项目:oceano
文件:DefaultModelBuilderFactory.java
protected ModelReader newModelReader()
{
return new DefaultModelReader();
}