Class ExecutionEnvironmentUtils


  • public class ExecutionEnvironmentUtils
    extends java.lang.Object
    Creative copy&paste from org.eclipse.osgi.framework.internal.core.Framework
    • Field Detail

      • profilesProperties

        private static java.util.Map<java.lang.String,​java.util.Properties> profilesProperties
    • Constructor Detail

      • ExecutionEnvironmentUtils

        public ExecutionEnvironmentUtils()
    • Method Detail

      • fillEnvironmentsMap

        private static java.util.Map<java.lang.String,​java.util.Properties> fillEnvironmentsMap()
      • readProperties

        private static java.util.Properties readProperties​(java.net.URL url)
      • getExecutionEnvironment

        public static StandardExecutionEnvironment getExecutionEnvironment​(java.lang.String profileName,
                                                                           org.apache.maven.toolchain.ToolchainManager manager,
                                                                           org.apache.maven.execution.MavenSession session,
                                                                           org.codehaus.plexus.logging.Logger logger)
                                                                    throws UnknownEnvironmentException
        Get the execution environment for the specified OSGi profile name.
        Parameters:
        profileName - profile name value as specified for key "Bundle-RequiredExecutionEnvironment" in MANIFEST.MF
        Returns:
        the corresponding ExecutionEnvironment.
        Throws:
        UnknownEnvironmentException - if profileName is unknown.
      • getProfileNames

        public static java.util.List<java.lang.String> getProfileNames()
      • applyProfileProperties

        public static void applyProfileProperties​(java.util.Properties properties,
                                                  ExecutionEnvironment executionEnvironment)
      • findInSystemBundle

        private static java.net.URL findInSystemBundle​(java.lang.String entry)