Skip to content

Commit

Permalink
Add custom ANTLR template to avoid Maven Replacer plugin.
Browse files Browse the repository at this point in the history
Closes #3285
mp911de committed Dec 28, 2023
1 parent 8eee9c5 commit 9c57863
Showing 3 changed files with 1,041 additions and 23 deletions.
1,006 changes: 1,006 additions & 0 deletions org/antlr/v4/tool/templates/codegen/Java/Java.stg

Large diffs are not rendered by default.

23 changes: 0 additions & 23 deletions spring-data-jpa/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -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();
}
}

0 comments on commit 9c57863

Please sign in to comment.