Skip to content

Commit aed49ae

Browse files
committed
add it for issue #183 but using javac compiler, use properties for versions in its
Signed-off-by: Olivier Lamy <[email protected]>
1 parent f4d6074 commit aed49ae

File tree

14 files changed

+127
-21
lines changed

14 files changed

+127
-21
lines changed

plexus-compiler-its/src/main/it/MCOMPILER-346-mre/pom.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<url>https://github.com/basil/MCOMPILER-346-mre</url>
3030
<properties>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3233
</properties>
3334
<dependencies>
3435
<dependency>
@@ -61,12 +62,12 @@
6162
<dependency>
6263
<groupId>org.codehaus.plexus</groupId>
6364
<artifactId>plexus-compiler-api</artifactId>
64-
<version>@pom.version@</version>
65+
<version>${plexus.compiler.version}</version>
6566
</dependency>
6667
<dependency>
6768
<groupId>org.codehaus.plexus</groupId>
6869
<artifactId>plexus-compiler-javac</artifactId>
69-
<version>@pom.version@</version>
70+
<version>${plexus.compiler.version}</version>
7071
</dependency>
7172
</dependencies>
7273
</plugin>

plexus-compiler-its/src/main/it/aspectj-compiler/pom.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,27 @@
3131
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3232
<maven.compiler.source>1.8</maven.compiler.source>
3333
<maven.compiler.target>1.8</maven.compiler.target>
34+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3435
</properties>
3536

3637
<build>
3738
<plugins>
3839
<plugin>
3940
<artifactId>maven-compiler-plugin</artifactId>
40-
<version>3.8.1</version>
41+
<version>@maven.compiler.version@</version>
4142
<configuration>
4243
<compilerId>aspectj</compilerId>
4344
</configuration>
4445
<dependencies>
4546
<dependency>
4647
<groupId>org.codehaus.plexus</groupId>
4748
<artifactId>plexus-compiler-api</artifactId>
48-
<version>@pom.version@</version>
49+
<version>${plexus.compiler.version}</version>
4950
</dependency>
5051
<dependency>
5152
<groupId>org.codehaus.plexus</groupId>
5253
<artifactId>plexus-compiler-aspectj</artifactId>
53-
<version>@pom.version@</version>
54+
<version>${plexus.compiler.version}</version>
5455
</dependency>
5556
</dependencies>
5657
</plugin>

plexus-compiler-its/src/main/it/eclipse-compiler-mapstruct/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3535
<maven.compiler.source>1.8</maven.compiler.source>
3636
<maven.compiler.target>1.8</maven.compiler.target>
37-
37+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3838
<org.mapstruct.version>1.5.2.Final</org.mapstruct.version>
3939
</properties>
4040

@@ -51,20 +51,20 @@
5151
<plugin>
5252
<groupId>org.apache.maven.plugins</groupId>
5353
<artifactId>maven-compiler-plugin</artifactId>
54-
<version>3.10.1</version>
54+
<version>@maven.compiler.version@</version>
5555
<configuration>
5656
<compilerId>eclipse</compilerId>
5757
</configuration>
5858
<dependencies>
5959
<dependency>
6060
<groupId>org.codehaus.plexus</groupId>
6161
<artifactId>plexus-compiler-api</artifactId>
62-
<version>@pom.version@</version>
62+
<version>${plexus.compiler.version}</version>
6363
</dependency>
6464
<dependency>
6565
<groupId>org.codehaus.plexus</groupId>
6666
<artifactId>plexus-compiler-eclipse</artifactId>
67-
<version>@pom.version@</version>
67+
<version>${plexus.compiler.version}</version>
6868
</dependency>
6969
<dependency>
7070
<groupId>org.mapstruct</groupId>

plexus-compiler-its/src/main/it/error-prone-compiler/pom.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<properties>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3434
<javac.version>9+181-r4173-1</javac.version>
35+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3536
</properties>
3637

