当前位置: 首页>>代码示例>>Java>>正文


Java ContextException类代码示例

本文整理汇总了Java中org.codehaus.plexus.context.ContextException的典型用法代码示例。如果您正苦于以下问题:Java ContextException类的具体用法?Java ContextException怎么用?Java ContextException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ContextException类属于org.codehaus.plexus.context包,在下文中一共展示了ContextException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getProfileActivators

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
private static ProfileActivator[] getProfileActivators(File basedir) throws RemoteException {
  SystemPropertyProfileActivator sysPropertyActivator = new SystemPropertyProfileActivator();
  DefaultContext context = new DefaultContext();
  context.put("SystemProperties", MavenServerUtil.collectSystemProperties());
  try {
    sysPropertyActivator.contextualize(context);
  }
  catch (ContextException e) {
    Maven2ServerGlobals.getLogger().error(e);
    return new ProfileActivator[0];
  }

  return new ProfileActivator[]{new MyFileProfileActivator(basedir),
    sysPropertyActivator,
    new JdkPrefixProfileActivator(),
    new OperatingSystemProfileActivator()};
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:Maven2ServerEmbedderImpl.java

示例2: getProfileActivators

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
private static ProfileActivator[] getProfileActivators(File basedir) throws RemoteException {
  SystemPropertyProfileActivator sysPropertyActivator = new SystemPropertyProfileActivator();
  DefaultContext context = new DefaultContext();
  context.put("SystemProperties", collectSystemProperties());
  try {
    sysPropertyActivator.contextualize(context);
  } catch (ContextException e) {
    MavenServerContext.getLogger().error(e);
    return new ProfileActivator[0];
  }

  return new ProfileActivator[] {
    new MavenFileProfileActivator(basedir),
    sysPropertyActivator,
    new JdkPrefixProfileActivator(),
    new OperatingSystemProfileActivator()
  };
}
 
开发者ID:eclipse,项目名称:che,代码行数:19,代码来源:MavenServerImpl.java

示例3: getProfileActivators

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
private static ProfileActivator[] getProfileActivators(File basedir) throws RemoteException {
  SystemPropertyProfileActivator sysPropertyActivator = new SystemPropertyProfileActivator();
  DefaultContext context = new DefaultContext();
  context.put("SystemProperties", MavenServerUtil.collectSystemProperties());
  try {
    sysPropertyActivator.contextualize(context);
  }
  catch (ContextException e) {
    Maven3ServerGlobals.getLogger().error(e);
    return new ProfileActivator[0];
  }

  return new ProfileActivator[]{new MyFileProfileActivator(basedir),
    sysPropertyActivator,
    new JdkPrefixProfileActivator(),
    new OperatingSystemProfileActivator()};
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:Maven3ServerEmbedderImpl.java

示例4: getProfileActivators

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
private static ProfileActivator[] getProfileActivators(File basedir) throws RemoteException {
  SystemPropertyProfileActivator sysPropertyActivator = new SystemPropertyProfileActivator();
  DefaultContext context = new DefaultContext();
  context.put("SystemProperties", MavenServerUtil.collectSystemProperties());
  try {
    sysPropertyActivator.contextualize(context);
  }
  catch (ContextException e) {
    Maven3ServerGlobals.getLogger().error(e);
    return new ProfileActivator[0];
  }

  return new ProfileActivator[]{new MyFileProfileActivator(basedir), sysPropertyActivator, new JdkPrefixProfileActivator(),
    new OperatingSystemProfileActivator()};
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:Maven30ServerEmbedderImpl.java

示例5: analyze

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
/**
 * Analyze the project.
 * @param env The environment
 * @return The result of analysis
 */
private static ProjectDependencyAnalysis analyze(
    final MavenEnvironment env) {
    try {
        return ((ProjectDependencyAnalyzer)
            ((PlexusContainer)
                env.context().get(PlexusConstants.PLEXUS_KEY)
            ).lookup(ProjectDependencyAnalyzer.ROLE, "default")
        ).analyze(env.project());
    } catch (final ContextException | ComponentLookupException
        | ProjectDependencyAnalyzerException ex) {
        throw new IllegalStateException(ex);
    }
}
 
开发者ID:teamed,项目名称:qulice,代码行数:19,代码来源:DependenciesValidator.java

示例6: get

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
/**
 * Gets the list of watchers from the given Plexus context.
 *
 * @param context the Plexus context
 * @return the list of watcher, empty if none. Modifying the resulting list, updates the stored list.
 */
static synchronized List<Watcher> get(Context context) {
    List<Watcher> watchers;
    if (context.contains(WATCHERS_KEY)) {
        try {
            watchers = (List<Watcher>) context.get(WATCHERS_KEY);
        } catch (ContextException e) {
            throw new IllegalStateException("Cannot extract the watcher from the context", e);
        }
    } else {
        watchers = new ArrayList<>();
        context.put(WATCHERS_KEY, watchers);
    }
    return watchers;
}
 
开发者ID:wisdom-framework,项目名称:wisdom,代码行数:21,代码来源:Watchers.java

示例7: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
public void contextualize( Context context )
    throws ContextException
{
    plexusContainer = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:6,代码来源:ShadeMojo.java

示例8: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public void contextualize( Context context )
    throws ContextException
{
    container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:9,代码来源:AssembleMojo.java

示例9: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
public void contextualize(Context context) throws ContextException {
	plexusContainer = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
开发者ID:dajester2013,项目名称:lucee-maven-plugin,代码行数:4,代码来源:LarCopySourcesMojo.java

示例10: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public void contextualize( final Context context )
        throws ContextException
{
    container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
开发者ID:mojohaus,项目名称:webstart,代码行数:9,代码来源:DefaultJnlpDependencyRequestBuilder.java

示例11: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
@Override
public void contextualize(final Context context) throws ContextException
{
    this.container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
开发者ID:basepom,项目名称:property-helper-maven-plugin,代码行数:6,代码来源:AbstractPropertyHelperMojo.java

示例12: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
开发者ID:opoo,项目名称:opoopress,代码行数:5,代码来源:AbstractDeployMojo.java

示例13: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
开发者ID:opoo,项目名称:opoopress,代码行数:5,代码来源:BuildMojo.java

示例14: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
public void contextualize( Context context )
        throws ContextException
{
    this.container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
开发者ID:bitstrings,项目名称:nbm-maven,代码行数:6,代码来源:CreateNbmMojo.java

示例15: contextualize

import org.codehaus.plexus.context.ContextException; //导入依赖的package包/类
public void contextualize( Context context )
    throws ContextException
{
    this.container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
开发者ID:bitstrings,项目名称:nbm-maven,代码行数:6,代码来源:CreateUpdateSiteMojo.java


注:本文中的org.codehaus.plexus.context.ContextException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。