Alexey Markevich created MCOMPILER-543:
------------------------------------------

             Summary: Allow to exclude particular dependency from annotation 
processor classpath
                 Key: MCOMPILER-543
                 URL: https://issues.apache.org/jira/browse/MCOMPILER-543
             Project: Maven Compiler Plugin
          Issue Type: Improvement
            Reporter: Alexey Markevich


like 
[Surefire|https://maven.apache.org/surefire/maven-surefire-plugin/examples/configuring-classpath.html#removing-dependency-classpath-elements]
 but for annotationProcessorPaths element. Case is:

- parent module:
{code}
   <build>
      <pluginManagement>
            <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <configuration>
                  <annotationProcessorPaths>
                     <path>
                        <groupId>grpoup1</groupId>
                        <artifactId>artifact1</artifactId>
                        <version>version1</version>
                     </path>
                  </annotationProcessorPaths>
               </configuration>
            </plugin>
...
      <profile>
          <build>
              <pluginManagement>
                 <plugins>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-compiler-plugin</artifactId>
                         <configuration>
                             <annotationProcessorPaths 
combine.children="append">
                                 <path>
                                     <groupId>group2</groupId>
                                     <artifactId>artifact2</artifactId>
                                     <version>version2</version>
                                 </path>
                             </annotationProcessorPaths>
                         </configuration>
{code}

 - child module:
{code}
   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <executions>
               <execution>
                  <id>default-compile</id>
                  <phase>compile</phase>
                  <goals>
                     <goal>compile</goal>
                  </goals>
                  <configuration>
                     <annotationProcessorPaths combine.self="override"/>
                  </configuration>
{code}

disable all processors. Goal is exclude only base one to have something like
{code}
   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <executions>
               <execution>
                  <id>default-compile</id>
                  <phase>compile</phase>
                  <goals>
                     <goal>compile</goal>
                  </goals>
                  <configuration>
                     <annotationProcessorPathsExcludes>
                           
<annotationProcessorPathsExclude>group1:artifact1:version1</annotationProcessorPathsExcludeude>
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to