|
87 | 87 | <asciidoctor-maven-plugin.version>2.2.4</asciidoctor-maven-plugin.version> |
88 | 88 | <docker-maven-plugin.version>0.43.4</docker-maven-plugin.version> |
89 | 89 | <exam-maven-plugin.version>4.13.5</exam-maven-plugin.version> |
| 90 | + <gmavenplus-plugin.version>3.0.2</gmavenplus-plugin.version> |
90 | 91 | <!-- `surefire.version` property used in `apache.org:apache`: --> |
91 | 92 | <surefire.version>3.5.0</surefire.version> |
92 | 93 |
|
|
104 | 105 | <commons-lang3.version>3.17.0</commons-lang3.version> |
105 | 106 | <commons-logging.version>1.3.4</commons-logging.version> |
106 | 107 | <disruptor.version>4.0.0</disruptor.version> |
107 | | - <elasticsearch.version>7.17.23</elasticsearch.version> |
| 108 | + <elasticsearch.version>7.17.24</elasticsearch.version> |
108 | 109 | <embedded-ldap.version>0.9.0</embedded-ldap.version> |
109 | 110 | <felix.version>7.0.5</felix.version> |
110 | 111 | <flapdoodle-embed.version>4.13.1</flapdoodle-embed.version> |
|
139 | 140 | <mongodb.version>5.1.3</mongodb.version> |
140 | 141 | <nashorn.version>15.4</nashorn.version> |
141 | 142 | <opentest4j.version>1.3.0</opentest4j.version> |
142 | | - <org.eclipse.osgi.version>3.20.0</org.eclipse.osgi.version> |
| 143 | + <org.eclipse.osgi.version>3.21.0</org.eclipse.osgi.version> |
143 | 144 | <oro.version>2.0.8</oro.version> |
144 | 145 | <!-- The OSGi API version MUST always be the MINIMUM version Log4j supports --> |
145 | 146 | <osgi.framework.version>1.10.0</osgi.framework.version> |
|
148 | 149 | <plexus-utils.version>3.5.1</plexus-utils.version> |
149 | 150 | <slf4j2.version>2.0.15</slf4j2.version> |
150 | 151 | <system-stubs.version>2.1.6</system-stubs.version> |
151 | | - <tomcat-juli.version>10.1.28</tomcat-juli.version> |
| 152 | + <tomcat-juli.version>10.1.29</tomcat-juli.version> |
152 | 153 | <velocity.version>1.7</velocity.version> |
153 | 154 | <wiremock.version>2.35.2</wiremock.version> |
154 | 155 | <xmlunit.version>2.10.0</xmlunit.version> |
|
838 | 839 | </executions> |
839 | 840 | </plugin> |
840 | 841 |
|
| 842 | + <plugin> |
| 843 | + <groupId>org.codehaus.gmavenplus</groupId> |
| 844 | + <artifactId>gmavenplus-plugin</artifactId> |
| 845 | + <version>${gmavenplus-plugin.version}</version> |
| 846 | + <dependencies> |
| 847 | + <dependency> |
| 848 | + <groupId>org.apache.groovy</groupId> |
| 849 | + <artifactId>groovy-ant</artifactId> |
| 850 | + <version>${groovy.version}</version> |
| 851 | + <scope>runtime</scope> |
| 852 | + </dependency> |
| 853 | + <dependency> |
| 854 | + <groupId>org.apache.groovy</groupId> |
| 855 | + <artifactId>groovy</artifactId> |
| 856 | + <version>${groovy.version}</version> |
| 857 | + <scope>runtime</scope> |
| 858 | + </dependency> |
| 859 | + </dependencies> |
| 860 | + <executions> |
| 861 | + <execution> |
| 862 | + <id>ban-static-transitive</id> |
| 863 | + <goals> |
| 864 | + <goal>execute</goal> |
| 865 | + </goals> |
| 866 | + <phase>verify</phase> |
| 867 | + <configuration> |
| 868 | + <continueExecuting>false</continueExecuting> |
| 869 | + <scripts> |
| 870 | + <script><![CDATA[ |
| 871 | + import java.io.StringWriter |
| 872 | + import java.util.spi.ToolProvider |
| 873 | +
|
| 874 | + if ("jar" != project.packaging) { |
| 875 | + log.info("Skipping module descriptor check, since the project type is not `jar`.") |
| 876 | + return |
| 877 | + } |
| 878 | + String jarFile = project.build.directory + "/" + project.build.finalName + ".jar"; |
| 879 | + if (!new File(jarFile).exists()) { |
| 880 | + log.info("Skipping module descriptor check, since `" + jarFile + "` is missing.") |
| 881 | + return |
| 882 | + } |
| 883 | + StringWriter out = new StringWriter() |
| 884 | + StringWriter err = new StringWriter() |
| 885 | + ToolProvider jar = ToolProvider.findFirst("jar").orElseThrow() |
| 886 | + int result = jar.run(new PrintWriter(out), new PrintWriter(err), "-d", "-f", jarFile) |
| 887 | + if (result != 0) { |
| 888 | + throw new RuntimeException("Failed to decompile the module descriptor in `" + jarFile + "`:\n" + err) |
| 889 | + } |
| 890 | + log.debug("Module descriptor: " + out) |
| 891 | + for (String line : out.toString().split("\r?\n", -1)) { |
| 892 | + if (line.contains("static") && line.contains("transitive")) { |
| 893 | + throw new RuntimeException("The `static` and `transitive` modifiers should not be use together: " + line) |
| 894 | + } |
| 895 | + } |
| 896 | + log.info("Successfully verified module descriptor in `" + jarFile + "`.") |
| 897 | + ]]></script> |
| 898 | + </scripts> |
| 899 | + </configuration> |
| 900 | + </execution> |
| 901 | + </executions> |
| 902 | + </plugin> |
| 903 | + |
841 | 904 | </plugins> |
842 | 905 | </build> |
843 | 906 |
|
|
0 commit comments