All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.security.fences.RelevantSystemProperties Maven / Gradle / Ivy

Go to download

Augments Java's access control by checking that a Maven Project and all its dependencies conform to a policy that specifies which classes/packages can link to which others.

There is a newer version: 1.9-beta
Show newest version
package com.google.security.fences;

/** Utilities relating to system properties relevant to this project. */
public final class RelevantSystemProperties {

  /**
   * When a property with this name is set, the rule will dump the
   * effective policy configuration XML to the log file.
   */
  public static final String PROPERTY_SHOW_EFFECTIVE_CONFIG =
      "fences.config.show";

  /**
   * When a property with this name is set, the rule will warn instead of
   * {@linkplain org.apache.maven.plugin.logging.Log#error erroring}
   * when a relaxing of a policy would cause the rule to pass.
   * 

* This does not prevent erroring due to a missing dependency, error * in parsing the configuration, or exception during rule evaluation. * Use {@code enforcer.skip} for that. */ public static final String PROPERTY_EXPERIMENTAL_MODE = "fences.experimental"; /** * True to dump the effective policy configuration to the log. */ public static boolean shouldShowEffectiveConfig() { return System.getProperty(PROPERTY_SHOW_EFFECTIVE_CONFIG) != null; } /** * True when we should warn instead of * {@linkplain org.apache.maven.plugin.logging.Log#error erroring} * when a relaxing of a policy would cause the rule to pass. */ public static boolean inExperimentalMode() { return System.getProperty(PROPERTY_EXPERIMENTAL_MODE) != null; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy