Skip to content

Commit a1c5b13

Browse files
[MCOMPILER-565] Allow project build by Maven 4
1 parent 4855773 commit a1c5b13

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

Diff for: src/it/mcompiler-106/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ under the License.
3434
<configuration>
3535
<fork>true</fork>
3636
<compilerArguments>
37-
<Xlint/>
38-
<Xlint:-path/>
39-
</compilerArguments>
37+
<Xlint/>
38+
<Averbose>true</Averbose>
39+
</compilerArguments>
4040
</configuration>
4141
</plugin>
4242
</plugins>

Diff for: src/it/mcompiler-106/verify.groovy

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
def logFile = new File( basedir, 'build.log' )
20+
assert logFile.exists()
21+
content = logFile.text
22+
23+
assert content.contains( ' -Averbose=true' )
24+
assert content.contains( ' -Xlint' )
25+

Diff for: src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
407407
/**
408408
* <p>
409409
* Sets the unformatted single argument string to be passed to the compiler. To pass multiple arguments such as
410-
* <code>-Xmaxerrs 1000</code> (which are actually two arguments) you have to use {@link #compilerArguments}.
410+
* <code>-Xmaxerrs 1000</code> (which are actually two arguments) you have to use {@link #compilerArgs}.
411411
* </p>
412412
* <p>
413413
* This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.

0 commit comments

Comments
 (0)