diff --git a/pmd-xml/pom.xml b/pmd-xml/pom.xml index 1d19200b86..676ba39759 100644 --- a/pmd-xml/pom.xml +++ b/pmd-xml/pom.xml @@ -45,6 +45,28 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + + + antlr-cleanup + generate-sources + + run + + + + + + + + + + + + diff --git a/pmd-xml/src/main/antlr4/net/sourceforge/pmd/lang/xml/antlr4/XMLLexer.g4 b/pmd-xml/src/main/antlr4/net/sourceforge/pmd/lang/xml/ast/XMLLexer.g4 similarity index 100% rename from pmd-xml/src/main/antlr4/net/sourceforge/pmd/lang/xml/antlr4/XMLLexer.g4 rename to pmd-xml/src/main/antlr4/net/sourceforge/pmd/lang/xml/ast/XMLLexer.g4 diff --git a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/antlr4/XMLLexer.java b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/antlr4/XMLLexer.java new file mode 100644 index 0000000000..2425c51b9f --- /dev/null +++ b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/antlr4/XMLLexer.java @@ -0,0 +1,17 @@ +package net.sourceforge.pmd.lang.xml.antlr4; + +import org.antlr.v4.runtime.CharStream; + +/** + * Backwards compatible bridge. The XMLLexer was moved to align it with other PMD modules. + * This class will be removed in PMD 8.0.0. + * Use {@link net.sourceforge.pmd.lang.xml.ast.XMLLexer} directly instead. + * + * @deprecated + */ +@Deprecated +public class XMLLexer extends net.sourceforge.pmd.lang.xml.ast.XMLLexer { + public XMLLexer(CharStream input) { + super(input); + } +} diff --git a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/cpd/XmlCpdLexer.java b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/cpd/XmlCpdLexer.java index 62b077ab4b..bf52b3d559 100644 --- a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/cpd/XmlCpdLexer.java +++ b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/cpd/XmlCpdLexer.java @@ -8,7 +8,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Lexer; import net.sourceforge.pmd.cpd.impl.AntlrCpdLexer; -import net.sourceforge.pmd.lang.xml.antlr4.XMLLexer; +import net.sourceforge.pmd.lang.xml.ast.XMLLexer; /** *

Note: This class has been called XmlTokenizer in PMD 6

.