fix link in javadoc,
update spotbugs,
unify compiler/javadoc plugins set up

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/jaxb-ri/codemodel/pom.xml b/jaxb-ri/codemodel/pom.xml
index 1554aa7..1cb1d85 100644
--- a/jaxb-ri/codemodel/pom.xml
+++ b/jaxb-ri/codemodel/pom.xml
@@ -62,15 +62,22 @@
         <spotbugs.exclude/>
         <spotbugs.skip>false</spotbugs.skip>
         <spotbugs.threshold>High</spotbugs.threshold>
-        <spotbugs.version>4.5.3.0</spotbugs.version>
+        <spotbugs.version>4.6.0.0</spotbugs.version>
+
+        <maven.compiler.release>11</maven.compiler.release>
+        <maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
 
         <!-- exclude big groups from the Xlint -->
         <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
         <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
         <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
-        <warn.limit>150000</warn.limit>
+        <warn.limit>150</warn.limit>
         <!-- too many to fix -->
         <jdoc.doclint>all,-missing</jdoc.doclint>
+        <!-- not interested in warnings from tests (yet) -->
+        <comp.test.xlint>-Xlint:none</comp.test.xlint>
+        <comp.test.xdoclint>-Xdoclint:none</comp.test.xdoclint>
+        <warn.test.limit>10</warn.test.limit>
     </properties>
 
     <modules>
@@ -119,14 +126,13 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>3.3.0</version>
+                    <version>3.3.2</version>
                     <configuration>
                         <archive>
                             <manifest>
                                 <addDefaultEntries>false</addDefaultEntries>
                             </manifest>
                         </archive>
-                        <release>11</release>
                         <notimestamp>true</notimestamp>
                         <doclint>${jdoc.doclint}</doclint>
                         <quiet>true</quiet>
@@ -290,18 +296,37 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <release>11</release>
-                    <compilerArgs combine.children="append">
-                        <arg>${comp.xlint}</arg>
-                        <arg>${comp.xdoclint}</arg>
-                        <arg>-Xmaxwarns</arg>
-                        <arg>${warn.limit}</arg>
-                        <arg>-Xmaxerrs</arg>
-                        <arg>${warn.limit}</arg>
-                    </compilerArgs>
                     <showDeprecation>true</showDeprecation>
                     <showWarnings>true</showWarnings>
                 </configuration>
+                <executions>
+                    <execution>
+                        <id>default-compile</id>
+                        <configuration>
+                            <compilerArgs combine.children="append">
+                                <arg>${comp.xlint}</arg>
+                                <arg>${comp.xdoclint}</arg>
+                                <arg>-Xmaxwarns</arg>
+                                <arg>${warn.limit}</arg>
+                                <arg>-Xmaxerrs</arg>
+                                <arg>${warn.limit}</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>default-testCompile</id>
+                        <configuration>
+                            <compilerArgs combine.children="append">
+                                <arg>${comp.test.xlint}</arg>
+                                <arg>${comp.test.xdoclint}</arg>
+                                <arg>-Xmaxwarns</arg>
+                                <arg>${warn.test.limit}</arg>
+                                <arg>-Xmaxerrs</arg>
+                                <arg>${warn.test.limit}</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
diff --git a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java
index 6f59c42..9c6ebe3 100644
--- a/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java
+++ b/jaxb-ri/core/src/main/java/org/glassfish/jaxb/core/v2/model/core/RegistryInfo.java
@@ -22,8 +22,6 @@
  * {@link org.glassfish.jaxb.core.v2.model.impl.ModelBuilderI}.
  *
  * @author Kohsuke Kawaguchi
