Sometimes need to debug third-party maven plugins. This is really simple solution that I found using Idea 11.1.
For debug this plugin we need:
1. Add plugin artifact in project dependencies section
2. Click download sources, open needed source file
3. Start debugging!
For example we has next code:
...
<plugins>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.14</version>
<configuration>
<xincludeSupported>true</xincludeSupported>
<highlightSource>true</highlightSource>
<targetDirectory>${basedir}/target/site/</targetDirectory>
<includes>index.xml</includes>
</configuration>
<executions>
</plugin>
</plugins>
...
For debug this plugin we need:
1. Add plugin artifact in project dependencies section
<dependencies>
<dependency>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.14</version>
</dependency>
</dependencies>
...
<build>
<plugins>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.14</version>
<configuration>
<xincludeSupported>true</xincludeSupported>
<highlightSource>true</highlightSource>
<targetDirectory>${basedir}/target/site/</targetDirectory>
<includes>index.xml</includes>
</configuration>
</plugin>
</plugins>
</build>
2. Click download sources, open needed source file
3. Start debugging!