Skip to content

Commit 3fb72cc

Browse files
authored
[build] Automate property replacement in pom.xml and exclude the release directory from license checks. (#4134)
1 parent 7bbfab0 commit 3fb72cc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ limitations under the License.
421421
</licenseFamilies>
422422
<excludes>
423423
<!-- Additional files like .gitignore etc.-->
424+
<!-- Release files -->
425+
<exclude>**/release/**</exclude>
424426
<exclude>**/README.md</exclude>
425427
<exclude>**/.*/**</exclude>
426428
<!-- Generated content -->
@@ -676,6 +678,16 @@ limitations under the License.
676678
<target>${maven.compiler.target}</target>
677679
</configuration>
678680
</plugin>
681+
682+
<!-- Allow modification of pom.xml properties using Maven commands. -->
683+
<plugin>
684+
<groupId>org.codehaus.mojo</groupId>
685+
<artifactId>versions-maven-plugin</artifactId>
686+
<version>2.5</version>
687+
<configuration>
688+
<generateBackupPoms>false</generateBackupPoms>
689+
</configuration>
690+
</plugin>
679691
</plugins>
680692
</build>
681693

tools/releasing/update_branch_version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ cd ${PROJECT_ROOT}
5252

5353
# change version in all pom files
5454
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${NEW_VERSION}
55+
mvn versions:set-property -Dproperty=revision -DnewVersion=${NEW_VERSION}
5556

5657
git commit -am "[release] Update version to ${NEW_VERSION}"
5758

0 commit comments

Comments
 (0)