Class SystemPropertyChangeEnvironmentFacet
- java.lang.Object
- 
- org.codehaus.mojo.jaxb2.shared.environment.AbstractLogAwareFacet
- 
- org.codehaus.mojo.jaxb2.shared.environment.sysprops.SystemPropertyChangeEnvironmentFacet
 
 
- 
- All Implemented Interfaces:
- EnvironmentFacet
 
 public final class SystemPropertyChangeEnvironmentFacet extends AbstractLogAwareFacet EnvironmentFacet which changes the value of a system property for the duration of executing a tool. This is required for tools (such as the JDK SchemaGen) which relies on environment or system properties being set for their execution. This faced accepts one key and two values (original/new values).- Since:
- 2.1
- Author:
- Lennart Jörelid, jGuru Europe AB
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSystemPropertyChangeEnvironmentFacet.ChangeTypeOperation definitions indicating how a System property should be changed by this EnvironmentFacet.static classSystemPropertyChangeEnvironmentFacet.SystemPropertyChangesBuilderBuilder class intended to simplify creating SystemPropertyChange EnvironmentFacets.
 - 
Field Summary- 
Fields inherited from class org.codehaus.mojo.jaxb2.shared.environment.AbstractLogAwareFacetlog
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SystemPropertyChangeEnvironmentFacet.SystemPropertyChangesBuildergetBuilder(org.apache.maven.plugin.logging.Log mavenLog)Creates a SystemPropertyChangesBuilder which uses the supplied active Maven Log.voidrestore()Restores the original Environment, implying that the change performed insetup()method are restored to the state before the setup method was called.voidsetup()Sets up this Environment, inferring temporary changes to environment variables or conditions.StringtoString()
 
- 
- 
- 
Method Detail- 
setuppublic void setup() Sets up this Environment, inferring temporary changes to environment variables or conditions. The changes must be reversible, and should be restored to their original values in therestore()method.
 - 
restorepublic void restore() Restores the original Environment, implying that the change performed insetup()method are restored to the state before the setup method was called.
 - 
toStringpublic String toString() 
 - 
getBuilderpublic static SystemPropertyChangeEnvironmentFacet.SystemPropertyChangesBuilder getBuilder(org.apache.maven.plugin.logging.Log mavenLog) Creates a SystemPropertyChangesBuilder which uses the supplied active Maven Log.- Parameters:
- mavenLog- The active Maven Log to be used by all SystemPropertyChange objects created by this SystemPropertyChangesBuilder.
- Returns:
- A SystemPropertyChangesBuilder ready for use.
 
 
- 
 
-