Java 9+ for build

31 views
Skip to first unread message

Zoran Regvart

unread,
Apr 20, 2020, 3:59:52 AM4/20/20
to Syndesis
Hi Syndesists,
new versions of BasePOM require Maven to be run in Java 9+[1], that
means that the default Java on your system needs to be Java 9 or
newer.

This doesn't affect anything other than the build environment.

I can work on getting all the build environments on at least Java 9,
most likely Java 11/14.

Does anyone see any issues with this?

zoran
[1] https://github.com/basepom/basepom/releases/tag/basepom-32
--
Zoran Regvart

Maria Arias de Reyna Dominguez

unread,
Apr 20, 2020, 4:09:01 AM4/20/20
to Zoran Regvart, Syndesis
I am comfortable with even forcing a Java 11 if needed.

Cheers!
María Arias de Reyna Domínguez

--
Senior Software Engineer

She / Her / Hers
ariasd...@redhat.com


--
You received this message because you are subscribed to the Google Groups "Syndesis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to syndesis+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/syndesis/CABD_Zr_TsL9nAc-8VicdCk9qd8C8Lth5r4KtQCx%2BpHD4Pv8LYg%40mail.gmail.com.

Pasquale Congiusti

unread,
Apr 20, 2020, 4:30:11 AM4/20/20
to Syndesis
I am good with that.

However I wonder how this would affect extensions [1]. I think we had certain constraints on it, and it would not be the best option to build syndesis with java 9 and extensions with a lower version.

Pasquale.

Zoran Regvart

unread,
Apr 20, 2020, 4:43:12 AM4/20/20
to Pasquale Congiusti, Syndesis
On Mon, Apr 20, 2020 at 10:30 AM Pasquale Congiusti <pcon...@redhat.com> wrote:
> However I wonder how this would affect extensions [1]. I think we had certain constraints on it, and it would not be the best option to build syndesis with java 9 and extensions with a lower version.

Not sure how the version we use to run Maven in the main Syndesis
repository affects the extensions. Do you see an issue I don't see?

zoran
--
Zoran Regvart

Pasquale Congiusti

unread,
Apr 20, 2020, 9:06:02 AM4/20/20
to Syndesis
No, just thinking loud, as I knew we were having some limitation on certain repos, wondering if somehow that could have some impact.

Pasquale.

Maria Arias de Reyna Dominguez

unread,
May 7, 2020, 10:01:22 AM5/7/20
to Syndesis
So, going back to https://github.com/syndesisio/syndesis/pull/8269

If someone has anything against bumping the java version, talk now (or
revert the pull request later).
> --
> You received this message because you are subscribed to the Google Groups "Syndesis" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syndesis+u...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/syndesis/2a4d319a-2d96-478f-8c29-00a3f9758a58%40googlegroups.com.

Heiko Braun

unread,
May 7, 2020, 10:15:06 AM5/7/20
to Syndesis
If possible, I would skip Java 99 and move to 11 straight away.

Heiko


On Thursday, May 7, 2020 at 4:01:22 PM UTC+2, Maria Arias de Reyna Dominguez wrote:
So, going back to https://github.com/syndesisio/syndesis/pull/8269

If someone has anything against bumping the java version, talk now (or
revert the pull request later).

On Mon, Apr 20, 2020 at 3:06 PM Pasquale Congiusti <pcon...@redhat.com> wrote:
>
> No, just thinking loud, as I knew we were having some limitation on certain repos, wondering if somehow that could have some impact.
>
> Pasquale.
>
> On Monday, April 20, 2020 at 10:43:12 AM UTC+2, Zoran Regvart wrote:
>>
>> On Mon, Apr 20, 2020 at 10:30 AM Pasquale Congiusti <pcon...@redhat.com> wrote:
>> > However I wonder how this would affect extensions [1]. I think we had certain constraints on it, and it would not be the best option to build syndesis with java 9 and extensions with a lower version.
>>
>> Not sure how the version we use to run Maven in the main Syndesis
>> repository affects the extensions. Do you see an issue I don't see?
>>
>> zoran
>> --
>> Zoran Regvart
>
> --
> You received this message because you are subscribed to the Google Groups "Syndesis" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to synd...@googlegroups.com.

Maria Arias de Reyna Dominguez

unread,
May 7, 2020, 10:36:40 AM5/7/20
to Heiko Braun, Syndesis
I don't even have java 9 on my debian repos, so going to try 11:

https://github.com/syndesisio/syndesis/issues/8422

