本文整理汇总了Java中org.apache.maven.model.io.ModelReader类的典型用法代码示例。如果您正苦于以下问题:Java ModelReader类的具体用法?Java ModelReader怎么用?Java ModelReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelReader类属于org.apache.maven.model.io包,在下文中一共展示了ModelReader类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import org.apache.maven.model.io.ModelReader; //导入依赖的package包/类
@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);
}
示例2: POMManager
import org.apache.maven.model.io.ModelReader; //导入依赖的package包/类
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);
}
}
示例3: getModel
import org.apache.maven.model.io.ModelReader; //导入依赖的package包/类
private static Model getModel() {
ModelReader modelReader = new DefaultModelReader();
try {
return modelReader.read(new File("pom.xml"), null);
} catch (IOException cause) {
throw new RuntimeException(cause);
}
}
示例4: setUp
import org.apache.maven.model.io.ModelReader; //导入依赖的package包/类
@Override
protected void setUp()
throws Exception
{
super.setUp();
reader = lookup( ModelReader.class );
writer = lookup( ModelWriter.class );
assembler = lookup( InheritanceAssembler.class );
}
示例5: setModelReader
import org.apache.maven.model.io.ModelReader; //导入依赖的package包/类
public DefaultModelProcessor setModelReader( ModelReader reader )
{
this.reader = reader;
return this;
}
示例6: newModelReader
import org.apache.maven.model.io.ModelReader; //导入依赖的package包/类
protected ModelReader newModelReader()
{
return new DefaultModelReader();
}