Example usage for org.apache.maven.profiles.activation SystemPropertyProfileActivator contextualize

List of usage examples for org.apache.maven.profiles.activation SystemPropertyProfileActivator contextualize

Introduction

In this page you can find the example usage for org.apache.maven.profiles.activation SystemPropertyProfileActivator contextualize.

Prototype

public void contextualize(Context context) throws ContextException 

Source Link

Usage

From source file:org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl.java

License:Apache License

private static ProfileActivator[] getProfileActivators(File basedir) throws RemoteException {
    SystemPropertyProfileActivator sysPropertyActivator = new SystemPropertyProfileActivator();
    DefaultContext context = new DefaultContext();
    context.put("SystemProperties", MavenServerUtil.collectSystemProperties());
    try {/*from  w  w  w  . j  av  a2s  .  c  o  m*/
        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() };
}

From source file:org.jetbrains.idea.maven.server.Maven30ServerEmbedderImpl.java

License:Apache License

private static ProfileActivator[] getProfileActivators(File basedir) throws RemoteException {
    SystemPropertyProfileActivator sysPropertyActivator = new SystemPropertyProfileActivator();
    DefaultContext context = new DefaultContext();
    context.put("SystemProperties", MavenServerUtil.collectSystemProperties());
    try {/*w ww.  ja  v a2s. co m*/
        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() };
}