You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2018/02/02 18:02:59 UTC

Building with Java9

JENA-1475

I've managed to the build working with java9, outputting java8 
compatible classes.

PR#350.
https://github.com/apache/jena/pull/350

This is using Apache parent v18 (so not JENA-1474)

but

1/ -Pdev build

Works:

   mvn clean install -Pdev

because it sets -Dmaven.javadoc.skip=true

2/Full build, jaavdoc

javadoc fails at jena-core (despite it compiled). The problem is 
java.xml.bind - it looks to me like the javadoc is running in "java9" 
mode and I haven't found out how to override that.

3/ Full build, no javadoc

   mvn clean install -Dmaven.javadoc.skip=true

runs until jena-elephas-common.

[ERROR] Failed to execute goal on project jena-elephas-common:
Could not resolve dependencies for project 
org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path 
/usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]

which comes from

[INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
[INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
[INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system

     Andy


Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.
Thanks for finding that out. Some trickery to get a java8 tools.jar 
available might work but would be awfully unstable, needing path names.

     Andy

Warning - switching build for java9, not just build with java9 for 
java8, crashed Eclipse for me in such a way I had to delete the 
workspace and rebuild but I had been chopping and changing git branches 
and java versions so not entirely fair.

On 03/02/18 09:17, Lorenz B. wrote:
> The Hadoop libs, even the latest major release version 3.0.0, are still
> based on Java 7 resp. Java 8, see [1]
> 
> Thus, it could be a blocker.
> 
> 
> Cheers,
> 
> Lorenz
> 
> 
> [1]
> http://central.maven.org/maven2/org/apache/hadoop/hadoop-annotations/3.0.0/hadoop-annotations-3.0.0.pom
> 
> 
> On 02.02.2018 19:02, Andy Seaborne wrote:
>> JENA-1475
>>
>> I've managed to the build working with java9, outputting java8
>> compatible classes.
>>
>> PR#350.
>> https://github.com/apache/jena/pull/350
>>
>> This is using Apache parent v18 (so not JENA-1474)
>>
>> but
>>
>> 1/ -Pdev build
>>
>> Works:
>>
>>    mvn clean install -Pdev
>>
>> because it sets -Dmaven.javadoc.skip=true
>>
>> 2/Full build, jaavdoc
>>
>> javadoc fails at jena-core (despite it compiled). The problem is
>> java.xml.bind - it looks to me like the javadoc is running in "java9"
>> mode and I haven't found out how to override that.
>>
>> 3/ Full build, no javadoc
>>
>>    mvn clean install -Dmaven.javadoc.skip=true
>>
>> runs until jena-elephas-common.
>>
>> [ERROR] Failed to execute goal on project jena-elephas-common:
>> Could not resolve dependencies for project
>> org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
>> Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path
>> /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]
>>
>> which comes from
>>
>> [INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
>> [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
>> [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
>>
>>      Andy
>>
> 

Re: Building with Java9

Posted by "Lorenz B." <co...@googlemail.com>.
The Hadoop libs, even the latest major release version 3.0.0, are still
based on Java 7 resp. Java 8, see [1]

Thus, it could be a blocker.


Cheers,

Lorenz


[1]
http://central.maven.org/maven2/org/apache/hadoop/hadoop-annotations/3.0.0/hadoop-annotations-3.0.0.pom


On 02.02.2018 19:02, Andy Seaborne wrote:
> JENA-1475
>
> I've managed to the build working with java9, outputting java8
> compatible classes.
>
> PR#350.
> https://github.com/apache/jena/pull/350
>
> This is using Apache parent v18 (so not JENA-1474)
>
> but
>
> 1/ -Pdev build
>
> Works:
>
>   mvn clean install -Pdev
>
> because it sets -Dmaven.javadoc.skip=true
>
> 2/Full build, jaavdoc
>
> javadoc fails at jena-core (despite it compiled). The problem is
> java.xml.bind - it looks to me like the javadoc is running in "java9"
> mode and I haven't found out how to override that.
>
> 3/ Full build, no javadoc
>
>   mvn clean install -Dmaven.javadoc.skip=true
>
> runs until jena-elephas-common.
>
> [ERROR] Failed to execute goal on project jena-elephas-common:
> Could not resolve dependencies for project
> org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
> Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path
> /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]
>
> which comes from
>
> [INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
> [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
> [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
>
>     Andy
>


Re: Building with Java9

Posted by ajs6f <aj...@apache.org>.
Nope, not using anything from Java 9, myself.

But I haven't looked that carefully at library changes. (I am looking forward to private members on interfaces.) I don't personally know anyone using Jigsaw (the new module system), and to my (low level of) understanding, it isn't really meant for applications (at least not yet), it's meant to modularize the Java platform itself. When I need an application modularity framework right now, I'm still using the tried-and-true OSGi.

Lorenz, are you hinting at the possibility that we just go from LTS to LTS? Because that has crossed my mind...

ajs6f

> On Feb 6, 2018, at 2:57 AM, Lorenz B. <co...@googlemail.com> wrote:
> 
> Well, I read about this some time ago and was wondering how many people
> are really aware of the fact that no more security updates will be
> delivered 6 month after the release of a new version. Most people in our
> group are still working on Java 8, if not necessary probably nobody here
> will upgrade until the next LTS.
> 
> Is anybody of you using features from Java 9? The only things that I
> find interesting are some extended Stream functions like takeWhile,
> dropWhile, etc. Who is using the modularity feature?
> 
> 
> Cheers,
> 
> Lorenz
> 
> 
> On 05.02.2018 17:41, ajs6f wrote:
>> Ditto (haven't been paying much attention).
>> 
>> A six month cycle is pretty fast, in some ways. At least it will be if we have to do a lot of work for each version.
>> 
>> ajs6f
>> 
>>> On Feb 5, 2018, at 11:34 AM, Andy Seaborne <an...@apache.org> wrote:
>>> 
>>> I hadn't grok'ed (or, to be honest, paid attention to) the details:
>>> 
>>> http://blog.joda.org/2018/02/java-9-has-six-weeks-to-live.html
>>> 
>>> Java 8 LTS -> Java 11 LTS (Sep 2018)
>>> 
>>> then only four months until end of LTS for Java8.
>>> 
>>>   Andy
> 


Re: Building with Java9

Posted by "Lorenz B." <co...@googlemail.com>.
Well, I read about this some time ago and was wondering how many people
are really aware of the fact that no more security updates will be
delivered 6 month after the release of a new version. Most people in our
group are still working on Java 8, if not necessary probably nobody here
will upgrade until the next LTS.

Is anybody of you using features from Java 9? The only things that I
find interesting are some extended Stream functions like takeWhile,
dropWhile, etc. Who is using the modularity feature?


Cheers,

Lorenz


On 05.02.2018 17:41, ajs6f wrote:
> Ditto (haven't been paying much attention).
>
> A six month cycle is pretty fast, in some ways. At least it will be if we have to do a lot of work for each version.
>
> ajs6f
>
>> On Feb 5, 2018, at 11:34 AM, Andy Seaborne <an...@apache.org> wrote:
>>
>> I hadn't grok'ed (or, to be honest, paid attention to) the details:
>>
>> http://blog.joda.org/2018/02/java-9-has-six-weeks-to-live.html
>>
>> Java 8 LTS -> Java 11 LTS (Sep 2018)
>>
>> then only four months until end of LTS for Java8.
>>
>>    Andy


Re: Building with Java9

Posted by ajs6f <aj...@apache.org>.
Ditto (haven't been paying much attention).

A six month cycle is pretty fast, in some ways. At least it will be if we have to do a lot of work for each version.

ajs6f

> On Feb 5, 2018, at 11:34 AM, Andy Seaborne <an...@apache.org> wrote:
> 
> I hadn't grok'ed (or, to be honest, paid attention to) the details:
> 
> http://blog.joda.org/2018/02/java-9-has-six-weeks-to-live.html
> 
> Java 8 LTS -> Java 11 LTS (Sep 2018)
> 
> then only four months until end of LTS for Java8.
> 
>    Andy


Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.
I hadn't grok'ed (or, to be honest, paid attention to) the details:

http://blog.joda.org/2018/02/java-9-has-six-weeks-to-live.html

Java 8 LTS -> Java 11 LTS (Sep 2018)

then only four months until end of LTS for Java8.

     Andy

Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.

On 02/02/18 18:02, Andy Seaborne wrote:
> 2/Full build, jaavdoc
> 
> javadoc fails at jena-core (despite it compiled). The problem is 
> java.xml.bind - it looks to me like the javadoc is running in "java9" 
> mode and I haven't found out how to override that.

java.xml.bind is not an available module by default in Java SE at Java9.

Solution: replace usage with commons-codec.  That should fix the javadoc 
issue.

JENA-1476.

Then the javadoc generator is more picky and a bunch of WARNINGs so 
there's javadoc to clean up - the ones I looked at were bare use of < and >.

     Andy

Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.
Fixed, and in case you come across this in other situations:

maven-plugin-javadoc now ignores <additionalparam>

Instead, there is <doclint>.

This does not seem to be mentioned anywhere, at least I could not find 
except buried deep inside JIRA.

https://issues.apache.org/jira/browse/MJAVADOC-511

I don't understand why locally I don't get javadoc errors when running 
locally, but they do occur on Jenkins.

The only differences between ASF Jenkins and my local machine that might 
be relevant is that I run OpenJDK and our Jenkins jobs run Oracle JDK 
(OpenJDK is available though it lags and has less slave availability).

     Andy

<additionalparam>-Xdoclint:none</additionalparam>
==>
<doclint>none</doclint>



On 08/02/18 17:09, Andy Seaborne wrote:
> Done, Elephas has an override for surefire (see other email).
> 
> The build-java9 job has been re-activated and set to run once a day.
> 
> It runs "mvn clean verify -Pdev" (no javadoc).
> 
> Elsewhere, the normal development build test is unhappy about javadoc in 
> jena-iri (no source changes).  But it is fine on my machine - same 
> javadoc-plugin (different java8).  There may be some noise of failing 
> jobs while I try different versions.
> 
> [ERROR] 
> /home/jenkins/jenkins-slave/workspace/Jena_Development_Test/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java:559: 
> warning: no @return
> [ERROR] public boolean isError(int code) {
> [ERROR] ^
> 
> which is accurate but doclint is "none".
> 
> I don't fancy fixing up all javadoc to get it through java8!
> 
>      Andy

Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.
Done, Elephas has an override for surefire (see other email).

The build-java9 job has been re-activated and set to run once a day.

It runs "mvn clean verify -Pdev" (no javadoc).

Elsewhere, the normal development build test is unhappy about javadoc in 
jena-iri (no source changes).  But it is fine on my machine - same 
javadoc-plugin (different java8).  There may be some noise of failing 
jobs while I try different versions.

[ERROR] 
/home/jenkins/jenkins-slave/workspace/Jena_Development_Test/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java:559: 
warning: no @return
[ERROR] public boolean isError(int code) {
[ERROR] ^

which is accurate but doclint is "none".

I don't fancy fixing up all javadoc to get it through java8!

     Andy

Re: Building with Java9

Posted by ajs6f <aj...@apache.org>.
Works for me. I think it's good to take as many steps as we can to do this (= make each one as small as we can).

ajs6f

> On Feb 6, 2018, at 8:00 AM, Andy Seaborne <an...@apache.org> wrote:
> 
> Would there be any problems if the plugin settings for a building wither Java9 were put into master? (not building _for_ java9).
> 
> One thing needed is a minimum version of maven of 3.5.0 (3.5.2 is the current latest).
> 
> If that's OK, the Jenkins job can be activated to build for java8 with java9 for the -Pdev build to ensure no bad stuff gets in.
> 
>    Andy
> 
> On 02/02/18 18:02, Andy Seaborne wrote:
>> JENA-1475
>> I've managed to the build working with java9, outputting java8 compatible classes.
>> PR#350.
>> https://github.com/apache/jena/pull/350
>> This is using Apache parent v18 (so not JENA-1474)
>> but
>> 1/ -Pdev build
>> Works:
>>   mvn clean install -Pdev
>> because it sets -Dmaven.javadoc.skip=true
>> 2/Full build, jaavdoc
>> javadoc fails at jena-core (despite it compiled). The problem is java.xml.bind - it looks to me like the javadoc is running in "java9" mode and I haven't found out how to override that.
>> 3/ Full build, no javadoc
>>   mvn clean install -Dmaven.javadoc.skip=true
>> runs until jena-elephas-common.
>> [ERROR] Failed to execute goal on project jena-elephas-common:
>> Could not resolve dependencies for project org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
>> Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]
>> which comes from
>> [INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
>> [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
>> [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
>>     Andy


Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.
Would there be any problems if the plugin settings for a building wither 
Java9 were put into master? (not building _for_ java9).

One thing needed is a minimum version of maven of 3.5.0 (3.5.2 is the 
current latest).

If that's OK, the Jenkins job can be activated to build for java8 with 
java9 for the -Pdev build to ensure no bad stuff gets in.

     Andy

On 02/02/18 18:02, Andy Seaborne wrote:
> JENA-1475
> 
> I've managed to the build working with java9, outputting java8 
> compatible classes.
> 
> PR#350.
> https://github.com/apache/jena/pull/350
> 
> This is using Apache parent v18 (so not JENA-1474)
> 
> but
> 
> 1/ -Pdev build
> 
> Works:
> 
>    mvn clean install -Pdev
> 
> because it sets -Dmaven.javadoc.skip=true
> 
> 2/Full build, jaavdoc
> 
> javadoc fails at jena-core (despite it compiled). The problem is 
> java.xml.bind - it looks to me like the javadoc is running in "java9" 
> mode and I haven't found out how to override that.
> 
> 3/ Full build, no javadoc
> 
>    mvn clean install -Dmaven.javadoc.skip=true
> 
> runs until jena-elephas-common.
> 
> [ERROR] Failed to execute goal on project jena-elephas-common:
> Could not resolve dependencies for project 
> org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
> Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path 
> /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]
> 
> which comes from
> 
> [INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
> [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
> [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
> 
>      Andy
> 

Re: Building with Java9

Posted by Andy Seaborne <an...@apache.org>.
I'm not sure how that helps:

[INFO] org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT
[INFO] +- org.apache.hadoop:hadoop-common:jar:2.7.0:provided
[INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.7.0:provided
[INFO] |  |  \- jdk.tools:jdk.tools:jar:1.8:system

It still depends on a jdk.tools:jdk.tools:jar

     Andy

On 06/02/18 09:54, Rob Vesse wrote:
> It may be worth bumping the default HDFS version to 2.7.0 as that is the most prevalent in the popular distributions currently
> 
> Rob
> 
> On 02/02/2018, 18:03, "Andy Seaborne" <an...@apache.org> wrote:
> 
>      JENA-1475
>      
>      I've managed to the build working with java9, outputting java8
>      compatible classes.
>      
>      PR#350.
>      https://github.com/apache/jena/pull/350
>      
>      This is using Apache parent v18 (so not JENA-1474)
>      
>      but
>      
>      1/ -Pdev build
>      
>      Works:
>      
>         mvn clean install -Pdev
>      
>      because it sets -Dmaven.javadoc.skip=true
>      
>      2/Full build, jaavdoc
>      
>      javadoc fails at jena-core (despite it compiled). The problem is
>      java.xml.bind - it looks to me like the javadoc is running in "java9"
>      mode and I haven't found out how to override that.
>      
>      3/ Full build, no javadoc
>      
>         mvn clean install -Dmaven.javadoc.skip=true
>      
>      runs until jena-elephas-common.
>      
>      [ERROR] Failed to execute goal on project jena-elephas-common:
>      Could not resolve dependencies for project
>      org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
>      Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path
>      /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]
>      
>      which comes from
>      
>      [INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
>      [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
>      [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
>      
>           Andy
>      
>      
> 
> 
> 
> 

Re: Building with Java9

Posted by Rob Vesse <rv...@dotnetrdf.org>.
It may be worth bumping the default HDFS version to 2.7.0 as that is the most prevalent in the popular distributions currently

Rob

On 02/02/2018, 18:03, "Andy Seaborne" <an...@apache.org> wrote:

    JENA-1475
    
    I've managed to the build working with java9, outputting java8 
    compatible classes.
    
    PR#350.
    https://github.com/apache/jena/pull/350
    
    This is using Apache parent v18 (so not JENA-1474)
    
    but
    
    1/ -Pdev build
    
    Works:
    
       mvn clean install -Pdev
    
    because it sets -Dmaven.javadoc.skip=true
    
    2/Full build, jaavdoc
    
    javadoc fails at jena-core (despite it compiled). The problem is 
    java.xml.bind - it looks to me like the javadoc is running in "java9" 
    mode and I haven't found out how to override that.
    
    3/ Full build, no javadoc
    
       mvn clean install -Dmaven.javadoc.skip=true
    
    runs until jena-elephas-common.
    
    [ERROR] Failed to execute goal on project jena-elephas-common:
    Could not resolve dependencies for project 
    org.apache.jena:jena-elephas-common:jar:3.7.0-SNAPSHOT:
    Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path 
    /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]
    
    which comes from
    
    [INFO] +- org.apache.hadoop:hadoop-common:jar:2.6.0:provided
    [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0:provided
    [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
    
         Andy