Skip to content

Commit

Permalink
[MCOMPILER-503] Resolve all annotation processor dependencies together (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
psiroky committed Jan 30, 2023
1 parent aab8416 commit 3f95d39
Show file tree
Hide file tree
Showing 23 changed files with 653 additions and 405 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,8 @@ under the License.
! https://issues.apache.org/jira/browse/MINVOKER-174
-->
<setupIncludes>
<setupInclude>setup_jar_module/pom.xml</setupInclude>
<setupInclude>setup_jar_automodule/pom.xml</setupInclude>
<setupInclude>setup_x/pom.xml</setupInclude>
<setupInclude>setup*/pom.xml</setupInclude>
</setupIncludes>
<setupExcludes>
<setupExclude>setup_x/**</setupExclude>
</setupExcludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
Expand Down
6 changes: 3 additions & 3 deletions src/it/MCOMPILER-157/annotation-user/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ under the License.
</configuration>
</plugin>
<plugin>
<groupId>org.issue</groupId>
<artifactId>annotation-verify</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.apache.maven.plugins.compiler.it</groupId>
<artifactId>annotation-verify-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>verify-annotations</id>
Expand Down
130 changes: 0 additions & 130 deletions src/it/MCOMPILER-157/annotation-verify/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion src/it/MCOMPILER-157/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ under the License.

<modules>
<module>annotation-processor</module>
<module>annotation-verify</module>
<module>annotation-user</module>
</modules>

Expand Down
6 changes: 3 additions & 3 deletions src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ under the License.
</configuration>
</plugin>
<plugin>
<groupId>org.issue</groupId>
<artifactId>annotation-verify</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.apache.maven.plugins.compiler.it</groupId>
<artifactId>annotation-verify-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>verify-annotations</id>
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/it/MCOMPILER-203-processorpath/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ under the License.

<modules>
<module>annotation-processor</module>
<module>annotation-verify</module>
<module>annotation-user</module>
</modules>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.maven.plugins.compiler.it</groupId>
<artifactId>mcompiler503-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>mcompiler503-annotation-processor-dep</artifactId>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

public class AnnotationProcessorDependencyV1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.maven.plugins.compiler.it</groupId>
<artifactId>mcompiler503-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>mcompiler503-annotation-processor-dep</artifactId>
<version>2.0.0-SNAPSHOT</version>

</project>
Loading

0 comments on commit 3f95d39

Please sign in to comment.