inject:inject
Full name:
de.m3y.maven:inject-maven-plugin:1.7:inject
Description:
Injects properties into compiled Java code, as constant or method return value.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
compile
. - The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase:
process-classes
. - Invokes the execution of the following plugin's goal prior to executing itself:
inject
. - Executes in its own lifecycle:
process-classes
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<injections> |
Injection[] |
- |
Configures the version injection target.
Example: <injection> <value>${maven.build.timestamp}</value> <pointCut>de.m3y.maven.inject.it.ExampleInjection.getBuildTimeStamp</pointCut> <pointCuts> <pointCut>de.m3y.maven.inject.it.ExampleInjection.getBuildTimeStampAgain</pointCut> <pointCut>de.m3y.maven.inject.it.ExampleInjection.getBuildTimeStampAgainAgain</pointCut> ... </pointCuts> </injection> |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<outputDirectory> |
File |
- |
Configures the output directory of compiled Java class files.
Usually you do not need to configure this. Default: ${project.build.directory}/classes |
Parameter Details
<injections>
Configures the version injection target.
Example:
<injection> <value>${maven.build.timestamp}</value> <pointCut>de.m3y.maven.inject.it.ExampleInjection.getBuildTimeStamp</pointCut> <pointCuts> <pointCut>de.m3y.maven.inject.it.ExampleInjection.getBuildTimeStampAgain</pointCut> <pointCut>de.m3y.maven.inject.it.ExampleInjection.getBuildTimeStampAgainAgain</pointCut> ... </pointCuts> </injection>
- Type:
de.m3y.maven.inject.Injection[]
- Required:
Yes
<outputDirectory>
Configures the output directory of compiled Java class files.
Usually you do not need to configure this.
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/classes