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

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

Introduction

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

Prototype

SystemPropertyProfileActivator

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 {/*w w w.  j  a  va  2s  .  c om*/
        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 {/*from  www. j  a va 2s . c o  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() };
}