slawekjaranowski commented on code in PR #610: URL: https://github.com/apache/maven-parent/pull/610#discussion_r4102682355
########## docs/src/site/markdown/migration-parent-50.md: ########## @@ -0,0 +1,108 @@ +--- +title: Upgrading to Maven Parent POM 50 +author: + - Sylwester Lachiewicz +date: 2026-09-25 +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Upgrading to Maven Parent POM 50 + +Version 50 of this parent upgrades [apache-parent](https://maven.apache.org/pom/apache/) from 39 to 40, +which brings apache-rat-plugin 0.18, spotless-maven-plugin 3.10.2 and maven-compiler-plugin 3.16.0. +This page lists the changes observed when migrating child projects, with the fix for each. + +## apache-rat-plugin 0.18 + +### Rename `<excludes>` to `<inputExcludes>` + +Rat 0.18 replaced the deprecated `excludes` parameter with `inputExcludes`. When the parent's +`inputExcludes` is set, values declared by a child under the old `excludes` parameter are ignored, +so custom exclusions silently stop working and the check fails with +`Counter(s) UNAPPROVED exceeded minimum or maximum values`. + +Rename the parameter in every child configuration, keeping the append semantics: + +```xml +<inputExcludes combine.children="append"> + ... +</inputExcludes> +``` + +### Run rat only on JDK 17+ + +Rat 0.18 requires Java 17. This parent binds the check only in the `java17+` profile, so projects +must not declare the plugin unconditionally in `<build><plugins>` - such a declaration re-activates +it on older JDKs and fails with `The plugin ... has unmet prerequisites: Required Java version 17`. +Move the declaration into a profile with the same id, which merges with the parent's profile and +inherits its activation: + +```xml +<profile> + <id>java17+</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <configuration> + <inputExcludes combine.children="append"> + ... + </inputExcludes> + </configuration> + </plugin> + </plugins> + </build> +</profile> Review Comment: Such profile is in parent. Child project not need to declare profile again, simply plugin configuration must be in `pluginManagment` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