3738
<dependencies>
@@ -48,7 +49,7 @@
4849
<plugin>
4950
<groupId>org.apache.maven.plugins</groupId>
5051
<artifactId>maven-compiler-plugin</artifactId>
51-
<version>3.8.1</version>
52+
<version>@maven.compiler.version@</version>
5253
<configuration>
5354
<target>8</target>
5455
<source>8</source>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
invoker.java.version = 11+
19+
invoker.goals = clean compile
20+
#invoker.buildResult = failure
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.apache.maven.plugins.compiler.it</groupId>
8+
<artifactId>missing-warnings</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<build>
12+
<pluginManagement>
13+
<plugins>
14+
<plugin>
15+
<groupId>org.apache.maven.plugins</groupId>
16+
<artifactId>maven-compiler-plugin</artifactId>
17+
<version>@maven.compiler.version@</version>
18+
<configuration>
19+
<forceJavacCompilerUse>true</forceJavacCompilerUse>
20+
<showWarnings>true</showWarnings>
21+
</configuration>
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.codehaus.plexus</groupId>
25+
<artifactId>plexus-compiler-api</artifactId>
26+
<version>${plexus.compiler.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.codehaus.plexus</groupId>
30+
<artifactId>plexus-compiler-javac</artifactId>
31+
<version>${plexus.compiler.version}</version>
32+
</dependency>
33+
</dependencies>
34+
</plugin>
35+
</plugins>
36+
</pluginManagement>
37+
</build>
38+
39+
<properties>
40+
<maven.compiler.source>11</maven.compiler.source>
41+
<maven.compiler.target>11</maven.compiler.target>
42+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
43+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
44+
</properties>
45+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.company;
2+
3+
public class SomeClass
4+
{
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module testcase {
2+
exports com.company to someOtherModule;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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.normalize()
22+
23+
assert content.contains( "module-info.java:[2,24] [module] module not found: someOtherModule")
24+
//assert content.contains( "exports com.company to someOtherModule;" )

plexus-compiler-its/src/main/it/simple-eclipse-compiler-fail/pom.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3535
<maven.compiler.source>1.8</maven.compiler.source>
3636
<maven.compiler.target>1.8</maven.compiler.target>
37+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3738
</properties>
3839

3940
<dependencies>
@@ -58,12 +59,12 @@
5859
<dependency>
5960
<groupId>org.codehaus.plexus</groupId>
6061
<artifactId>plexus-compiler-api</artifactId>
61-
<version>@pom.version@</version>
62+
<version>${plexus.compiler.version}</version>
6263
</dependency>
6364
<dependency>
6465
<groupId>org.codehaus.plexus</groupId>
6566
<artifactId>plexus-compiler-eclipse</artifactId>
66-
<version>@pom.version@</version>
67+
<version>${plexus.compiler.version}</version>
6768
</dependency>
6869
</dependencies>
6970
</plugin>

plexus-compiler-its/src/main/it/simple-eclipse-compiler/pom.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3535
<maven.compiler.source>1.8</maven.compiler.source>
3636
<maven.compiler.target>1.8</maven.compiler.target>
37+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3738
</properties>
3839

3940
<dependencies>
@@ -58,12 +59,12 @@
5859
<dependency>
5960
<groupId>org.codehaus.plexus</groupId>
6061
<artifactId>plexus-compiler-api</artifactId>
61-
<version>@pom.version@</version>
62+
<version>${plexus.compiler.version}</version>
6263
</dependency>
6364
<dependency>
6465
<groupId>org.codehaus.plexus</groupId>
6566
<artifactId>plexus-compiler-eclipse</artifactId>
66-
<version>@pom.version@</version>
67+
<version>${plexus.compiler.version}</version>
6768
</dependency>
6869
</dependencies>
6970
</plugin>

plexus-compiler-its/src/main/it/simple-javac-fork/pom.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3535
<maven.compiler.source>11</maven.compiler.source>
3636
<maven.compiler.target>11</maven.compiler.target>
37+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3738
</properties>
3839

3940
<dependencies>
@@ -50,7 +51,7 @@
5051
<plugin>
5152
<groupId>org.apache.maven.plugins</groupId>
5253
<artifactId>maven-compiler-plugin</artifactId>
53-
<version>3.8.1</version>
54+
<version>@maven.compiler.version@</version>
5455
<configuration>
5556
<fork>true</fork>
5657
<compilerArgs>
@@ -61,12 +62,12 @@
6162
<dependency>
6263
<groupId>org.codehaus.plexus</groupId>
6364
<artifactId>plexus-compiler-api</artifactId>
64-
<version>@pom.version@</version>
65+
<version>${plexus.compiler.version}</version>
6566
</dependency>
6667
<dependency>
6768
<groupId>org.codehaus.plexus</groupId>
6869
<artifactId>plexus-compiler-javac</artifactId>
69-
<version>@pom.version@</version>
70+
<version>${plexus.compiler.version}</version>
7071
</dependency>
7172
</dependencies>
7273
</plugin>

plexus-compiler-its/src/main/it/simple-javac/pom.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3535
<maven.compiler.source>1.8</maven.compiler.source>
3636
<maven.compiler.target>1.8</maven.compiler.target>
37+
<plexus.compiler.version>@pom.version@</plexus.compiler.version>
3738
</properties>
3839

3940
<dependencies>
@@ -50,22 +51,22 @@
5051
<plugin>
5152
<groupId>org.apache.maven.plugins</groupId>
5253
<artifactId>maven-compiler-plugin</artifactId>
53-
<version>3.8.1</version>
54+
<version>@maven.compiler.version@</version>
5455
<configuration>
5556
<compilerArgs>
5657
<compilerArg>-Xlint:-path</compilerArg>
5758
</compilerArgs>
5859
</configuration>
5960
<dependencies>
60-
<dependency>
61+
<dependency>
6162
<groupId>org.codehaus.plexus</groupId>
6263
<artifactId>plexus-compiler-api</artifactId>
63-
<version>@pom.version@</version>
64+
<version>${plexus.compiler.version}</version>
6465
</dependency>
6566
<dependency>
6667
<groupId>org.codehaus.plexus</groupId>
6768
<artifactId>plexus-compiler-javac</artifactId>
68-
<version>@pom.version@</version>
69+
<version>${plexus.compiler.version}</version>
6970
</dependency>
7071
</dependencies>
7172
</plugin>

pom.xml

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<errorprone.version>2.14.0</errorprone.version>
5555
<trimStackTrace>false</trimStackTrace>
5656
<preparationGoals>clean install</preparationGoals>
57+
<maven.compiler.version>3.10.1</maven.compiler.version>
5758
</properties>
5859

5960
<dependencyManagement>
@@ -129,6 +130,7 @@
129130
<plugin>
130131
<groupId>org.apache.maven.plugins</groupId>
131132
<artifactId>maven-compiler-plugin</artifactId>
133+
<version>${maven.compiler.version}</version>
132134
<configuration>
133135
<release>8</release>
134136
</configuration>

0 commit comments

Comments
 (0)