You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2019/02/15 14:28:00 UTC

[jira] [Closed] (MCOMPILER-375) can't use release tag on Ubuntu

     [ https://issues.apache.org/jira/browse/MCOMPILER-375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MCOMPILER-375.
------------------------------------
    Resolution: Not A Problem
      Assignee: Robert Scholte

The {{--release}} flag was introduced with Java 9, so you can't use it with an earlier JDK. We could have decided to ignore the release-flag when compiling with earlier versions, but we didn't. See MCOMPILER-270 for the details.

> can't use release tag on Ubuntu
> -------------------------------
>
>                 Key: MCOMPILER-375
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-375
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.5
>         Environment: Maven 3.5.4 on Windows 8 with Java 8
>            Reporter: Ewa Śliwińska
>            Assignee: Robert Scholte
>            Priority: Minor
>
> I want to configure my Maven project to use Java 8.
> Normally I do it by pasting
> {code:java}
> <build>
>   <plugins>
>     <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>3.8.0</version>
>       <configuration>
>         <release>8</release>
>       </configuration>
>     </plugin>
>   </plugins>
> </build>{code}
> into POM, and this works fine on Maven 3.5.4 on Windows 10 with Java 8.
> But when I tried to compile it using Maven 3.5.2 on Ubuntu 18.04 with Java 10, it says *invalid flag: --release*. I'm not sure when this tag was introduces, I have problems containing information about it.
> ----
> Nevertheless, I don't mind (that much) using _source_ and _target_ instead of _release._
>  I tried it, but then I can't compile my project because of the error related to Google Guava Table:
> {code:java}
> [ERROR] /C:/Users/kresk/git/boundtest/src/main/java/Example.java:[23,61] incompatible types: inferred type does not conform to upper bound(s)
> [ERROR] inferred: com.google.common.collect.Table<java.lang.Object,java.lang.Object,java.lang.Object>
> [ERROR] upper bound(s): com.google.common.collect.Table<java.lang.Object,java.lang.Object,java.lang.Object>,com.google.common.collect.Table<? extends java.lang.Integer,? extends java.lang.Integer,? extends java.lang.Integer>,java.lang.Object{code}
> I can't figure out how it's related, the only thing I know is it just compiles when using _release_ tag.
> This is the code causing error:
> {code:java}
> final Table<Integer, Integer, Integer> destination = HashBasedTable.create();
> final Map<Integer, Integer> source = new HashMap<>();
> // compiles
> final Table<Integer, Integer, Integer> broker =
> source.entrySet().stream().collect( Tables.toTable( e -> 0, e -> 0, e -> 0,
> ( e1, e2 ) -> null, HashBasedTable::create ) );
> destination.putAll( broker );
> // doesn't compile
> destination.putAll( source.entrySet().stream().collect( Tables.toTable( e -> 0, e -> 0,
> e -> 0, ( e1, e2 ) -> null, HashBasedTable::create ) ) );
> {code}
> Like I said, I'm not sure how it's related and I would like to focus on _release_ tag problem here. I just attached it in case of it may help you in any way.
> {color:#cccccc}Side note: please add 3.5.4 Maven version to the list of available in Jira versions. Currently it says there is no version like this.{color}
>  {color:#cccccc}After you do that, please set this bug version to 3.5.4 and delete this side note.{color}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)