- * @param <T>
- * @param <C>
  */
 public interface RegistryInfo<T,C> {
     /**
diff --git a/jaxb-ri/external/pom.xml b/jaxb-ri/external/pom.xml
index 8e576c1..e7279ee 100644
--- a/jaxb-ri/external/pom.xml
+++ b/jaxb-ri/external/pom.xml
@@ -64,14 +64,22 @@
         <spotbugs.exclude/>
         <spotbugs.skip>false</spotbugs.skip>
         <spotbugs.threshold>High</spotbugs.threshold>
-        <spotbugs.version>4.5.3.0</spotbugs.version>
+        <spotbugs.version>4.6.0.0</spotbugs.version>
+
+        <maven.compiler.release>11</maven.compiler.release>
+        <maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
+
         <!-- exclude big groups from the Xlint -->
         <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
         <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
         <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
-        <warn.limit>150000</warn.limit>
+        <warn.limit>150</warn.limit>
         <!-- too many to fix -->
-        <jdoc.doclint>all,-missing</jdoc.doclint>
+        <jdoc.doclint>-missing</jdoc.doclint>
+        <!-- not interested in warnings from tests (yet) -->
+        <comp.test.xlint>-Xlint:none</comp.test.xlint>
+        <comp.test.xdoclint>-Xdoclint:none</comp.test.xdoclint>
+        <warn.test.limit>10</warn.test.limit>
     </properties>
 
     <modules>
@@ -143,18 +151,6 @@
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
                     <version>3.3.2</version>
-                    <configuration>
-                        <archive>
-                            <manifest>
-                                <addDefaultEntries>false</addDefaultEntries>
-                            </manifest>
-                        </archive>
-                        <release>11</release>
-                        <notimestamp>true</notimestamp>
-                        <!-- too many to fix -->
-                        <doclint>-missing</doclint>
-                        <quiet>true</quiet>
-                    </configuration>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
@@ -314,18 +310,37 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <release>11</release>
-                    <compilerArgs combine.children="append">
-                        <arg>${comp.xlint}</arg>
-                        <arg>${comp.xdoclint}</arg>
-                        <arg>-Xmaxwarns</arg>
-                        <arg>${warn.limit}</arg>
-                        <arg>-Xmaxerrs</arg>
-                        <arg>${warn.limit}</arg>
-                    </compilerArgs>
                     <showDeprecation>true</showDeprecation>
                     <showWarnings>true</showWarnings>
                 </configuration>
+                <executions>
+                    <execution>
+                        <id>default-compile</id>
+                        <configuration>
+                            <compilerArgs combine.children="append">
+                                <arg>${comp.xlint}</arg>
+                                <arg>${comp.xdoclint}</arg>
+                                <arg>-Xmaxwarns</arg>
+                                <arg>${warn.limit}</arg>
+                                <arg>-Xmaxerrs</arg>
+                                <arg>${warn.limit}</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>default-testCompile</id>
+                        <configuration>
+                            <compilerArgs combine.children="append">
+                                <arg>${comp.test.xlint}</arg>
+                                <arg>${comp.test.xdoclint}</arg>
+                                <arg>-Xmaxwarns</arg>
+                                <arg>${warn.test.limit}</arg>
+                                <arg>-Xmaxerrs</arg>
+                                <arg>${warn.test.limit}</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
@@ -384,6 +399,21 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addDefaultEntries>false</addDefaultEntries>
+                        </manifest>
+                    </archive>
+                    <notimestamp>true</notimestamp>
+                    <!-- too many to fix -->
+                    <doclint>${jdoc.doclint}</doclint>
+                    <quiet>true</quiet>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/jaxb-ri/pom.xml b/jaxb-ri/pom.xml
index db36b8a..b4a69f5 100644
--- a/jaxb-ri/pom.xml
+++ b/jaxb-ri/pom.xml
@@ -81,10 +81,10 @@
         <spotbugs.exclude/>
         <spotbugs.skip>false</spotbugs.skip>
         <spotbugs.threshold>Low</spotbugs.threshold>
-        <spotbugs.version>4.5.3.0</spotbugs.version>
+        <spotbugs.version>4.6.0.0</spotbugs.version>
 
         <maven.compiler.release>11</maven.compiler.release>
-        <maven.compiler.testRelease>11</maven.compiler.testRelease>
+        <maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
 
         <junit.version>4.13.2</junit.version>
 
@@ -102,7 +102,7 @@
         <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
         <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
         <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
-        <warn.limit>150000</warn.limit>
+        <warn.limit>150</warn.limit>
         <!-- too many to fix -->
         <jdoc.doclint>all,-missing</jdoc.doclint>
         <!-- not interested in warnings from tests (yet) -->
@@ -554,6 +554,7 @@
                         </manifest>
                     </archive>
                     <notimestamp>true</notimestamp>
+                    <failOnWarnings>true</failOnWarnings>
                 </configuration>
             </plugin>
         </plugins>
@@ -660,15 +661,6 @@
                                 <goals>
                                     <goal>report</goal>
                                 </goals>
-                                <!-- configuration should be removed once this bug https://github.com/jacoco/jacoco/issues/407 is fixed -->
-                                <configuration>
-                                    <excludes>
-                                        <!-- istack-runtime -->
-                                        <exclude>com/sun/istack/logging/StackHelper.class</exclude>
-                                        <!-- istack-tools -->
-                                        <exclude>com/sun/istack/tools/Utils.class</exclude>
-                                    </excludes>
-                                </configuration>
                             </execution>
                         </executions>
                     </plugin>
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/SchemaTypeTransducer.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/SchemaTypeTransducer.java
index 3165f82..37107b6 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/SchemaTypeTransducer.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/v2/runtime/SchemaTypeTransducer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -26,7 +26,8 @@
  * This transducer is used to implement the semantics of {@link XmlSchemaType} annotation.
  *
  *
- * @see XMLSerializer#schemaType
+ * @see XMLSerializer#getSchemaType()
+ * @see XMLSerializer#setSchemaType(QName)
  * @author Kohsuke Kawaguchi
  */
 public class SchemaTypeTransducer<V> extends FilterTransducer<V> {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java
index 1dcf100..f98b29c 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractField.java
@@ -396,7 +396,7 @@
     }
 
     /**
-     * Case from {@link #exposedType} to {@link #implType} if necessary.
+     * Cast from {@code exposedType} to {@code implType} if necessary.
      */
     protected final JExpression castToImplType( JExpression exp ) {
         if(implType==exposedType)
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRendererFactory.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRendererFactory.java
index 4e10992..7749a3d 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRendererFactory.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/FieldRendererFactory.java
@@ -12,6 +12,7 @@
 
 import com.sun.tools.xjc.Options;
 import com.sun.codemodel.JClass;
+import com.sun.tools.xjc.Plugin;
 
 /**
  * Factory for {@link FieldRenderer}.
@@ -23,7 +24,7 @@
  * used.
  *
  * <p>
- * See {@link Options#fieldRendererFactory}
+ * See {@link Options#setFieldRendererFactory(FieldRendererFactory, Plugin)}
  *
  * <p>
  * To be more precise, since {@link FieldRenderer} is just a strategy pattern
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/package-info.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/package-info.java
index 1d4b65b..7c7f2ee 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/package-info.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -9,7 +9,7 @@
  */
 
 /**
- * Implementation of the {@link org.glassfish.jaxb.core.v2.model.core} package for XJC.
+ * Implementation of the {@code org.glassfish.jaxb.core.v2.model.core} package for XJC.
  *
  * <p>
  * This model is the recipes for the code generation.
@@ -19,7 +19,7 @@
  *
  * <p>
  * Most of the classes/interfaces in this package has one-to-one relationship
- * with the parameterized core model in the {@link org.glassfish.jaxb.core.v2.model.core} package.
+ * with the parameterized core model in the {@code org.glassfish.jaxb.core.v2.model.core} package.
  * Refer to the core model for better documentation.
  *
  * <p>
diff --git a/jaxb-ri/xsom/pom.xml b/jaxb-ri/xsom/pom.xml
index 1bf5ba0..97ebb32 100644
--- a/jaxb-ri/xsom/pom.xml
+++ b/jaxb-ri/xsom/pom.xml
@@ -64,10 +64,10 @@
         <spotbugs.exclude>${project.basedir}/exclude-xsom.xml</spotbugs.exclude>
         <spotbugs.skip>false</spotbugs.skip>
         <spotbugs.threshold>Low</spotbugs.threshold>
-        <spotbugs.version>4.5.3.0</spotbugs.version>
+        <spotbugs.version>4.6.0.0</spotbugs.version>
 
         <maven.compiler.release>11</maven.compiler.release>
-        <maven.compiler.testRelease>11</maven.compiler.testRelease>
+        <maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
 
         <relaxng.version>${project.version}</relaxng.version>
         <junit.version>4.13.2</junit.version>
@@ -75,7 +75,7 @@
         <comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
         <!-- -Xdoclint:-missing does not seem to work properly on the infra -->
         <comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
-        <warn.limit>150000</warn.limit>
+        <warn.limit>150</warn.limit>
         <!-- too many to fix -->
         <jdoc.doclint>all,-missing</jdoc.doclint>
         <!-- not interested in warnings from tests (yet) -->