maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Gómez <javier.go...@prefapp.es>
Subject override Checkstyle resources config
Date Mon, 20 Apr 2020 18:34:23 GMT
Hello all,

We are trying to run Checkstyle plugin over a group of resource files, located in various
directories outside standard directory layout, in project root folder,

/module1
   src/main/java
   src/main/resources
   pom.xml
/module2
   ...
/src
/DIR1
/DIR2
pom.xml

To do this, the best way we found, was configure execution of checkstyle plugin in parent
POM,
and set this directories as resources in checkstyle plugin <configuration>

       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <inherited>false</inherited>
         <configuration>
           <resources>
             <resource>
               <directory>dir1</directory>
             </resource>
             <resource>
               <directory>dir2</directory>
             </resource>
           </resources>
         </configuration>
       </plugin>


I know that the *resources* attribute is defined *readonly*, but this configuration works,
and the resources in this directories are analyzed.
Is there any possible side effect with this ?
The modules in project inherits a checkstyle configuration from parent *pluginManagement*
that is not affected by this hack.


Regards


Javier


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message