You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Boué (JIRA)" <ji...@apache.org> on 2016/09/30 17:07:20 UTC

[jira] [Commented] (MCOMPILER-280) maven-compiler-plugin breaks mvn test when using quickcheck dependency

    [ https://issues.apache.org/jira/browse/MCOMPILER-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15536488#comment-15536488 ] 

Guillaume Boué commented on MCOMPILER-280:
------------------------------------------

This is a quickcheck issue, caused by some of its code is not declared to support Java 8. When the Compiler Plugin is configured to show the warnings, with

{noformat}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.5.1</version>
  <configuration>
    <showWarnings>true</showWarnings>
  </configuration>
</plugin>
{noformat}

The logs show:

{noformat}
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ quickchecktest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to ...\maven_plugin_test_project\target\test-classes
[WARNING] Supported source version 'RELEASE_6' from annotation processor 'net.java.quickcheck.srcgenerator.SamplesProcessor' less than -source '1.8'
[WARNING] Supported source version 'RELEASE_6' from annotation processor 'net.java.quickcheck.srcgenerator.IterableProcessor' less than -source '1.8'
{noformat}

This warning is emitted because the annotation processors inside Quickcheck didn't specify a [@SupportedSourceVersion|https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/SupportedSourceVersion.html#value--], so it defaults to [Java 6|https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/AbstractProcessor.html#getSupportedSourceVersion--].

I don't think this can be disabled in the POM as it is on quickcheck end. I was able to find an issue in their bug tracker regarding this: https://bitbucket.org/blob79/quickcheck/pull-requests/1/compatibility-fixes-for-java-7-and-8/diff.

> maven-compiler-plugin breaks mvn test when using quickcheck dependency
> ----------------------------------------------------------------------
>
>                 Key: MCOMPILER-280
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-280
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.5.1
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
> Maven home: /usr/local/Cellar/maven/3.3.9/libexec
> Java version: 1.8.0_102, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.11.3", arch: "x86_64", family: "mac"
>            Reporter: Adam Cook
>
> The maven-compiler-plugin seems to break when using net.java.quickcheck as a dependency. I've attached a small sample project that should illustrate the problem. If you run 
> {noformat}mvn test{noformat}
>  you'll see that the test compilation fails. If you comment out either the maven-compiler-plugin or the quickcheck depedency (which isn't actually used by any of the code in this sample project) then mvn test will succeed.
> If you change the scope of the quickcheck dependency to compile instead of test, it will also cause {noformat}mvn compile{noformat} to fail.
> If you remove {noformat}<arg>-Werror</arg>{noformat} from the plugin, mvn test will again succeed. 
> Its possible this is a bug with the quickcheck dependency, but I don't know how a dependency could cause a failure like this.
> Thanks!
> Sample Project: https://www.dropbox.com/s/bdyhhe6e6b237vf/maven_plugin_test_project.zip?dl=0
> Maven verbose output: https://www.dropbox.com/s/9gsqi1fdt64ph53/mvn_log.txt?dl=0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)