private static Properties searchPropertiesForEnvironment(
     String envName, EnvParamDescriptor descriptor) {
   Properties properties = new Properties();
   try {
     List<Environment> environments = descriptor.getEnvironments();
     for (Environment environment : environments) {
       if (environment.getName().equals(envName)) {
         properties.load(new StringReader(environment.getProperties()));
         break;
       }
     }
   } catch (IOException e) {
     // never happened
   }
   return properties;
 }
예제 #2
0
 public boolean supportsEnvironment(Environment environment) {
   return supportsValueInIncludeExcludeMap(pluginEnvs, environment.getName());
 }