diff --git a/antlr4-maven-plugin/pom.xml b/antlr4-maven-plugin/pom.xml
index 85a83c269..84959b7cb 100644
--- a/antlr4-maven-plugin/pom.xml
+++ b/antlr4-maven-plugin/pom.xml
@@ -194,20 +194,20 @@
org.apache.mavenmaven-plugin-api
- 2.0
+ 3.0.4compileorg.apache.mavenmaven-project
- 2.0
+ 2.2.1org.codehaus.plexusplexus-compiler-api
- 1.8.6
+ 2.0
+ true
+
+
+
+ mojo-descriptor
+
+ descriptor
+
+
+
+ help-goal
+
+ helpmojo
+
+
+
+
+
org.apache.maven.pluginsmaven-site-plugin
- 3.0
+ 3.2org.apache.maven.pluginsmaven-project-info-reports-plugin
- 2.4
+ 2.6false
@@ -288,7 +319,7 @@
org.apache.maven.pluginsmaven-source-plugin
- 2.1.2
+ 2.2.1attach-sources
@@ -299,6 +330,20 @@
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.9
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
diff --git a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
index 1172ac798..49fb58f02 100644
--- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
+++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
@@ -55,7 +55,7 @@ public class Antlr4ErrorLog implements ANTLRToolListener {
/**
* Sends an informational message to the Maven log sink.
- * @param s The message to send to Maven
+ * @param message The message to send to Maven
*/
@Override
public void info(String message) {
diff --git a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
index a820a85b5..f0bbb8998 100644
--- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
+++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
@@ -43,6 +43,10 @@ import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
@@ -67,15 +71,14 @@ import java.util.Set;
* Goal that picks up all the ANTLR grammars in a project and moves those that
* are required for generation of the compilable sources into the location
* that we use to compile them, such as target/generated-sources/antlr4 ...
- *
- * @goal antlr
- *
- * @phase process-sources
- * @requiresDependencyResolution compile
- * @requiresProject true
*
* @author Jim Idle
*/
+@Mojo(
+ name = "antlr",
+ defaultPhase = LifecyclePhase.PROCESS_SOURCES,
+ requiresDependencyResolution = ResolutionScope.COMPILE,
+ requiresProject = true)
public class Antlr4Mojo
extends AbstractMojo {
@@ -86,60 +89,52 @@ public class Antlr4Mojo
* If set to true, then after the tool has processed an input grammar file
* it will report variaous statistics about the parser, such as information
* on cyclic DFAs, which rules may use backtracking, and so on.
- *
- * @parameter default-value="false"
*/
+ @Parameter(defaultValue = "false")
protected boolean report;
/**
* If set to true, then the ANTLR tool will print a version of the input
* grammar which is devoid of any actions that may be present in the input file.
- *
- * @parameter default-value="false"
*/
+ @Parameter(defaultValue = "false")
protected boolean printGrammar;
/**
* If set to true, then the code generated by the ANTLR code generator will
* be set to debug mode. This means that when run, the code will 'hang' and
* wait for a debug connection on a TCP port (49100 by default).
- *
- * @parameter default-value="false"
*/
+ @Parameter(defaultValue = "false")
protected boolean debug;
/**
* If set to true, then then the generated parser will compute and report on
* profile information at runtime.
- *
- * @parameter default-value="false"
*/
+ @Parameter(defaultValue = "false")
protected boolean profile;
/**
* If set to true then the ANTLR tool will generate a description of the atn
* for each rule in Dot format
- *
- * @parameter default-value="false"
*/
+ @Parameter(defaultValue = "false")
protected boolean atn;
/**
* If set to true, the generated parser code will log rule entry and exit points
* to stdout as an aid to debugging.
- *
- * @parameter default-value="false"
*/
+ @Parameter(defaultValue = "false")
protected boolean trace;
/**
* If this parameter is set, it indicates that any warning or error messages returned
* by ANLTR, shoould be formatted in the specified way. Currently, ANTLR suports the
* built-in formats of antlr, gnu and vs2005.
- *
- * @parameter default-value="antlr"
*/
+ @Parameter(defaultValue = "antlr")
protected String messageFormat;
/**
* If this parameter is set to true, then ANTLR will report all sorts of things
* about what it is doing such as the names of files and the version of ANTLR and so on.
- *
- * @parameter default-value="true"
*/
+ @Parameter(defaultValue = "true")
protected boolean verbose;
protected boolean verbose_dfa;
@@ -151,9 +146,8 @@ public class Antlr4Mojo
/**
* The number of alts, beyond which ANTLR will not generate a switch statement
* for the DFA.
- *
- * @parameter default-value="300"
*/
+ @Parameter(defaultValue = "300")
private int maxSwitchCaseLabels;
/**
@@ -177,50 +171,41 @@ public class Antlr4Mojo
* this version of the plugin looks for the directory antlr4 and not the directory
* antlr, so as to avoid clashes and confusion for projects that use both v3 and v4 grammars
* such as ANTLR itself.
- *
- * @parameter
*/
+ @Parameter
protected Set includes = new HashSet();
/**
* Provides an explicit list of any grammars that should be excluded from
* the generate phase of the plugin. Files listed here will not be sent for
* processing by the ANTLR tool.
- *
- * @parameter
*/
+ @Parameter
protected Set excludes = new HashSet();
/**
- * @parameter expression="${project}"
- * @required
- * @readonly
*/
+ @Parameter(property = "project", required = true, readonly = true)
protected MavenProject project;
/**
* Specifies the Antlr directory containing grammar files. For
* antlr version 4.x we default this to a directory in the tree
* called antlr4 because the antlr3 directory is occupied by version
* 3.x grammars.
- *
- * @parameter default-value="${basedir}/src/main/antlr4"
- * @required
*/
+ @Parameter(defaultValue = "${basedir}/src/main/antlr4", required = true)
private File sourceDirectory;
/**
* Location for generated Java files. For antlr version 4.x we default
* this to a directory in the tree called antlr4 because the antlr
* directory is occupied by version 2.x grammars.
- *
- * @parameter default-value="${project.build.directory}/generated-sources/antlr4"
- * @required
*/
+ @Parameter(defaultValue = "${project.build.directory}/generated-sources/antlr4", required = true)
private File outputDirectory;
/**
* Location for imported token files, e.g. .tokens and imported grammars.
* Note that ANTLR will not try to process grammars that it finds to be imported
* into other grammars (in the same processing session).
- *
- * @parameter default-value="${basedir}/src/main/antlr4/imports"
*/
+ @Parameter(defaultValue = "${basedir}/src/main/antlr4/imports")
private File libDirectory;
public File getSourceDirectory() {
@@ -481,7 +466,7 @@ public class Antlr4Mojo
throws TokenStreamException, RecognitionException, IOException, InclusionScanException {
// Which files under the source set should we be looking for as grammar files
//
- SourceMapping mapping = new SuffixMapping("g4", Collections.EMPTY_SET);
+ SourceMapping mapping = new SuffixMapping("g4", Collections.emptySet());
// What are the sets of includes (defaulted or otherwise).
//
diff --git a/runtime/Java/pom.xml b/runtime/Java/pom.xml
index fae2d6b1d..5139a0652 100644
--- a/runtime/Java/pom.xml
+++ b/runtime/Java/pom.xml
@@ -15,12 +15,6 @@
ANTLR 4 Runtime
-
- org.antlr
- ST4
- 4.0.4
- compile
- org.abego.treelayoutorg.abego.treelayout.core
@@ -37,7 +31,7 @@
maven-compiler-plugin
- 2.3.2
+ 2.5.11.6
@@ -49,6 +43,34 @@
-Xlint:-serial
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.9
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java b/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java
index 21ae22656..afade609b 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java
@@ -31,6 +31,7 @@ package org.antlr.v4.runtime.misc;
import java.util.Arrays;
import java.util.Collection;
+import java.util.List;
/**
*
@@ -191,14 +192,14 @@ public class IntegerList {
/**
* Compares the specified object with this list for equality. Returns
- * {@code true} if and only if the specified object is also an {@code IntegerList},
+ * {@code true} if and only if the specified object is also an {@link IntegerList},
* both lists have the same size, and all corresponding pairs of elements in
* the two lists are equal. In other words, two lists are defined to be
* equal if they contain the same elements in the same order.
*
* This implementation first checks if the specified object is this
* list. If so, it returns {@code true}; if not, it checks if the
- * specified object is an {@code IntegerList}. If not, it returns {@code false};
+ * specified object is an {@link IntegerList}. If not, it returns {@code false};
* if so, it checks the size of both lists. If the lists are not the same size,
* it returns {@code false}; otherwise it iterates over both lists, comparing
* corresponding pairs of elements. If any comparison returns {@code false},
@@ -233,8 +234,8 @@ public class IntegerList {
/**
* Returns the hash code value for this list.
- *
- *
This implementation uses exactly the code that is used to define the
+ *
+ * This implementation uses exactly the code that is used to define the
* list hash function in the documentation for the {@link List#hashCode}
* method.
*
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java
index 7baa1650e..ce6e90edd 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java
@@ -110,7 +110,7 @@ public class ParseTreeVisitor {
*
* @param aggregate The previous aggregate value. In the default
* implementation, the aggregate value is initialized to
- * {@link #defaultValue}, which is passed as the {@code aggregate} argument
+ * {@link #defaultResult}, which is passed as the {@code aggregate} argument
* to this method after the first child node is visited.
* @param nextResult The result of the immediately preceeding call to visit
* a child node.
@@ -126,7 +126,7 @@ public class ParseTreeVisitor {
* {@link #visitChildren}. This method is first called before the first
* child is visited; at that point {@code currentResult} will be the initial
* value (in the default implementation, the initial value is returned by a
- * call to {@link #defaultValue}.
+ * call to {@link #defaultResult}.
*
* The default implementation always returns {@code true}, indicating that
* {@code visitChildren} should only return after all children are visited.
diff --git a/tool/pom.xml b/tool/pom.xml
index ce5937bf5..811d48fd9 100644
--- a/tool/pom.xml
+++ b/tool/pom.xml
@@ -17,7 +17,7 @@
junitjunit
- 4.10
+ 4.11test
@@ -73,16 +73,44 @@
maven-compiler-plugin
- 2.3.2
+ 2.5.11.6
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.9
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
maven-surefire-plugin
- 2.12
+ 2.12.4
diff --git a/tool/src/org/antlr/v4/Tool.java b/tool/src/org/antlr/v4/Tool.java
index 083a66bbf..26b8307ed 100644
--- a/tool/src/org/antlr/v4/Tool.java
+++ b/tool/src/org/antlr/v4/Tool.java
@@ -724,7 +724,6 @@ public class Tool {
* given relative to the input directory.
*
* @param fileNameWithPath path to input source
- * @return
*/
public File getOutputDirectory(String fileNameWithPath) {
File outputDir;