for reference, useful discussion on dev@maven of: - plugins read-only parameters, per plugin conception, - Maven 3.x bug that allows configuring such supposed read-only parameter (was properly forbidden in Maven 2) - this Maven core bug will be fixed in future Maven 3.7.0 - then some builds using the bug will break, and people will have to work with plugin developers to eventually add new features around the read-only parameter if it was a missing feature
see detailed discussion in https://lists.apache.org/thread.html/rf16612451ece2b2fcdd678d06cc6dad9b687f5d9cfba11ae66b12137%40%3Cdev.maven.apache.org%3E Regards, Hervé Le jeudi 23 avril 2020, 19:44:08 CEST Javier Gómez a écrit : > Any thoughts on this? > > We don't want to define this spefic folders config in POM build > <resources> block, to avoid inherit that in child POMs. > But we want that they were analyzed by checkstyle plugin, so we are > forcing that at the plugin level, specifying the <resources> block. > > That this is a read-only attribute, and we define it in the plugin > configuration, does not imply that the compilation fails, as I would > expect. Is this correct? > > Thanks in advance. > > Javier > > On 2020/04/20 18:34:23, Javier Gómez wrote: > > 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 > > > > > > > org.apache.maven.plugins> > > maven-checkstyle-plugin> > > false> > > > > > > > > dir1> > > > > > > dir2> > > > > > > > > > > > > > > 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> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
