本文整理汇总了Java中org.apache.maven.artifact.handler.manager.ArtifactHandlerManager类的典型用法代码示例。如果您正苦于以下问题:Java ArtifactHandlerManager类的具体用法?Java ArtifactHandlerManager怎么用?Java ArtifactHandlerManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ArtifactHandlerManager类属于org.apache.maven.artifact.handler.manager包,在下文中一共展示了ArtifactHandlerManager类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
protected void setUp()
throws Exception
{
super.setUp();
ArtifactHandlerManager manager = new DefaultArtifactHandlerManager();
this.setVariableValueToObject( manager, "artifactHandlers", new HashMap() );
artifactFactory = new DefaultArtifactFactory();
this.setVariableValueToObject( artifactFactory, "artifactHandlerManager", manager );
DependencyArtifactStubFactory factory = new DependencyArtifactStubFactory( null, false );
artifacts = factory.getMixedArtifacts();
}
示例2: initialize
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
@PostConstruct
public void initialize()
throws PlexusSisuBridgeException
{
this.digesters = digesterUtils.getAllDigesters();
translator = plexusSisuBridge.lookup( ModelConverter.class );
artifactFactory = plexusSisuBridge.lookup( ArtifactFactory.class );
artifactHandlerManager = plexusSisuBridge.lookup( ArtifactHandlerManager.class );
}
示例3: testCreateEffectivePom
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
/**
* Tests method to create effective POM.
*
* @throws Exception if something goes wrong.
*/
@Test
public void testCreateEffectivePom()
throws Exception
{
String magicValue = "magic-value";
Properties userProperties = new Properties();
userProperties.setProperty( "cmd.test.property", magicValue );
File pomFile = new File( "src/test/resources/cmdpropertysubstituion/pom.xml" );
ArtifactRepository localRepository = new MavenArtifactRepository();
localRepository.setLayout( new DefaultRepositoryLayout() );
ArtifactFactory artifactFactory = new DefaultArtifactFactory();
ArtifactHandlerManager artifactHandlerManager = new DefaultArtifactHandlerManager();
setDeclaredField( artifactFactory, "artifactHandlerManager", artifactHandlerManager );
Map<String, ArtifactHandler> artifactHandlers = new HashMap<String, ArtifactHandler>();
setDeclaredField( artifactHandlerManager, "artifactHandlers", artifactHandlers );
DefaultDependencyResolver depencencyResolver = new DefaultDependencyResolver();
DefaultProjectBuildingRequest projectBuildingRequest = new DefaultProjectBuildingRequest();
FlattenModelResolver resolver = new FlattenModelResolver( localRepository, artifactFactory,
depencencyResolver, projectBuildingRequest, Collections.<MavenProject>emptyList() );
ModelBuildingRequest buildingRequest =
new DefaultModelBuildingRequest().setPomFile( pomFile ).setModelResolver( resolver ).setUserProperties( userProperties );
Model effectivePom = FlattenMojo.createEffectivePom( buildingRequest, false );
assertThat( effectivePom.getName() ).isEqualTo( magicValue );
}
示例4: BundleToArtifactTest
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public BundleToArtifactTest() throws NoSuchFieldException, IllegalAccessException {
factory = new DefaultArtifactFactory();
ArtifactHandlerManager artifactHandlerManager = new DefaultArtifactHandlerManager();
Field f = factory.getClass().getDeclaredField("artifactHandlerManager");
f.setAccessible(true);
f.set(factory, artifactHandlerManager);
f.setAccessible(false);
f = artifactHandlerManager.getClass().getDeclaredField("artifactHandlers");
f.setAccessible(true);
f.set(artifactHandlerManager, new HashMap());
f.setAccessible(false);
}
示例5: AddToRepositoryMojoTest
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public AddToRepositoryMojoTest() throws NoSuchFieldException, IllegalAccessException {
factory = new DefaultArtifactFactory();
ArtifactHandlerManager artifactHandlerManager = new DefaultArtifactHandlerManager();
Field f = factory.getClass().getDeclaredField("artifactHandlerManager");
f.setAccessible(true);
f.set(factory, artifactHandlerManager);
f.setAccessible(false);
f = artifactHandlerManager.getClass().getDeclaredField("artifactHandlers");
f.setAccessible(true);
f.set(artifactHandlerManager, new HashMap());
f.setAccessible(false);
}
示例6: getArtifactHandlerManager
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public ArtifactHandlerManager getArtifactHandlerManager()
{
return artifactHandlerManager;
}
示例7: setArtifactHandlerManager
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public void setArtifactHandlerManager( ArtifactHandlerManager artifactHandlerManager )
{
this.artifactHandlerManager = artifactHandlerManager;
}
示例8: newArtifactTypeRegistry
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public static ArtifactTypeRegistry newArtifactTypeRegistry(ArtifactHandlerManager handlerManager) {
return new MavenArtifactTypeRegistry(handlerManager);
}
示例9: MavenArtifactTypeRegistry
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public MavenArtifactTypeRegistry(ArtifactHandlerManager handlerManager) {
this.handlerManager = handlerManager;
}
示例10: newArtifactTypeRegistry
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public static ArtifactTypeRegistry newArtifactTypeRegistry( ArtifactHandlerManager handlerManager )
{
return new MavenArtifactTypeRegistry( handlerManager );
}
示例11: MavenArtifactTypeRegistry
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
public MavenArtifactTypeRegistry( ArtifactHandlerManager handlerManager )
{
this.handlerManager = handlerManager;
}
示例12: getArtifactHandlerManager
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
@Override
public ArtifactHandlerManager getArtifactHandlerManager() {
return this.artifactHandlerManager;
}
示例13: getArtifactHandlerManager
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; //导入依赖的package包/类
/**
* Replies the artifact handler manager.
*
* <p>It is an attribute defined as: <pre><code>
* <span>/</span>* <span>@</span>component
* <span>*</span>/
* private ArtifactHandlerManager manager;
* </code></pre>
*
* @return the artifact resolver.
*/
public abstract ArtifactHandlerManager getArtifactHandlerManager();