Skip to content
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

Get Java11 compatible #127 #128

Merged
merged 8 commits into from Feb 25, 2019
Merged

Get Java11 compatible #127 #128

merged 8 commits into from Feb 25, 2019

Conversation

EugenMayer
Copy link
Member

  • upgrade gradle to 5.2.2 and remove gradle install wrapper task, it is
  • all tests are good (macosx and linux)
  • also officeconverter does run with jodconverter on java11

@sbraconnier
Copy link
Member

Isn't it an upgrade to gradle 5.2.1 instead ?

@EugenMayer
Copy link
Member Author

Yes sorry, mixed it up its 5.1.2
I also upgraded spring-boot to 2.1.2.RELEASE due to some adjustments there for j11 - right now failing to build due to javadoc

javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jodconverter-samples:jodconverter-sample-spring-boot:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/tmp/jodconverter/jodconverter-samples/jodconverter-sample-spring-boot/build/tmp/javadoc/javadoc.options'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

My tests are yet not representative, i had them run on 1.8 - testing 11.0 now

Copy link

@sepe81 sepe81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix the commit message for 0d4d3e9

Upgrade gradle to 5.2.1 and remove gradle install wrapper task

@EugenMayer
Copy link
Member Author

The javadoc issue is probably related to https://bugs.openjdk.java.net/browse/JDK-8212233

@sepe81 we could just squash the whole PR later one and reduce it just to "j11 upgrade", or do you really want me to rebase that one commit?

@EugenMayer
Copy link
Member Author

Ok tests are ok on 1.8 with gradle 5.1.2 but failing with java11

all 27 cli tests are failing

org.jodconverter.cli.ConvertTest > classMethod FAILED
    org.mockito.exceptions.base.MockitoException at ConvertTest.java:58
        Caused by: java.lang.UnsupportedOperationException at ConvertTest.java:58
            Caused by: java.lang.IllegalStateException
                Caused by: java.lang.NoSuchMethodException

Seems like this is probably a mockito issue, which is stuck at 2.9.0 because of powermockitio

// Latest version -> https://mvnrepository.com/artifact/org.mockito/mockito-core
// 2.9.0 is the latest version compatible powermock version 1.7.3 so we must
// override the version provided by spring boot (see gradle/java-projects.gradle).
// See https://stackoverflow.com/questions/47240116/mockito-and-powermockito-error
 mockito_version : '2.9.0',

Not worked at all at powermockito, any comments?

@sepe81
Copy link

sepe81 commented Feb 14, 2019

@EugenMayer Squashing later seems fine. 👍

Additionally I found a related open issue/suggestion for gradle: gradle/gradle#8267

@EugenMayer
Copy link
Member Author

EugenMayer commented Feb 14, 2019

travis
move travis to openjdk11 but i probably would suggest doing a matrix build for the lowest version we would aim to, so jdk8 too? Thoughts?

Not sure https://docs.travis-ci.com/user/build-matrix/ is available for jdk though yet -> they are https://docs.travis-ci.com/user/languages/java/#build-matrix

appveyor
Did not go to fix appveyor though - not sure how to do this best, would leave that to you guys
By the way i think https://github.com/sbraconnier/jodconverter/blob/master/appveyor.yml#L27

is wrong nodways since we have .//build.gradle: baselineJavaVersion = JavaVersion.VERSION_1_8

@sepe81
Copy link

sepe81 commented Feb 14, 2019

@EugenMayer Maybe https://stackoverflow.com/a/34874587 helps as a workaround for the javadoc problem?

@EugenMayer
Copy link
Member Author

@sepe81 @sbraconnier is

subprojects {
    tasks.withType(Javadoc).all { enabled = false }
}

really what we want, i mean in terms do we want to disable those?

@EugenMayer
Copy link
Member Author

Ok tests are failing properly now and reflect my javadoc issue, thats good :)

@sepe81
Copy link

sepe81 commented Feb 14, 2019

really what we want, i mean in terms do we want to disable those?

@EugenMayer As I wrote -- it's just a workaround, maybe till there is a real solution for gradle with Java 11

@coveralls
Copy link

coveralls commented Feb 14, 2019

Coverage Status

Coverage remained the same at 94.008% when pulling 9c2347a on EugenMayer:feature/java-11-compat into bab3340 on sbraconnier:master.

@EugenMayer
Copy link
Member Author

@sepe81 https://stackoverflow.com/a/34874587 would work, but i guess that is not want is wanted - i need some more details of @sbraconnier on this.

Still the cli tests are failing, are you both interested in working on this in general?

@sbraconnier
Copy link
Member

Wow thanks for all the good work! I won't be able to check this until next week but I definitely want to get Java 11 compatibility! I'll get back to you.

.travis.yml Outdated Show resolved Hide resolved
@sbraconnier sbraconnier merged commit 9c2347a into jodconverter:master Feb 25, 2019
@sbraconnier
Copy link
Member

sbraconnier commented Feb 25, 2019

I finally had time to work on this! To summarize, I updated the PowerMock library, I changed the javadoc options in the gradle/java-projects.gradle file (to check the current java version) and I added the -x javadoc switch in the .travis.yml file to skip the javadoc task when building using java11.

Thanks for your contribution!!

@EugenMayer
Copy link
Member Author

Thank you for your hard work once again!

@EugenMayer
Copy link
Member Author

@sbraconnier just wanted to confirm that my j11 based builds are working now ( at https://github.com/EugenMayer/docker-image-jodconverter ) so it actually worked out well :)

@sbraconnier
Copy link
Member

Glad to hear that!! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants