From 0bf605980ad067a06d500601ebb373b879473242 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Tue, 4 Aug 2026 20:40:58 +0200 Subject: [PATCH] Upgrade parent to maven-shared-components 49 The Jenkins shared library now provisions the Maven wrapper into the workspace before building, which writes .mvn/wrapper/maven-wrapper.properties. That file carries no licence header, and the apache-rat 0.13 pinned by parent 34 counts it as unapproved, so the branch build fails with Too many files with unapproved license: 1 Parent 49 brings apache-rat 0.16.1, which does not. Verified locally by generating the wrapper and running the check both ways: parent 34 gives "Unapproved: 1, unknown: 1" naming .mvn/wrapper/maven-wrapper.properties, parent 49 gives "Unapproved: 0". The source changes are spotless from the new parent, applied rather than hand-edited: the licence header moves above the package statement, imports are reordered, and the modern Maven brace and spacing style is applied. The old post-package header blocks are removed so the header is not duplicated. No code changes. Co-Authored-By: Claude Opus 5 (1M context) --- pom.xml | 36 +++++++++---------- .../maven/reporting/MavenMultiPageReport.java | 16 ++++----- .../apache/maven/reporting/MavenReport.java | 21 +++++------ .../maven/reporting/MavenReportException.java | 19 ++++------ .../maven/reporting/MavenReportRenderer.java | 10 +++--- 5 files changed, 43 insertions(+), 59 deletions(-) diff --git a/pom.xml b/pom.xml index c270664..3bc1313 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,4 @@ - - + - 4.0.0 org.apache.maven.shared maven-shared-components - 34 + 49 @@ -51,8 +49,8 @@ under the License. scm:git:https://gitbox.apache.org/repos/asf/maven-reporting-api.git scm:git:https://gitbox.apache.org/repos/asf/maven-reporting-api.git - https://github.com/apache/maven-reporting-api/tree/${project.scm.tag} HEAD + https://github.com/apache/maven-reporting-api/tree/${project.scm.tag} jira @@ -68,11 +66,24 @@ under the License. scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path} - + 7 2022-07-29T20:28:12Z + + + org.apache.maven.doxia + doxia-sink-api + 1.11.1 + + + org.codehaus.plexus + plexus-container-default + + + + @@ -90,17 +101,4 @@ under the License. - - - org.apache.maven.doxia - doxia-sink-api - 1.11.1 - - - plexus-container-default - org.codehaus.plexus - - - - diff --git a/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java b/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java index 4c8e6ec..67cf85c 100644 --- a/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java +++ b/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java @@ -1,5 +1,3 @@ -package org.apache.maven.reporting; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -9,7 +7,7 @@ * "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 + * 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 @@ -18,12 +16,13 @@ * specific language governing permissions and limitations * under the License. */ +package org.apache.maven.reporting; + +import java.util.Locale; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkFactory; -import java.util.Locale; - /** * Interface created separately for backwards compatibility. This method * would ideally have been added in the {@link MavenReport} interface, and the other 'generate' @@ -33,9 +32,7 @@ * @see MavenReport#generate(org.codehaus.doxia.sink.Sink, Locale) * @since 3.0 (copied in maven-site-plugin 2.0-beta-6) */ -public interface MavenMultiPageReport - extends MavenReport -{ +public interface MavenMultiPageReport extends MavenReport { /** * Generate multi page report. * @@ -43,6 +40,5 @@ public interface MavenMultiPageReport * @param locale The locale to use. * @throws MavenReportException if an error occurs. */ - void generate( Sink sink, SinkFactory sinkFactory, Locale locale ) - throws MavenReportException; + void generate(Sink sink, SinkFactory sinkFactory, Locale locale) throws MavenReportException; } diff --git a/src/main/java/org/apache/maven/reporting/MavenReport.java b/src/main/java/org/apache/maven/reporting/MavenReport.java index 0ca6086..c72619f 100644 --- a/src/main/java/org/apache/maven/reporting/MavenReport.java +++ b/src/main/java/org/apache/maven/reporting/MavenReport.java @@ -1,5 +1,3 @@ -package org.apache.maven.reporting; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -9,7 +7,7 @@ * "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 + * 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 @@ -18,12 +16,13 @@ * specific language governing permissions and limitations * under the License. */ - -import org.codehaus.doxia.sink.Sink; +package org.apache.maven.reporting; import java.io.File; import java.util.Locale; +import org.codehaus.doxia.sink.Sink; + /** * The basis for a Maven report. * @@ -32,8 +31,7 @@ * @author Vincent Siveton * @since 2.0 */ -public interface MavenReport -{ +public interface MavenReport { /** Plexus lookup name */ String ROLE = MavenReport.class.getName(); @@ -52,8 +50,7 @@ public interface MavenReport * @param locale the wanted locale to generate the report, could be null. * @throws MavenReportException if any */ - void generate( Sink sink, Locale locale ) - throws MavenReportException; + void generate(Sink sink, Locale locale) throws MavenReportException; /** * Get the base name used to create report's output file(s). @@ -76,7 +73,7 @@ void generate( Sink sink, Locale locale ) * @param locale the wanted locale to return the report's name, could be null. * @return the name of this report. */ - String getName( Locale locale ); + String getName(Locale locale); /** * Get the localized report description. @@ -84,14 +81,14 @@ void generate( Sink sink, Locale locale ) * @param locale the wanted locale to return the report's description, could be null. * @return the description of this report. */ - String getDescription( Locale locale ); + String getDescription(Locale locale); /** * Set a new output directory. Useful for staging. * * @param outputDirectory the new output directory */ - void setReportOutputDirectory( File outputDirectory ); + void setReportOutputDirectory(File outputDirectory); /** * @return the current report output directory. diff --git a/src/main/java/org/apache/maven/reporting/MavenReportException.java b/src/main/java/org/apache/maven/reporting/MavenReportException.java index 90c952b..be21244 100644 --- a/src/main/java/org/apache/maven/reporting/MavenReportException.java +++ b/src/main/java/org/apache/maven/reporting/MavenReportException.java @@ -1,5 +1,3 @@ -package org.apache.maven.reporting; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -9,7 +7,7 @@ * "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 + * 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 @@ -18,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +package org.apache.maven.reporting; /** * An exception occurring during the execution of a Maven report. @@ -26,9 +25,7 @@ * @author Emmanuel Venisse * @since 2.0 */ -public class MavenReportException - extends Exception -{ +public class MavenReportException extends Exception { /** The serialVersionUID **/ public static final long serialVersionUID = -6200353563231163785L; @@ -37,9 +34,8 @@ public class MavenReportException * * @param msg the exception message. */ - public MavenReportException( String msg ) - { - super( msg ); + public MavenReportException(String msg) { + super(msg); } /** @@ -48,8 +44,7 @@ public MavenReportException( String msg ) * @param msg the exception message. * @param cause the cause. */ - public MavenReportException( String msg, Exception cause ) - { - super( msg, cause ); + public MavenReportException(String msg, Exception cause) { + super(msg, cause); } } diff --git a/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java b/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java index 5b6e5fe..c174ca3 100644 --- a/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java +++ b/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java @@ -1,5 +1,3 @@ -package org.apache.maven.reporting; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -9,7 +7,7 @@ * "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 + * 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 @@ -18,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +package org.apache.maven.reporting; /** * Basis for rendering report. @@ -29,8 +28,7 @@ * that could take a velocity template and pipe that through Doxia rather than coding * them up like this. */ -public interface MavenReportRenderer -{ +public interface MavenReportRenderer { /** * @return the wanted report's title. */ @@ -40,4 +38,4 @@ public interface MavenReportRenderer * Renderer a report. */ void render(); -} \ No newline at end of file +}