You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Yunhui Han <la...@gmail.com> on 2021/02/03 09:12:42 UTC
Flink Compile Error Static methods in interface require -target:jvm-1.8
Hi, all
I want to upgrade my flink to 1.12.0. I used the new API for watermark.
[image: image.png]
I got an error when I compiled my jar.
[image: image.png]
My pom file content is this.
[image: image.png]
[image: image.png]
My JDK version is this.
[image: image.png]
Can anyone help me with this?
Sincerely
Re: Flink Compile Error Static methods in interface require -target:jvm-1.8
Posted by Yunhui Han <la...@gmail.com>.
I solved the problem with the configuration below. Thank you Chesnay
Schepler.
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<args>
<arg>-target:jvm-${target.java.version}</arg>
</args>
</configuration>
</plugin>
On Wed, Feb 3, 2021 at 6:10 PM Yunhui Han <la...@gmail.com> wrote:
> Thanks, Chesnay Schepler.
>
> Could you please show me an example of scala-maven-plugin configuration?
>
>
> On Wed, Feb 3, 2021 at 5:26 PM Chesnay Schepler <ch...@apache.org>
> wrote:
>
>> You have to configure the scala-maven-plugin to compile to java 8.
>>
>> Add this to the configuration of the plugin:
>>
>> <arg>-target:jvm-${target.java.version}</arg>
>>
>>
>> On 2/3/2021 10:12 AM, Yunhui Han wrote:
>>
>> Hi, all
>>
>> I want to upgrade my flink to 1.12.0. I used the new API for watermark.
>>
>> [image: image.png]
>>
>> I got an error when I compiled my jar.
>>
>> [image: image.png]
>>
>> My pom file content is this.
>> [image: image.png]
>> [image: image.png]
>>
>> My JDK version is this.
>> [image: image.png]
>>
>> Can anyone help me with this?
>>
>> Sincerely
>>
>>
>>
Re: Flink Compile Error Static methods in interface require -target:jvm-1.8
Posted by Yunhui Han <la...@gmail.com>.
Thanks, Chesnay Schepler.
Could you please show me an example of scala-maven-plugin configuration?
On Wed, Feb 3, 2021 at 5:26 PM Chesnay Schepler <ch...@apache.org> wrote:
> You have to configure the scala-maven-plugin to compile to java 8.
>
> Add this to the configuration of the plugin:
>
> <arg>-target:jvm-${target.java.version}</arg>
>
>
> On 2/3/2021 10:12 AM, Yunhui Han wrote:
>
> Hi, all
>
> I want to upgrade my flink to 1.12.0. I used the new API for watermark.
>
> [image: image.png]
>
> I got an error when I compiled my jar.
>
> [image: image.png]
>
> My pom file content is this.
> [image: image.png]
> [image: image.png]
>
> My JDK version is this.
> [image: image.png]
>
> Can anyone help me with this?
>
> Sincerely
>
>
>
Re: Flink Compile Error Static methods in interface require
-target:jvm-1.8
Posted by Chesnay Schepler <ch...@apache.org>.
You have to configure the scala-maven-plugin to compile to java 8.
Add this to the configuration of the plugin:
<arg>-target:jvm-${target.java.version}</arg>
On 2/3/2021 10:12 AM, Yunhui Han wrote:
> Hi, all
>
> I want to upgrade my flink to 1.12.0. I used the new API for watermark.
>
> image.png
>
> I got an error when I compiled my jar.
>
> image.png
>
> My pom file content is this.
> image.png
> image.png
>
> My JDK version is this.
> image.png
>
> Can anyone help me with this?
>
> Sincerely
>