You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by lewismc <gi...@git.apache.org> on 2018/10/01 18:42:16 UTC
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
GitHub user lewismc opened a pull request:
https://github.com/apache/jena/pull/474
JENA-1609 Jena master does not build under JDK10
This PR addresses https://issues.apache.org/jira/browse/JENA-1609
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lewismc/jena JENA-1609
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/474.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #474
----
commit 18497eaf21f2135b4cfc07c4decc18ef7f8dc1af
Author: Lewis John McGibbney <le...@...>
Date: 2018-10-01T18:43:46Z
JENA-1609 Jena master does not build under JDK10
----
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
@rvesse - The current plugin in the build is 3.0.0. `<option>` didn't change the situation. Can you given an example or point to one? (the online plugin doc does not talk about `<option>`
Profiles: that would be great. Again, a sample to start from would help. While all the suggestions here are great, it's going to be slower if I have to carry out each one from scratch.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:
https://github.com/apache/jena/pull/474
@afs https://github.com/rvesse/airline/blob/master/pom.xml#L495-L497 which I discovered via JIRA https://issues.apache.org/jira/browse/MJAVADOC-475
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
Thanks for comments @ajs6f
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221744935
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
IMO The fix is not to use log4 directly but to use SLF4J and LogCtl because then logger can be swapped. But, for history reasons, this may not be practical. cc @rvesse
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
`10 < 11`. All these issues are in Java11 because Java 9 & 10 were the big changes and Java 11 the consolidation.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
Thats good to know @acoburn thanks for chiming in.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221884001
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
`JenaDriver` can optionally configure Log4j, this is because JDBC drivers can be used in contexts where the end user can't directly configure logging e.g. when dropped into other applications. In those contexts users can add `logging=<log4j-config>` to have the driver configure logging for them.
However the default behaviour is to not configure anything and all the code internally uses SLF4J so in environments where users can control logging configuration they are free to do that. So in environments where the user fully controls things they can configure logging as appropriate.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221785452
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
This being said, what would you rather see? This issue is titled _Jena master does not build under JDK10_ so I wonder if getting Jena to build under JDK 10 is the immediate response. Someone can then go and work on the underlying logging issue. Right now I have not investigated it enough or else I would have provided the fix.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:
https://github.com/apache/jena/pull/474
@afs For some projects where I have added JDK 9/10 support I have had to create separate profiles activated by JDK version for the Javadoc plugin because there are breaking changes between the plugin versions and supported flags for the underlying `javadoc` tool
Also if you have updated the Javadoc plugin version to a 3.x release then you need to add an `<option>` sub-element within `<additionalOptions>` rather than just specifying the options directly
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
@afs how about we propose the change to
```
<additionalOptions>-html4</additionalOptions>
```
This would produce JDK WARNING's under several environment's however would at least enable successful build under this environments.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221738972
--- Diff: jena-arq/pom.xml ---
@@ -216,6 +216,7 @@
</group>
</groups>
<bottom>Licenced under the Apache License, Version 2.0</bottom>
+ <additionalOptions>-html5</additionalOptions>
--- End diff --
This setting in the parent POM. It is commented out because the build fails with Java8.
1. Is setting in the parent enough? If it does, it is better to have in one place because ...
2. Has this PR been run with Java8? The build exits with an error in jena-iri:javadoc for me.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
@lewismc
> @afs how about we propose the change to
>
> ```
> <additionalOptions>-html4</additionalOptions>
> ```
> This would produce JDK WARNING's under several environment's however would at least enable successful build under this environments.
The problem is not html4/html5 (we can clean up the javadoc) but compatible with java8 javadoc tool. Java8 build causes:
Exit code: 1 - javadoc: error - invalid flag: -html4
I'd prefer that the build uses java8 for java8 libraries because cross-compiling does not catch changes in the runtime libraries.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221725050
--- Diff: jena-arq/pom.xml ---
@@ -216,6 +216,7 @@
</group>
</groups>
<bottom>Licenced under the Apache License, Version 2.0</bottom>
+ <additionalOptions>-html5</additionalOptions>
--- End diff --
If it is not included there is a ```WARNING``` message as follows
```
javadoc: warning - You have not specified the version of HTML to use. The default is currently HTML 4.01, but this will change to HTML5 in a future release. To suppress this warning, please specify the version of HTML used in your documentation comments and to be generated by this doclet, using the -html4 or -html5 options.
```
The -html5 additional option cleans up presence of ```WARNING```'s during Maven build.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:
https://github.com/apache/jena/pull/474
I think there is a simpler solution to this, I have Jena JDBC building locally under JDK10 and will push a new PR shortly
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222399187
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
Wrong PropertyConfigurator.java - there are two, one in log4j1 and one in log4j2 for compatibility code `log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java`.
Jena is picking up the one from log4j1. So the log4j2 dependencies aren't need but the log4j1 is. Either will do to compile but log4j1 is intended.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on the issue:
https://github.com/apache/jena/pull/474
@rvesse Yup, that's my site and every other one I know. That's not to say that this PR isn't worthwhile, just that I would certainly like to spend as much time as possible on 11, not 10.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222382699
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
Agreed. This is the behavior I get as well.
My thinking was that the dependency needed to be available at compile time as oppose to only runtime... but maybe this thinking is wrong.
The generated Javadoc look fine but the error prevents a stable build.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222233579
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
I'm unclear here. I tried with JDK10 and had to add the log4j1 dependency but not the log4j2 dependencies.
In the code I can only find imports of `org.apache.log4j`, which is log4j1, not `org.apache.logging.log4j` which is log4j2.
Elasticsearch does use log4j2 and Jena adds adapters theer for that.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
Closing in favor of #476
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
See https://builds.apache.org/view/H-L/view/Jena/job/Jena_JDK11/ which builds with -Pdev and has been running for a while. It does not build jena-jdbc or jena-elephas both of which are need looking at.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222383653
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
From what I understand, the offending class [org.apache.log4j.PropertyConfigurator](https://logging.apache.org/log4j/2.0/log4j-1.2-api/apidocs/index.html?org/apache/log4j/PropertyConfigurator.html) resides in log4j 2.0... the runtime dependencies are detailed [as follows](https://logging.apache.org/log4j/2.0/runtime-dependencies.html) with the [Maven Artifacts detailed here](https://logging.apache.org/log4j/2.0/maven-artifacts.html).
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
@rvesse grand
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221715600
--- Diff: jena-arq/pom.xml ---
@@ -216,6 +216,7 @@
</group>
</groups>
<bottom>Licenced under the Apache License, Version 2.0</bottom>
+ <additionalOptions>-html5</additionalOptions>
--- End diff --
Is this in some way needed for Java 10 builds?
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221726413
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
Because the [org.apache.log4j.PropertyConfigurator](https://github.com/apache/jena/blob/master/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/JenaDriver.java#L42) class is required in jena/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/JenaDriver.java
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221725604
--- Diff: jena-elephas/jena-elephas-mapreduce/src/main/java/org/apache/jena/hadoop/rdf/mapreduce/filter/AbstractNodeTupleFilterMapper.java ---
@@ -28,9 +28,7 @@
/**
* Abstract mapper implementation which helps in filtering tuples from the
* input, derived implementations provide an implementation of the
- * {@link #accepts(TKey, T)}
- *
- *
+ * {@link #accepts(Object, AbstractNodeTupleWritable)}
--- End diff --
I agree... it was strange when it turned out that this seemed to be the fix. Without the code augmentation, I was unable to generate the Javadocs for the project. It should be noted that Javadoc generation is activated by default during an ```install``` target.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
@afs
> The problem is not html4/html5 (we can clean up the javadoc) but compatible with java8 javadoc tool. Java8 build causes:
Got it.
> I'd prefer that the build uses java8 for java8 libraries because cross-compiling does not catch changes in the runtime libraries.
So do you want to abandon this PR and state that Jena should be used with JDK 1.8? If so I can close out this issue. Unless of course if you can propose an alternative.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
Thanks @afs I looked at the build and built locally using the following parameters
```
mvn clean verify -Pdev
```
... it results in SUCCESSFUL build.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc closed the pull request at:
https://github.com/apache/jena/pull/474
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222164161
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
Ok thanks @rvesse. The logic seems clear from what you wrote, it doesn't however take away from the fact that the codebase will not build under JDK10 (and possibly JDK9) without the presence of the log4j library containing org.apache.log4j.PropertyConfigurator as currently used within jena/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/JenaDriver.java.
The issue here is to either refactor the logging or to add the dependency... I would think there is no other scenario under consideration.
Is that a fair statement?
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222243798
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
More:
Confirmed I have only have to add a single log4j1 dependency.
The error is otherwise from the maven-javadoc-plugin, not the compiler:
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0:jar (attach-javadocs) on project jena-jdbc-driver-bundle: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - /home/afs/Jena/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/JenaDriver.java:42: error: package org.apache.log4j does not exist
[ERROR] import org.apache.log4j.PropertyConfigurator;
[ERROR] ^
[ERROR]
[ERROR] Command line was: /usr/lib/jvm/default-java/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/home/afs/Jena/jena-jdbc/jena-jdbc-driver-bundle/target/apidocs' dir.
[ERROR]
```
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221716224
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
Why are you pulling in the `log4j` API?
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221716057
--- Diff: jena-elephas/jena-elephas-mapreduce/src/main/java/org/apache/jena/hadoop/rdf/mapreduce/filter/AbstractNodeTupleFilterMapper.java ---
@@ -28,9 +28,7 @@
/**
* Abstract mapper implementation which helps in filtering tuples from the
* input, derived implementations provide an implementation of the
- * {@link #accepts(TKey, T)}
- *
- *
+ * {@link #accepts(Object, AbstractNodeTupleWritable)}
--- End diff --
This just looks wrong-- the method below clearly is `accepts(TKey key, T tuple)`, and the concrete class isn't there at all.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
I've picked out the .gitignore changes (not for `META-INF` - that's needed) and added them.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221885106
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
I think this is unnecessary, the only Log4j direct usage is to configure Log4j, the code itself always uses SLF4J for its logging
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222388084
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
This code predates Log4j 2.x so shouldn't have any dependency upon it
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by acoburn <gi...@git.apache.org>.
Github user acoburn commented on the issue:
https://github.com/apache/jena/pull/474
It is possibly worth noting here that these changes also make it possible to build Jena on JDK 11.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:
https://github.com/apache/jena/pull/474
@afs Agreed, many folks are going to migrate Java 8 -> Java 11 because of the LTS release status are are skipping interim versions
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
I'm trying to get a single build configuration for both java10 and java8.
I can't get Jena to build with java8 if `<additionalOptions>-html5</additionalOptions>` is set.
It is a problem in the full build because skipping javadoc isn't an option - the distributions include javadoc by dependency.
With java 10.0.2 (Ubuntu latest with the placeholder java11 - still waiting for real java11): jena-elephas-common fails because:
```
[ERROR] Failed to execute goal on project jena-elephas-common: Could not resolve dependencies for project org.apache.jena:jena-elephas-common:jar:3.10.0-SNAPSHOT: Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path /usr/lib/jvm/java-11-openjdk-amd64/../lib/tools.jar -> [Help 1]
```
(it also used MRUnit which is a retired project)
A pure maven build will put the java11 runtime (no tools.jar) on the compile classpath.
@lewismc - am I right in concluding it worked for you in the IDE because the java8 runtime was on the build path?
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the issue:
https://github.com/apache/jena/pull/474
I have not tried this build under JDK11 yet.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221715434
--- Diff: .gitignore ---
@@ -14,7 +14,10 @@ buildNumber.properties
.project
.settings
.recommenders
-.metadata
+.metadat
--- End diff --
Is this correct? `.metadata` => `.metadat`?
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r222164323
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
OK so we agree on this however the code doesn't build due to the missing dependency. I wasn't able to build without the additions as proposed.
---
[GitHub] jena issue #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:
https://github.com/apache/jena/pull/474
"should be used with JDK 1.8" has several facets.
There are different levels of Java11 usage: the project discussions back when it was Java9:
[dev@ message](https://lists.apache.org/thread.html/880632ba6b6df6f2b26e4357462d94426ea4b14d83f08e9edac0b684@%3Cdev.jena.apache.org%3E) and sent as part of [users@ message](https://lists.apache.org/thread.html/5b31a3b6794781f6a02658608444043b5535957a6c94f3728efd8304@%3Cusers.jena.apache.org%3E).
Ultimately, it is a community decision.
My personal opinion is that Jena should be able to run on Java8 runtime. Research projects may upgrade quickly but enterprise deployments are another matter.
To ensure no accidents, I prefer the release build used Java8 because it protects against runtime library changes (we have one currently about tools.jar).
I'd like the build to work with Java11 - hence the commented line in the parent `pom.xml` and the Jenkins job, both of which came out of the project discussions from Feb. Currently, "-Pdev" works, the full release build does not.
I have `~/.mavenrc` setup to make sure I gets builds right. I use JDK10 as the default java on my system (I am resisting installing Java11 manually and waiting for Ubuntu ... at least for now!), I make sure maven runs with Java8.
# ~/.mavenrc
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Java11 will change the ecosystem and we don't know how that plays out or what may come out of [adoptjava](https://adoptopenjdk.net/) and the Jan2019 deadline from Oracle. I think it will rapidly become clear.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221928887
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <!-- Intercept direct use of log4j2 -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
--- End diff --
Agreed - I checked using the current master branch. Only log4j1 is used (log4j::log4j).
What I am baffled by is that fact it builds with java8 and not with java10 and the failure is a dependency missing. log4j1 is a "optional" dependency in the parent.
---
[GitHub] jena pull request #474: JENA-1609 Jena master does not build under JDK10
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/474#discussion_r221745287
--- Diff: jena-jdbc/jena-jdbc-core/pom.xml ---
@@ -39,17 +39,28 @@
<version>3.10.0-SNAPSHOT</version>
</dependency>
- <!-- Jena Driver configures Log4j directly -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ <!-- Jena Driver configures Log4j directly -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
--- End diff --
Yup. We may have to do something like this, but it's definitely "papering-over" the underlying fault.
---