Skip to content

Commit 3f95d39

Browse files
authored
[MCOMPILER-503] Resolve all annotation processor dependencies together (#170)
* [MCOMPILER-503] Resolve all annotation processor dependencies together * resolving the anootation processor paths in multiple requests can easily lead to duplicated dependencies, e.g. if two processors depend on the same transitive dependency. Ultimately, both versions would end-up on processorpath, but of course only one of them would be used (likely dependeing on the order of elements of processorpath) * the previous behavior also did match the general rules of dependency resolution used by Maven itself and other plugins * this may potentially be a breaking change for certain corner cases, if for example some projects mistakenly rely on the order of elemenets in processorpath * [MCOMPILER-503] Extract and reuse annotation-verify-plugin in multiple ITs
1 parent aab8416 commit 3f95d39

File tree

23 files changed

+653
-405
lines changed

23 files changed

+653
-405
lines changed

pom.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,8 @@ under the License.
249249
! https://issues.apache.org/jira/browse/MINVOKER-174
250250
-->
251251
<setupIncludes>
252-
<setupInclude>setup_jar_module/pom.xml</setupInclude>
253-
<setupInclude>setup_jar_automodule/pom.xml</setupInclude>
254-
<setupInclude>setup_x/pom.xml</setupInclude>
252+
<setupInclude>setup*/pom.xml</setupInclude>
255253
</setupIncludes>
256-
<setupExcludes>
257-
<setupExclude>setup_x/**</setupExclude>
258-
</setupExcludes>
259254
<postBuildHookScript>verify</postBuildHookScript>
260255
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
261256
<settingsFile>src/it/settings.xml</settingsFile>

src/it/MCOMPILER-157/annotation-user/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ under the License.
5858
</configuration>
5959
</plugin>
6060
<plugin>
61-
<groupId>org.issue</groupId>
62-
<artifactId>annotation-verify</artifactId>
63-
<version>1.0-SNAPSHOT</version>
61+
<groupId>org.apache.maven.plugins.compiler.it</groupId>
62+
<artifactId>annotation-verify-plugin</artifactId>
63+
<version>1.0.0-SNAPSHOT</version>
6464
<executions>
6565
<execution>
6666
<id>verify-annotations</id>

src/it/MCOMPILER-157/annotation-verify/pom.xml

-130
This file was deleted.

src/it/MCOMPILER-157/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ under the License.
3131

3232
<modules>
3333
<module>annotation-processor</module>
34-
<module>annotation-verify</module>
3534
<module>annotation-user</module>
3635
</modules>
3736

src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ under the License.
6363
</configuration>
6464
</plugin>
6565
<plugin>
66-
<groupId>org.issue</groupId>
67-
<artifactId>annotation-verify</artifactId>
68-
<version>1.0-SNAPSHOT</version>
66+
<groupId>org.apache.maven.plugins.compiler.it</groupId>
67+
<artifactId>annotation-verify-plugin</artifactId>
68+
<version>1.0.0-SNAPSHOT</version>
6969
<executions>
7070
<execution>
7171
<id>verify-annotations</id>

src/it/MCOMPILER-203-processorpath/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java

-107
This file was deleted.

src/it/MCOMPILER-203-processorpath/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ under the License.
3131

3232
<modules>
3333
<module>annotation-processor</module>
34-
<module>annotation-verify</module>
3534
<module>annotation-user</module>
3635
</modules>
3736

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one
4+
~ or more contributor license agreements. See the NOTICE file
5+
~ distributed with this work for additional information
6+
~ regarding copyright ownership. The ASF licenses this file
7+
~ to you under the Apache License, Version 2.0 (the
8+
~ "License"); you may not use this file except in compliance
9+
~ with the License. You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing,
14+
~ software distributed under the License is distributed on an
15+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
~ KIND, either express or implied. See the License for the
17+
~ specific language governing permissions and limitations
18+
~ under the License.
19+
-->
20+
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<parent>
27+
<groupId>org.apache.maven.plugins.compiler.it</groupId>
28+
<artifactId>mcompiler503-test</artifactId>
29+
<version>1.0.0-SNAPSHOT</version>
30+
</parent>
31+
32+
<artifactId>mcompiler503-annotation-processor-dep</artifactId>
33+
34+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package mcompiler503;
2+
/*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*/
20+
21+
public class AnnotationProcessorDependencyV1
22+
{
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one
4+
~ or more contributor license agreements. See the NOTICE file
5+
~ distributed with this work for additional information
6+
~ regarding copyright ownership. The ASF licenses this file
7+
~ to you under the Apache License, Version 2.0 (the
8+
~ "License"); you may not use this file except in compliance
9+
~ with the License. You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing,
14+
~ software distributed under the License is distributed on an
15+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
~ KIND, either express or implied. See the License for the
17+
~ specific language governing permissions and limitations
18+
~ under the License.
19+
-->
20+
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<parent>
27+
<groupId>org.apache.maven.plugins.compiler.it</groupId>
28+
<artifactId>mcompiler503-test</artifactId>
29+
<version>1.0.0-SNAPSHOT</version>
30+
</parent>
31+
32+
<artifactId>mcompiler503-annotation-processor-dep</artifactId>
33+
<version>2.0.0-SNAPSHOT</version>
34+
35+
</project>

0 commit comments

Comments
 (0)