[ https://issues.apache.org/jira/browse/MCOMPILER-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MCOMPILER-230. ------------------------------------ Resolution: Cannot Reproduce Assignee: Robert Scholte Maven (core) is responsible for correctly parsing the configuration and I don't see any issue there (running {{mvn compile -X}} shows the plugin configuration per execution block, all looks fine). In the code there is this line: {{failOnError && !compilerResult.isSuccess()}} It could be that this value wasn't set correctly for some reason. However, that depends on the implementation of the Plexus Compiler API. Also in this case not an issue of the maven-compiler-plugin. > failOnError doesn't work when set inside an execution > ----------------------------------------------------- > > Key: MCOMPILER-230 > URL: https://issues.apache.org/jira/browse/MCOMPILER-230 > Project: Maven Compiler Plugin > Issue Type: Bug > Affects Versions: 3.1 > Environment: Linux Mint 17 Cinnamon > Reporter: Jonathan Ogilvie > Assignee: Robert Scholte > > 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.3.4#6332)