Skip to content

Commit 274fc8d

Browse files
committed
doc: add tip about plugin prefix setup
Signed-off-by: Maximillian Arruda <[email protected]>
1 parent 8d186bf commit 274fc8d

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

README.adoc

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,9 @@ Facilitate manipulation such as managing POM dependencies through CLI (command l
1414

1515
== How to use it
1616

17-
==== Add a dependency
18-
19-
Let's suppose that you need to add JUnit Jupiter version 5.9.2 into your POM in the test scope, you could perform the following command inside on the target maven project:
20-
21-
[source, sh]
22-
----
23-
mvn br.org.soujava:pom-editor-maven-plugin:add-dep -Dgav='org.junit.jupiter:junit-jupiter:5.9.2' -Dscope=test
24-
----
25-
26-
It's a Maven plugin then you may register the groupId into your `settings.xml` pluginGroups node :
27-
17+
[TIP]
18+
===============================
19+
In order to make easier the plugin utilization we can register the groupId into the `settings.xml` like the snipped code below:
2820
[source,xml]
2921
----
3022
<settings >
@@ -35,15 +27,30 @@ It's a Maven plugin then you may register the groupId into your `settings.xml` p
3527
<!-- snipped -->
3628
</settings>
3729
----
30+
With that, we will be able to perform the plugin by using its prefix.
31+
So, instead of to perform the plugin by the following command:
32+
[source, sh]
33+
----
34+
mvn br.org.soujava:pom-editor-maven-plugin:<GOAL>
35+
----
36+
We may perform it just providing its prefix like below:
37+
[source, sh]
38+
----
39+
mvn pom-editor:<GOAL>
40+
----
41+
In the documentation, we'll assume that you have done this configuration.
42+
===============================
3843

39-
Then you'll be able to perform the plugin by its prefix:
44+
=== Add a dependency
4045

41-
[source,sh]
46+
Let's suppose that you need to add JUnit Jupiter version 5.9.2 into your POM in the test scope, you could perform the following command inside on the target maven project:
47+
48+
[source, sh]
4249
----
4350
mvn pom-editor:add-dep -Dgav='org.junit.jupiter:junit-jupiter:5.9.2' -Dscope=test
4451
----
4552

46-
==== Confirm the changes
53+
=== Confirm the changes
4754

4855
When you perform the goal add-dep with the command below:
4956

@@ -65,7 +72,7 @@ Then, when you're done, if there's no problem with the changed POM, you could co
6572
[source,sh]
6673
$ mvn pom-editor:commit
6774

68-
==== Revert the changes
75+
=== Revert the changes
6976

7077
You could also perform the rollback goal:
7178

0 commit comments

Comments
 (0)