File tree 3 files changed +4
-44
lines changed
main/java/org/codehaus/mojo/buildhelper 3 files changed +4
-44
lines changed Original file line number Diff line number Diff line change 35
35
*
36
36
* @author pgier
37
37
* @since 1.3
38
+ * @deprecated Maven since version {@code 3.0.4} has such property build in:
39
+ * <a href="https://issues.apache.org/jira/browse/MNG-4112">MNG-4112</a>.
40
+ * So goal can be removed.
38
41
*/
42
+ @ Deprecated
39
43
@ Mojo (name = "maven-version" , defaultPhase = LifecyclePhase .VALIDATE , threadSafe = true )
40
44
public class MavenVersionMojo extends AbstractDefinePropertyMojo {
41
45
Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ Build Helper Maven Plugin
55
55
56
56
* {{{./attach-artifact-mojo.html}build-helper:attach-artifact}} Attach additional artifacts to be installed and deployed.
57
57
58
- * {{{./maven-version-mojo.html}build-helper:maven-version}} Set a property containing the current version of maven.
59
-
60
58
* {{{./regex-property-mojo.html}build-helper:regex-property}} Sets a property by applying a regex replacement rule to a supplied value.
61
59
62
60
* {{{./regex-properties-mojo.html}build-helper:regex-properties}} Sets a property by applying a regex replacement rule to a supplied value.
Original file line number Diff line number Diff line change @@ -191,48 +191,6 @@ Usage
191
191
</project>
192
192
-------------------
193
193
194
- * Set the current version of Maven in a property
195
-
196
- This can be used to keep track of what version of Maven was used to build a particular artifact.
197
- For example, the following POM sets the property and then uses the property to save the Maven version
198
- to the project JAR's manifest.
199
-
200
- -------------------
201
- <project>
202
- ...
203
- <build>
204
- <plugins>
205
- <plugin>
206
- <groupId>org.codehaus.mojo</groupId>
207
- <artifactId>build-helper-maven-plugin</artifactId>
208
- <version>${project.version}</version>
209
- <executions>
210
- <execution>
211
- <id>maven-version</id>
212
- <goals>
213
- <goal>maven-version</goal>
214
- </goals>
215
- </execution>
216
- </executions>
217
- </plugin>
218
- <plugin>
219
- <groupId>org.apache.maven.plugins</groupId>
220
- <artifactId>maven-jar-plugin</artifactId>
221
- <version>3.0.2</version>
222
- <configuration>
223
- <archive>
224
- <manifestEntries>
225
- <Maven-Version>${maven.version}</Maven-Version>
226
- </manifestEntries>
227
- </archive>
228
- </configuration>
229
- </plugin>
230
- </plugins>
231
- </build>
232
- ...
233
- </project>
234
- -------------------
235
-
236
194
* Access the parsed components of a project version
237
195
238
196
The <<<parse-version>>> goal can be used to access the component parts of a version string. For example,
You can’t perform that action at this time.
0 commit comments