本文整理汇总了Java中org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException类的典型用法代码示例。如果您正苦于以下问题:Java InitializationException类的具体用法?Java InitializationException怎么用?Java InitializationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InitializationException类属于org.codehaus.plexus.personality.plexus.lifecycle.phase包,在下文中一共展示了InitializationException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CustomModelBuilder
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
public CustomModelBuilder(Model model) {
ExecuteManager executeManager = new ExecuteManagerImpl();
setProp(executeManager.getClass(), executeManager, "log",
new PlexusLoggerAdapter(LoggerFactory.getLogger(ExecuteManagerImpl.class)));
setProp(ModelBuilder.class, this, "executeManager", executeManager);
setProp(ModelBuilder.class, this, "log",
new PlexusLoggerAdapter(LoggerFactory.getLogger(ModelBuilder.class)));
try {
initialize();
} catch (InitializationException e) {
throw new RuntimeException(e);
}
Map factories = (Map) getProp(FactoryBuilderSupport.class, this, "factories");
factories.remove("project");
ModelFactory modelFactory = new ModelFactory(model);
registerFactory(modelFactory.getName(), null, modelFactory);
}
示例2: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@Override
public void initialize() throws InitializationException {
if (apolloDataSourceProviderPresent) {
try {
m_delegate = (DataSourceProvider)(Class.forName(apolloDataSourceProviderClass).newInstance());
} catch (Throwable ex) {
m_logger.error("Loading apollo datasource provider failed", ex);
}
}
if (m_delegate == null) {
m_delegate = createDefaultDataSourceProvider();
}
if (m_delegate instanceof LogEnabled) {
((LogEnabled)m_delegate).enableLogging(m_logger);
}
logger.info("[initialize][DataSourceProvider]{}", m_delegate);
}
示例3: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@Override
public void initialize()
throws InitializationException
{
try
{
// First try to use SLF4J logging (available in Maven 3.1.0+)
delegate = new Slf4jLoggerAdapter();
}
catch ( LinkageError e )
{
// Fall back to Plexus logger
delegate = new PlexusLoggerAdapter( plexusLogger );
}
}
示例4: interpolateProject
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
private void interpolateProject() throws InitializationException, Exception, ModelInterpolationException {
StringSearchModelInterpolator interpolator = new StringSearchModelInterpolator(new DefaultPathTranslator());
interpolator.enableLogging(new PlexusLoggerAdapter(embedder.getLogger()));
interpolator.initialize();
ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
config.setLocalRepository(getLocalRepository());
config.setGlobalProfileManager(getProfileManager());
interpolator.interpolate(project.getModel(), project.getBasedir(), config, logger.isDebugEnabled());
}
示例5: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@Override
public void initialize() throws InitializationException {
configuration = gitlabPluginConfiguration.getConfiguration();
if (configuration != null) {
try {
restClient = new CachingRestClient(configuration);
} catch (URISyntaxException use) {
throw new InitializationException("Rest client init failed", use);
}
configured = true;
}
}
示例6: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
public void initialize()
throws InitializationException
{
String mavenVersion = rtInfo.getMavenVersion();
if ( StringUtils.isEmpty( mavenVersion ) )
{
throw new InitializationException( "Unable to read Maven version from maven-core" );
}
applicationVersion = new DefaultArtifactVersion( mavenVersion );
}
示例7: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@Override
public void initialize() throws InitializationException {
this.converterLookup.registerConverter(new SeverityConfigurationConverter());
this.converterLookup.registerConverter(new StoreLifeCycleConverter());
}
示例8: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@PostConstruct
public void initialize()
throws InitializationException
{
log.info( "Initialized {}", this.getClass().getName() );
}
示例9: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@Override
public void initialize() throws InitializationException {
LOGGER.info(GITLAB_MSG + "Realm activated.");
active.set(true);
}
示例10: testInitialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
@Test
public void testInitialize() throws InitializationException, RemoteException {
DefaultGitlabDao gitlab = new DefaultGitlabDao();
assertNotNull(gitlab);
}
示例11: initialize
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; //导入依赖的package包/类
public void initialize()
throws InitializationException
{
interpolator = createInterpolator();
recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
}