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
ConstructorDescriptionReadPropertiesMojo
(List<PropertiesManager> propertiesManagers) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
org.apache.maven.project.MavenProject
For test access.void
void
Default scope for test access.void
setUseDefaultValues
(boolean useDefaultValues) Methods inherited from class org.codehaus.mojo.properties.AbstractPropertiesMojo
getPropertiesManager
Methods 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.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
setUseDefaultValues
public void setUseDefaultValues(boolean useDefaultValues) - Parameters:
useDefaultValues
- set totrue
if default values need to be processed within property placeholders
-
getProject
public org.apache.maven.project.MavenProject getProject()For test access.- Returns:
- The test project
-