Javier, In upcoming Maven release 3.7 0 it won't be allowed to overwrite readonly attributes.
I am sorry, I don't know how to fix your issue. Question for the community: can we drop the 'readonly' flag from the 'resources' field of checkstyle plugin? I mean, it has always been writable up to now, so if we don't want to break existing poms we should make it explicitly non readonly. Is there any problem with this approach? I image that we will do this way for other falsely readonly property Enrico Il Gio 23 Apr 2020, 20:06 Javier Gómez <javier.go...@prefapp.es> ha scritto: > Hi, > > we are testing a config, that overwrites a readonly attribute, in Maven > Checkstyle plugin config, to be able to analyze a set of resource > folders in project root folder. > > We don't want to define this spefic folders config in POM build > <resources> block, to avoid inherit that in child POMs, so we are > forcing that at the plugin level, specifying the <resources> block > attribute. > > 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 that correct? > > Any side effect that we could expect of this configuration? > > Thanks in advance. > > > ======= > > # Directory structure layout: > > /module1 > src/main/java > src/main/resources > pom.xml > /module2 > ... > /src > /dir1 > /dir2 > pom.xml > > # > # Parent POM build config > # > > <build> > > <pluginManagement> > > [Checkstyle config] > > </pluginManagement> > > <plugin> > > # config to analyze the specific resources folders, in project > root folder > > <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> > > >