Skip to content

Commit 0fb84bc

Browse files
doc: added explanation of commit and rollback
Signed-off-by: Gian de Manincor <[email protected]>
1 parent 73d5581 commit 0fb84bc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,35 @@ mvn pom-editor:add-dep -Dgav='org.junit.jupiter:junit-jupiter:5.9.2' -Dscope=tes
4545

4646
==== Confirm the changes
4747

48+
When you perform the goal add-dep with the command below:
49+
50+
[source,sh]
51+
$ mvn pom-editor:add-dep -Dgav='junit:junit:4.13'
52+
53+
The plugin will create a backup POM file based on the target POM if such one doesn't exist.
54+
55+
[source,sh]
56+
$ tree .
57+
.
58+
├── pom.xml
59+
└── pom.xml.backup
60+
61+
You could perform multiple times the add-dep goal as you need.
62+
63+
Then, when you're done, if there's no problem with the changed POM, you could confirm the changes by performing the commit goal.
64+
65+
[source,sh]
66+
$ mvn pom-editor:commit
67+
4868
==== Revert the changes
4969

70+
You could also perform the rollback goal:
71+
72+
[source,sh]
73+
$ mvn pom-editor:rollback
74+
75+
This goal will revert the changes, replacing the changed POM file to the backup POM file.
76+
5077
== Goals
5178

5279
It covers the following goals:

0 commit comments

Comments
 (0)