Package org.codehaus.mojo.properties
Class ReadPropertiesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.properties.AbstractPropertiesMojo
org.codehaus.mojo.properties.ReadPropertiesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="read-project-properties",
defaultPhase=NONE,
threadSafe=true)
public class ReadPropertiesMojo
extends AbstractPropertiesMojo
The read-project-properties goal reads property files and URLs and stores the properties as project properties. It
serves as an alternate to specifying properties in pom.xml. It is especially useful when making properties defined in
a runtime resource available at build time.
- Since:
- 1.0.0
- Author:
- Zarar Siddiqi, Krystian Nowak
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionReadPropertiesMojo(List<PropertiesManager> propertiesManagers) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()org.apache.maven.project.MavenProjectFor test access.voidvoidDefault scope for test access.voidsetUseDefaultValues(boolean useDefaultValues) Methods inherited from class org.codehaus.mojo.properties.AbstractPropertiesMojo
getPropertiesManagerMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
ReadPropertiesMojo
Default constructor- Parameters:
propertiesManagers- list of properties managers
-
-
Method Details
-
setFiles
- Parameters:
files- The files to set for tests.
-
setUrls
Default scope for test access.- Parameters:
urls- The URLs to set for tests.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
setUseDefaultValues
public void setUseDefaultValues(boolean useDefaultValues) - Parameters:
useDefaultValues- set totrueif default values need to be processed within property placeholders
-
getProject
public org.apache.maven.project.MavenProject getProject()For test access.- Returns:
- The test project
-