On 15.12.23 18:01, David Hoffer wrote:
Is it possible to configure maven-checkstyle-plugin to use one of the
project's modules as the source of the checkstyle XML file?

E.g. I have the plugin configured like this:

<plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-checkstyle-plugin</artifactId>
     <version>${maven-checkstyle-plugin.version}</version>
     <dependencies>
         <dependency>
             <groupId>com.puppycrawl.tools</groupId>
             <artifactId>checkstyle</artifactId>
             <version>10.12.3</version>
         </dependency>
         <dependency>
             <groupId>com.bs.arm.a2dl</groupId>
             <artifactId>a2dl-build-tools</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
     <configuration>
         <configLocation>a2dl/google_checks.xml</configLocation>
         <consoleOutput>true</consoleOutput>
         <failsOnError>true</failsOnError>
         <linkXRef>false</linkXRef>
     </configuration>
     <executions>
         <execution>
             <id>verify-checkstyle</id>
             <phase>verify</phase>
             <goals>
                 <goal>check</goal>
             </goals>
         </execution>
     </executions>
</plugin>


The problem is the plugin is looking in my .m2 folder or Maven proxy server
for this dependency.

  <dependency>
             <groupId>com.bs.arm.a2dl</groupId>
             <artifactId>a2dl-build-tools</artifactId>
             <version>${project.version}</version>
  </dependency>

But it doesn't exist there yet as its a module of my/this project so its
one of the modules in the Maven build reactor.  Is it possible to configure
the plugin to use the project modules for this?

-Dave



I would suggest to check the documentation:

https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html


Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to