Jonathan Ogilvie created MCOMPILER-230:
------------------------------------------

             Summary: failOnError doesn't work when set inside an execution
                 Key: MCOMPILER-230
                 URL: https://jira.codehaus.org/browse/MCOMPILER-230
             Project: Maven Compiler Plugin
          Issue Type: Bug
    Affects Versions: 3.1
         Environment: Linux Mint 17 Cinnamon
            Reporter: Jonathan Ogilvie


I have the following plugin configuration in my pom:

{code:xml}
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <executions>
                          <execution>
                            <id>annotation-processing</id>
                            <phase>generate-sources</phase>
                            <goals>
                              <goal>compile</goal>
                            </goals>
                            <configuration>
                              <proc>only</proc>
                              <failOnError>false</failOnError>
                            </configuration>
                          </execution>
                          <execution>
                            <id>compile-without-generated-source</id>
                            <phase>compile</phase>
                            <goals>
                              <goal>compile</goal>
                            </goals>
                            <configuration>
                              
<excludes><exclude>${project.build.dir}/generated-sources/**</exclude></excludes>
                      <proc>none</proc>
                            </configuration>
                          </execution>
                        </executions>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <proc>only</proc>
                </configuration>
            </plugin>
{code}

During the first execution, the build still fails on error.  If I move 
<failOnError> to the top-level <plugin><configuration> node or define it on the 
command line instead, the value sticks, but then I can't enable failOnError for 
the second execution.

Of note:  it seems like this works if I negate the whole thing and switch the 
place I'm overriding.  If I set it false at the top level configuration, and 
true on an execution, I can get the desired behavior.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to