|
27 | 27 | import java.nio.charset.StandardCharsets; |
28 | 28 | import java.nio.file.Files; |
29 | 29 | import java.nio.file.Path; |
| 30 | +import java.util.Locale; |
30 | 31 | import java.util.Map; |
31 | 32 | import java.util.Properties; |
32 | 33 |
|
@@ -233,26 +234,26 @@ private void replaceProperties( String wrapperVersion, Path targetFolder ) throw |
233 | 234 | getLog().info( "Configuring .mvn/wrapper/maven-wrapper.properties to use " |
234 | 235 | + buffer().strong( "Maven " + mavenVersion ) + " and download from " + repoUrl ); |
235 | 236 |
|
236 | | - final String license = "# Licensed to the Apache Software Foundation (ASF) under one\n" |
237 | | - + "# or more contributor license agreements. See the NOTICE file\n" |
238 | | - + "# distributed with this work for additional information\n" |
239 | | - + "# regarding copyright ownership. The ASF licenses this file\n" |
240 | | - + "# to you under the Apache License, Version 2.0 (the\n" |
241 | | - + "# \"License\"); you may not use this file except in compliance\n" |
242 | | - + "# with the License. You may obtain a copy of the License at\n" |
243 | | - + "# \n" |
244 | | - + "# http://www.apache.org/licenses/LICENSE-2.0\n" |
245 | | - + "# \n" |
246 | | - + "# Unless required by applicable law or agreed to in writing,\n" |
247 | | - + "# software distributed under the License is distributed on an\n" |
248 | | - + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" |
249 | | - + "# KIND, either express or implied. See the License for the\n" |
250 | | - + "# specific language governing permissions and limitations\n" |
251 | | - + "# under the License.\n"; |
| 237 | + final String license = "# Licensed to the Apache Software Foundation (ASF) under one%n" |
| 238 | + + "# or more contributor license agreements. See the NOTICE file%n" |
| 239 | + + "# distributed with this work for additional information%n" |
| 240 | + + "# regarding copyright ownership. The ASF licenses this file%n" |
| 241 | + + "# to you under the Apache License, Version 2.0 (the%n" |
| 242 | + + "# \"License\"); you may not use this file except in compliance%n" |
| 243 | + + "# with the License. You may obtain a copy of the License at%n" |
| 244 | + + "#%n" |
| 245 | + + "# https://www.apache.org/licenses/LICENSE-2.0%n" |
| 246 | + + "#%n" |
| 247 | + + "# Unless required by applicable law or agreed to in writing,%n" |
| 248 | + + "# software distributed under the License is distributed on an%n" |
| 249 | + + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%n" |
| 250 | + + "# KIND, either express or implied. See the License for the%n" |
| 251 | + + "# specific language governing permissions and limitations%n" |
| 252 | + + "# under the License.%n"; |
252 | 253 |
|
253 | 254 | try ( BufferedWriter out = Files.newBufferedWriter( wrapperPropertiesFile, StandardCharsets.UTF_8 ) ) |
254 | 255 | { |
255 | | - out.append( license ); |
| 256 | + out.append( String.format( Locale.ROOT, license ) ); |
256 | 257 | out.append( "distributionUrl=" + distributionUrl + System.lineSeparator() ); |
257 | 258 | out.append( "wrapperUrl=" + wrapperUrl + System.lineSeparator() ); |
258 | 259 | } |
|
0 commit comments