Extract Maven Dependency Version as Property
Problem: You got a lot of <version> tags in your Maven pom.xml that you want to centralize in <properties> section. Solution: Use an editor with greedy RegEx functionality like Notepad++ 5.9+ to find and replace: Find: (<dependency>\s+<groupId>)(.+)(</groupId>\s+<artifactId>)(.+)(</artifactId>\s+<version>)([^\$]+?)(</version>[\s\S]*?\s+</dependency>) Replace: \1\2\3\4\5${\4.version}\7\n<\4.version>\6</\4.version> This puts property in line under the dependency to be cut and pasted. The property is […]