diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
new file mode 100644
index 0000000..8c772fe
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin
+ ipcr
+ 1.0
+
+
+ ipcr-dep-a
+ jar
+
+ Dependency A
+
+ Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
+ realm while traversing the class hierarchy (see QDOX-148). This module provides a simple dependency to build up
+ the class realm of interest.
+
+
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java
new file mode 100644
index 0000000..a813ec4
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java
@@ -0,0 +1,5 @@
+package test;
+
+public class ClassA
+{
+}
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml
new file mode 100644
index 0000000..254d8d6
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin
+ ipcr
+ 1.0
+
+
+ ipcr-dep-b
+ jar
+
+ Dependency B
+
+ Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
+ realm while traversing the class hierarchy (see QDOX-148). This module provides a simple dependency to build up
+ the class realm of interest.
+
+
+
+
+ org.apache.maven.its.plugin
+ ipcr-dep-a
+ 1.0
+
+
+
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/java/test/ClassB.java b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/java/test/ClassB.java
new file mode 100644
index 0000000..e72de12
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/java/test/ClassB.java
@@ -0,0 +1,14 @@
+package test;
+
+public class ClassB
+{
+
+ /**
+ * For the test we want to trigger a linkage error when resolving ClassA. However, we want this error to occur when
+ * analyzing ClassB and not when loading ClassB itself.
+ */
+ public void triggerLazyLinkageError(ClassA param)
+ {
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties
new file mode 100644
index 0000000..0fd616a
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties
@@ -0,0 +1,5 @@
+invoker.goals.1 = clean install
+invoker.profiles.1 = setup
+
+invoker.goals.2 = clean process-classes
+invoker.profiles.2 = test
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml
new file mode 100644
index 0000000..1d9752d
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.its.plugin
+ ipcr
+ 1.0
+ pom
+
+ Aggregator
+
+ Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
+ realm while traversing the class hierarchy (see QDOX-148).
+
+
+
+
+
+ setup
+
+ dep-a
+ dep-b
+
+
+
+
+ test
+
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-plugin-plugin
+ @project.version@
+
+
+
+
+
+
+
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml
new file mode 100644
index 0000000..df1dd9e
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin
+ ipcr
+ 1.0
+
+
+ ipcr-plugin
+ maven-plugin
+
+ Test Plugin
+
+ Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
+ realm while traversing the class hierarchy (see QDOX-148). This module provides the plugin sources to scan.
+
+
+
+
+
+ org.apache.maven.its.plugin
+ ipcr-dep-b
+ 1.0
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-plugin-plugin
+
+
+ org.apache.maven.its.plugin
+ ipcr-dep-b
+ 1.0
+
+
+ org.apache.maven.its.plugin
+ ipcr-dep-a
+
+
+
+
+
+
+
+
diff --git a/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/java/test/SomeMojo.java b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/java/test/SomeMojo.java
new file mode 100644
index 0000000..f378d2b
--- /dev/null
+++ b/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/java/test/SomeMojo.java
@@ -0,0 +1,15 @@
+package test;
+
+/**
+ * This is the source class to be scanned for annotations. While scanning, QDox must not try to resolve references to
+ * other types like the super class from the plugin class realm. The plugin class realm has no relation at all to
+ * the project class path. In particular, the plugin class realm could (by incident) contain different versions of those
+ * types or could be incomplete (due to exclusions). The later case leads to NoClassDefFoundErrors, crashing the scan.
+ *
+ * @goal test
+ */
+public class SomeMojo
+ extends ClassB
+{
+
+}
diff --git a/maven-plugin-tools-java/pom.xml b/maven-plugin-tools-java/pom.xml
index 1a8a67e..c5a7b62 100644
--- a/maven-plugin-tools-java/pom.xml
+++ b/maven-plugin-tools-java/pom.xml
@@ -74,7 +74,7 @@
com.thoughtworks.qdox
qdox
- 1.6.3
+ 1.9.1