本文整理汇总了Java中org.apache.maven.plugin.PluginManager类的典型用法代码示例。如果您正苦于以下问题:Java PluginManager类的具体用法?Java PluginManager怎么用?Java PluginManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PluginManager类属于org.apache.maven.plugin包,在下文中一共展示了PluginManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: findArtifactTypeHandlers
import org.apache.maven.plugin.PluginManager; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
private Map findArtifactTypeHandlers(MavenProject project) {
// end copied from DefaultLifecycleExecutor.findExtensions
Map result = new HashMap();
for (Object each : project.getBuildPlugins()) {
Plugin eachPlugin = (Plugin)each;
if (eachPlugin.isExtensions()) {
try {
PluginManager pluginManager = getComponent(PluginManager.class);
pluginManager.verifyPlugin(eachPlugin, project, mySettings, myLocalRepository);
result.putAll(pluginManager.getPluginComponents(eachPlugin, ArtifactHandler.ROLE));
}
catch (Exception e) {
MavenEmbedderLog.LOG.info(e);
continue;
}
for (Object o : result.values()) {
ArtifactHandler handler = (ArtifactHandler)o;
if (project.getPackaging().equals(handler.getPackaging())) {
project.getArtifact().setArtifactHandler(handler);
}
}
}
}
return result;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:MavenEmbedder.java
示例2: testConstructor
import org.apache.maven.plugin.PluginManager; //导入依赖的package包/类
@Test
public void testConstructor() throws Exception {
Assert.assertEquals(expectedUrl,
(String) getValueOfFieldInObject("url", wu));
Assert.assertEquals(up.getLog(), (Log) getValueOfFieldInObject("l", wu));
Assert.assertEquals(ws.getMojo().getProject(),
(MavenProject) getValueOfFieldInObject("project", wu));
Assert.assertEquals(ws.getMojo().getPluginManager(),
(PluginManager) getValueOfFieldInObject("pluginManager", wu));
Assert.assertEquals(ws.getMojo().getSession(),
(MavenSession) getValueOfFieldInObject("session", wu));
Assert.assertEquals(expectedPackageFile,
(File) getValueOfFieldInObject("packageFile", wu));
}
开发者ID:tarent,项目名称:pkg-maven-plugin,代码行数:15,代码来源:WagonUploaderTest.java
示例3: getPluginManager
import org.apache.maven.plugin.PluginManager; //导入依赖的package包/类
public PluginManager getPluginManager() {
return pluginManager;
}
开发者ID:tarent,项目名称:pkg-maven-plugin,代码行数:4,代码来源:AbstractPackagingMojo.java
注:本文中的org.apache.maven.plugin.PluginManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论