This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-wrapper.git


The following commit(s) were added to refs/heads/master by this push:
     new 772464e  [MWRAPPER-158] Remove incorrect license header (#166)
772464e is described below

commit 772464edf1867bf127951f012cafe830779d1517
Author: Lars Bruun-Hansen <[email protected]>
AuthorDate: Wed Jul 16 17:53:37 2025 +0200

    [MWRAPPER-158] Remove incorrect license header (#166)
    
    The "This code is licensed to ASF" license header on the generated
    ./mvn/wrapper/maven-wrapper.properties file does not make sense.
    The file is the user's, not ASF's. It is generated as a convenience
    for the user.
    
    The file is logically part of the user's own code. We don't know
    what license that has, so adding a license header is bound to be wrong.
    
    Fixes #323.
---
 .../org/apache/maven/plugins/wrapper/WrapperMojo.java | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git 
a/maven-wrapper-plugin/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
 
b/maven-wrapper-plugin/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
index 4b0650f..017e7b0 100644
--- 
a/maven-wrapper-plugin/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
+++ 
b/maven-wrapper-plugin/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
@@ -28,7 +28,6 @@ import java.nio.file.DirectoryStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
 
@@ -311,25 +310,7 @@ public class WrapperMojo extends AbstractMojo {
         getLog().info("Configuring .mvn/wrapper/maven-wrapper.properties to 
use "
                 + buffer().strong("Maven " + mavenVersion) + " and download 
from " + repoUrl);
 
-        final String license = "# Licensed to the Apache Software Foundation 
(ASF) under one%n"
-                + "# or more contributor license agreements.  See the NOTICE 
file%n"
-                + "# distributed with this work for additional information%n"
-                + "# regarding copyright ownership.  The ASF licenses this 
file%n"
-                + "# to you under the Apache License, Version 2.0 (the%n"
-                + "# \"License\"); you may not use this file except in 
compliance%n"
-                + "# with the License.  You may obtain a copy of the License 
at%n"
-                + "#%n"
-                + "#   http://www.apache.org/licenses/LICENSE-2.0%n";
-                + "#%n"
-                + "# Unless required by applicable law or agreed to in 
writing,%n"
-                + "# software distributed under the License is distributed on 
an%n"
-                + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 
ANY%n"
-                + "# KIND, either express or implied.  See the License for 
the%n"
-                + "# specific language governing permissions and limitations%n"
-                + "# under the License.%n";
-
         try (BufferedWriter out = 
Files.newBufferedWriter(wrapperPropertiesFile, StandardCharsets.UTF_8)) {
-            out.append(String.format(Locale.ROOT, license));
             out.append("wrapperVersion=" + wrapperVersion + 
System.lineSeparator());
             out.append(DISTRIBUTION_TYPE_PROPERTY_NAME + "=" + 
distributionType + System.lineSeparator());
             out.append("distributionUrl=" + distributionUrl + 
System.lineSeparator());

Reply via email to