Have a nice day!
María Arias de Reyna Domínguez

--
Senior Software Engineer

She / Her / Hers
ariasd...@redhat.com

> To unsubscribe from this group and stop receiving emails from it, send an email to syndesis+u...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/syndesis/b2a49965-7306-4eb8-bb4a-352059d44295%40googlegroups.com.

Heiko Braun

unread,
May 7, 2020, 10:59:01 AM5/7/20
to Syndesis
Java 11 will also be needed for Camel-K.

Zoran Regvart

unread,
May 7, 2020, 11:00:16 AM5/7/20
to Heiko Braun, Syndesis
On Thu, May 7, 2020 at 4:59 PM Heiko Braun <hbr...@redhat.com> wrote:
> Java 11 will also be needed for Camel-K.

This is about running Maven under Java 11

zoran
--
Zoran Regvart

pari...@redhat.com

unread,
May 7, 2020, 1:57:25 PM5/7/20
to Maria Arias de Reyna Dominguez, Syndesis
Hey Maria,

So there appears to be an issue, at least for me, in upgrading java.

I updated to java 14 ('openjdk-latest' on Fedora 30) and encountered the following error when compiling app/common/util:

[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ common-util ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 37 source files to /home/phantomjinx/programming/go/src/github.com/syndesisio/syndesis/app/common/util/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/phantomjinx/programming/go/src/github.com/syndesisio/syndesis/app/common/util/src/main/java/io/syndesis/common/util/SuppressFBWarnings.java:[18,28] cannot access java.lang.annotation.Retention
bad class file: /module/java/lang/annotation/Retention.sig
class file has wrong version 58.0, should be 53.0
Please remove or make sure it appears in the correct subdirectory of the classpath.


Note: I have already bumped oss to 32 so maven-compiler-plugin is at 3.8.1.

Next, I backed out the java 14 installation to java 11 which is the LTE version available on Fedora. This produces the same error except the wrong version is now 55.0 rather than 58.0.

So here's the problem ... Java 9 appears to be the only acceptable version (53.0) for the Retention class yet on Fedora at least java 9 is not readily available, ie. 1.8, 11 & 14.

Any ideas on how to mitigate this?

PGR

---
Paul Richardson
* p.g.ric...@redhat.com
* Ty-Carreg Barn, Penyrheol, Pontypool, Torfaen. NP4 5XZ
* (home) 01495 762483
* (mob) 07980 869490
* @enigmajx

"There is no operating system on the planet that can withstand a determined assault from a clueless
user."


--
You received this message because you are subscribed to the Google Groups "Syndesis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
syndesis+u...@googlegroups.com.
To view this discussion on the web, visit

Maria Arias de Reyna Dominguez

unread,
May 8, 2020, 2:27:43 AM5/8/20
to Paul Richardson, Syndesis
Yes, I'm finding more issues too. Maybe this was not as
straightforward as I thought :)

Maria Arias de Reyna Dominguez

unread,
May 8, 2020, 2:36:59 AM5/8/20
to Paul Richardson, Syndesis
Btw, opened an issue: https://github.com/syndesisio/syndesis/issues/8422


On Fri, May 8, 2020 at 8:27 AM Maria Arias de Reyna Dominguez

Zoran Regvart

unread,
May 8, 2020, 3:03:08 PM5/8/20
to Maria Arias de Reyna Dominguez, Paul Richardson, Syndesis
Hi all,
I'll have a fix for this soon, not sure about requiring toolchains
setup for Maven, if we don't bump the compile target to equal version
of compiler there might be linkage errors at runtime. We can discuss
bumping the runtime Java version to 11 at some point...

zoran
--
Zoran Regvart

Zoran Regvart

unread,
May 11, 2020, 3:35:27 AM5/11/20
to Maria Arias de Reyna Dominguez, Paul Richardson, Syndesis
Hi Syndesists,
small update, I've managed to make some progress on this, the
ErrorProne needed a different configuration when used on Java 11. In
fact it needed to be configured as an annotation processor in Maven
compiler plugin. From what I can see, when an annotation processor is
explicitly configured auto-discovery of annotation processors is not
performed, so each annotation processor we use needs to be explicitly
configured as well, thus far I've found: Immutables and Lombok - which
I prefer if we did not use, but that's a separate discussion.

ErrorProne also has issues when run on Java 11[1], there's an old
issue and an unmerged PR[2] to potentially fix that at ErrorProne,
I'll ping on the mailing list to see if this can be merged/fixed and
released soon. Without this fix, some (most?) ErrorProne issues result
in failure to compile with a quite ugly stacktrace[3].

