Add custom ANTLR template to avoid Maven Replacer plugin.

Closes #3285
This commit is contained in:
Mark Paluch 2023-12-28 10:11:37 +01:00
parent 8eee9c52f9
commit 9c578632f2
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
3 changed files with 1041 additions and 23 deletions

File diff suppressed because it is too large Load Diff

View File

@ -336,29 +336,6 @@
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<basedir>${project.build.directory}/generated-sources</basedir>
<includes>
<include>antlr4/**/*.java</include>
</includes>
<variableTokenValueMap>
public class=class,public interface=interface
</variableTokenValueMap>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>

View File

@ -0,0 +1,35 @@
/*
* Copyright 2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jpa.repository.query;
import static org.assertj.core.api.Assertions.*;
import org.junit.jupiter.api.Test;
/**
* Unit tests to verify that our ANTLR customizations are in place.
*
* @author Mark Paluch
*/
class HqlParserUnitTests {
@Test // GH-3282
void shouldConsiderVisibility() {
assertThat(HqlParser.class).isPackagePrivate();
assertThat(HqlListener.class).isPackagePrivate();
}
}