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

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

Introduction

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

Prototype

JdkPrefixProfileActivator

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   www. ja  va 2 s  .  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 a2 s  .  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() };
}