Author of the maven-jaxb2-plugin
as well as jaxb2-basics
here.
My recommendation would be to add your dependency as plugin
into configuration rather that as dependency
to the maven plugin.
See this test project:
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<configuration>
<extension>true</extension>
<args>
<arg>-Xannotate</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-annotate</artifactId>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-test-annox-annotations</artifactId>
</plugin>
</plugins>
</configuration>
</plugin>
</plugins>
I believe this to be better than dependencies
of the Maven plugin.
First, I think the normal repo will used for the artifact resolution in this case.
Next, at least in the times of Maven 2.x, Maven created just one instance of each maven plugin. So the first one in the build order defines the dependencies/classpath of the plugin. Providing the dependency artifact in the configuration does not have this problem.