Skip to content

Commit 3f9c48e

Browse files
committed
Remove deprecation warnings of antlr by postprocessing generated code.
1 parent ce18491 commit 3f9c48e

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

exist-core/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,26 @@ The BaseX Team. The original license statement is also included below.]]></pream
10841084
</executions>
10851085
</plugin>
10861086

1087+
<plugin>
1088+
<groupId>software.xdev</groupId>
1089+
<artifactId>find-and-replace-maven-plugin</artifactId>
1090+
<executions>
1091+
<execution>
1092+
<id>replace-underscore-with-hyphen</id>
1093+
<phase>process-sources</phase>
1094+
<goals>
1095+
<goal>file-contents</goal>
1096+
</goals>
1097+
<configuration>
1098+
<baseDir>target/generated-sources/antlr/org/exist/xquery/parser/</baseDir>
1099+
<fileMask>XQueryLexer.java</fileMask>
1100+
<findRegex>new Integer</findRegex>
1101+
<replaceValue>Integer.valueOf</replaceValue>
1102+
</configuration>
1103+
</execution>
1104+
</executions>
1105+
</plugin>
1106+
10871107
<plugin>
10881108
<artifactId>maven-compiler-plugin</artifactId>
10891109
<executions>

exist-parent/pom.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,11 @@
617617

618618
<pluginManagement>
619619
<plugins>
620+
<plugin>
621+
<groupId>software.xdev</groupId>
622+
<artifactId>find-and-replace-maven-plugin</artifactId>
623+
<version>1.0.2</version>
624+
</plugin>
620625
<plugin>
621626
<groupId>org.apache.maven.plugins</groupId>
622627
<artifactId>maven-clean-plugin</artifactId>
@@ -979,6 +984,11 @@
979984
<exclude>FDB-backport-LGPL-21-ONLY-license.xml.template.txt</exclude>
980985
<exclude>LGPL-21-license.template.txt</exclude>
981986
<exclude>LGPL-21-license.txt</exclude>
987+
<exclude>LGPL-21-license.template.txt</exclude>
988+
<exclude>**/README.md</exclude>
989+
<exclude>**/README</exclude>
990+
<exclude>**/LICENSE</exclude>
991+
<exclude>**/*.xar</exclude>
982992
</excludes>
983993
</licenseSet>
984994
</licenseSets>
@@ -1006,13 +1016,6 @@
10061016
<email>${contact.email}</email>
10071017
<url>${project.organization.url}</url>
10081018
</properties>
1009-
<excludes>
1010-
<exclude>LGPL-21-license.template.txt</exclude>
1011-
<exclude>**/README.md</exclude>
1012-
<exclude>**/README</exclude>
1013-
<exclude>**/LICENSE</exclude>
1014-
<exclude>**/*.xar</exclude>
1015-
</excludes>
10161019
<encoding>${project.build.sourceEncoding}</encoding>
10171020
</configuration>
10181021
<executions>
@@ -1041,6 +1044,7 @@
10411044
<artifactId>maven-resources-plugin</artifactId>
10421045
<configuration>
10431046
<encoding>${project.build.sourceEncoding}</encoding>
1047+
<propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
10441048
</configuration>
10451049
</plugin>
10461050
<plugin>

0 commit comments

Comments
 (0)