I'm working towards fixing ErrorProne issues, mostly in the DV bits.

Comments?

zoran

[1] https://github.com/google/error-prone/issues/1265
[2] https://github.com/google/error-prone/pull/1473/
[3] https://gist.github.com/zregvart/019986093de6568b2a71ba9c24293ecc
--
Zoran Regvart

Zoran Regvart

unread,
May 12, 2020, 4:23:15 AM5/12/20
to Syndesis
Hi Syndesists,
I'll split this into tasks, one to clean up the ErrorProne issues in
DV and one to configure ErrorProne for Java 11. When issues occur in
ErrorProne they are a bit daunting (well, if exceptions seem
daunting), but they fail the build.

DV has toned down ErrorProne, i.e. the issues are reported only to the
console and they don't seem to be addressed. I wish to have the same
level of quality in whole of Syndesis, so I'll refactor first to meet
that.

zoran
--
Zoran Regvart

Maria Arias de Reyna Dominguez

unread,
May 12, 2020, 4:38:13 AM5/12/20
to Zoran Regvart, Syndesis
Thank you Zoran!

I have a couple of hands I can use if you want and if those tasks are
not too coupled.
> --
> You received this message because you are subscribed to the Google Groups "Syndesis" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syndesis+u...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/syndesis/CABD_Zr9znBCesq%2Brs3O2LaK5TkLaqi3frMLORL1GDs-AJOFtZw%40mail.gmail.com.
>

Zoran Regvart

unread,
May 12, 2020, 4:55:20 AM5/12/20
to Maria Arias de Reyna Dominguez, Syndesis
Hi Maria,
thanks, so I'm planning on seeing how far the autofix will get me,
I've already refactored some classes, not sure how to divy the task to
be honest, we would be bound to overlap if we're not constantly in
sync. Which might make for an interesting pairing session :)

zoran
--
Zoran Regvart

Zoran Regvart

unread,
May 13, 2020, 3:42:56 AM5/13/20
to Syndesis
Hi Syndesists,
I have the code checks passing on DV, I'm still struggling with
duplicate resources. In the DV project there's a
`application.properties` in both `src/main/resources` and
`src/test/resources` and I'd like to refactor that. I've worked on
dependency issues and added a number of exclusions/alignements.

Anyhow, the draft PR is here, feel free to take a look and comment on
things I've missed:

https://github.com/syndesisio/syndesis/pull/8452

I need to rebase it and finish with the resource checks...

zoran
--
Zoran Regvart

Zoran Regvart

unread,
May 13, 2020, 3:20:29 PM5/13/20
to Syndesis
Hi Syndesists,
the ErrorProne issue has been resolved[1], I need to test the snapshot
locally. I'm working on resolving the remaining PMD issues for[2],
hopefully by tomorrow that PR will go green. Not sure what's the
release process for ErrorProne, but if needed we can pull in the
dependency via jitpack.

zoran

[1] https://github.com/google/error-prone/pull/1613/commits/cd83ca9094ff4e9842c32d0c6d33424e479fa017
[2] https://github.com/syndesisio/syndesis/pull/8452
--
Zoran Regvart

Zoran Regvart

unread,
May 19, 2020, 8:57:02 AM5/19/20
to Syndesis
Hi Syndesists,
so quick update, I've progressed in private on the basepom upgrade and
Java 11 (for build). Being the stickler that I am this also lead to
upgrading some code checks, I'll be pushing that change to:

https://github.com/syndesisio/syndesis/pull/8269

soon, I'm down to the last few modules and I need to check if all
error prone issues are fixed, so we can work with older version on
Java 11.

Heads up, I'm also going to merge this soon:

https://github.com/syndesisio/syndesis/pull/8452

I've reached out to DV folk, they're okay with that.

zoran
--
Zoran Regvart

Zoran Regvart

unread,
May 28, 2020, 7:02:52 PM5/28/20
to Syndesis
Hi Syndesists,
quick update, I've pushed changes needed to the basepom upgrade PR[1],
I think there's a fairly good chance that it'll pass the CI checks.

That includes building ErrorProne from source using srcdeps. When
ErrorProne 2.3.5 is released and we upgrade to it the commit
968c9d636a2501e99381e71145fe2a397986392f should be reverted.

zoran
[1] https://github.com/syndesisio/syndesis/pull/8269
--
Zoran Regvart
Reply all
Reply to author
Forward
0 new messages