-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infrastructure improvements - Migration to Java 11 from Java 8 #368
base: jena4-upgrade
Are you sure you want to change the base?
Infrastructure improvements - Migration to Java 11 from Java 8 #368
Conversation
java 8. It will abort the compilation if the Java context is version 8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michel-heon please remove Vitro version changes from pom files. It is not related to the PR scope and can cause merge conflicts in future.
return to 1.13.1
Return to 1.13.1
Return to 1.13.1
Return 1.13.1
Return 1.13.1
Return 1.13.1
@litvinovg The return to 1.13.1 is done.... but this version corresponds to the previous sprint and is not representative of the evolution of development. This version misalignment may lead to misunderstandings about the evolution of the development. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to try it out on some OS where Java 8 was installed by default. I tried Centos 7.
But the response I received after building it with Java 8 was confusing. It wasn't about Java requirement, it was about new dependency on maven-antrun-plugin that is not provided with default (3.0.5) maven version on Centos 7.
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (echo-properties) on project vitro-api: The plugin org.apache.maven.plugins:maven-antrun-plugin:3.1.0 requires Maven version 3.2.5 -> [Help 1]
So I had to install new version manually and finally got error that Java 11 is required.
Adding new dependency (maven-antrun-plugin) at this point doesn't look like good to me as it hides the real problem (Java version requirement).
Also I don't think there is a sense to have the test as it is already specified by maven compiler release setting.
So I suggest to open an issue about properties display in and discuss it there.
For the issue this ticket should resolve I suggest removing maven-antrun-plugin and the test.
fixed message printing bugs on previous version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michel-heon please check my suggestions/comments
@Test | ||
public void test() { | ||
String value = "This code is compiled in Java 11"; | ||
System.out.println(value.isBlank()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. Maybe this might be useful - https://stackoverflow.com/questions/14572287/testing-different-java-versions-in-junit#answer-14573109
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chenejac
This class uses a method (isBlank()) which is available only in JAVA 11. In java 8 the compilation sends an incompatibility message on the method.
The stackoverfow proposal is also very good. You just have to locate the right class to implement it. Do you have any suggestion ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need a test for that. I would suggest to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question is in which scenario someone can run tests using JDK 8, when we are requesting 11 in pom.xml file. It is of course possible, but completely out of VIVO installation/building procedure, should we take care in that case? Anyway, if some test is needed, it shouldn't just print some message, we need assertion (probably in this case assertFalse(value.isBlank()), but not sure what will happen in JDK 1.8 case).
No comment Co-authored-by: Dragan Ivanovic <[email protected]>
See also vivo-project/VIVO#3836 for documentation
@chenejac