-
Notifications
You must be signed in to change notification settings - Fork 132
Maven build fails on the nightly testing (basically build fails) #1204
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
Comments
@wimjongman I still havn't found out what is the problem. Can you take a look please :-) |
Sure, let me take a look. |
The build is fine but the test is failing. Only issue555 test is success.
|
Thanks @wimjongman |
@wimjongman Any ideas what could be the root cause? |
I had the idea to create a class that imports all the packages (needed to turn off organize imports) that had been removed and now the build fires :-)
|
I still have a problem that the indexer kicks in to soon and doesn't kick in anymore after this. |
I moved the registration of the listeners forwards and ow it seems the library is added but the indexer (or is it the build) crashes again due to missing CBuildConsole |
I'm doing this because it seems like the listeners are not triggered when running in maven. Now they are but the indexer seems to fail on the second run
I have updated the pom to include the latest eclipse version. Also updated Tycho to 2.0.0. Everything builds fine on my machine. Travis is now building. |
@wimjongman FYI I have been doing contributions to CDT10 and I want to make a new release "soon" So I want to move to CDT10 and JAVA 11 Thanks again |
I succeeded the build to be with Tycho 2.0, java 11 (source and target) and CDT 10 Because the indexer hits in to early (or any other reason) it can be that the first build fails. Then the indexer should find "unresolved headers" resulting in the Sloeber listener to add arduino libraries that satisfy the headers. Hopefully the next build done in the test is successful (max 3 tries now). |
I never see this error "Workbench has not been created yet". Where do you see this? In what bundle is the index listener? |
I see it in ...\git\arduino-eclipse-plugin\io.sloeber.tests\target\work\data.metadata.log
The listener gets registered in
|
I guess you have to pull first: |
This error "workbench is not created yet" indicates that UI components are used. Specifically PlatformUI.getWorkbench(). UI components are not allowed in a headless JUnit test. The core Activator is an AbstractUIPlugin. It can only be loaded after the UI was created. When I run the build on my machine, it ends without issues. I cannot get to the Travis log file because there is no filesystem in Travis. Do you know how to access it? |
I get the "workbench is not created yet" in my windows maven build |
Please attach that log here. |
There is a .log in the original post |
I have filed a CDT issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=566953 However, we are not out of the woods here. Despite its name, io.sloeber.core is importing ui bundles. This is not correct. All classes that reference the UI should go to io.sloeber.ui. Let's see what the CDT folks have to say and then we continue from there. |
Where is that "Shared" class. Is this new stuff? |
You mean this? https://github.com/Sloeber/arduino-eclipse-plugin/blob/master/io.sloeber.tests/src/io/sloeber/core/Shared.java |
With the change as Jonah proposed I no longer have errors in the log file |
I have removed the failing test from the nightly test. |
Al seems fine now in git branch master (didn't test linux yet) but .... In a nutshell: How come I didn't have the make issue with a jenkins maven project? |
Before anyone tells me to install make .... |
So I tried with the jdk you proposed.
|
Here is the content of my current config.xml (seems I can not attach files of type xml so I renamed to txt) |
Tycho 2.0.0 requires maven 3.6.3 or higher. Is that what you use?
|
I see that it fails on io.sloeber.core.NightlyJenkins The test plugin depends on sloeber.ui and sloeber.ui depends on eclipse.ui. The test is ran with the headless surefire application. This means that there is no ui available. By the way, your jenkins build now runs (until it starts the unit tests). |
Great |
I created a new project and then looked at what was different from yours. Your project had checked a bunch of maven option in the config. I unchecked them all and then it worked. |
I feel stupid now :-( |
Thanks @wimjongman for helping me out. What I think is the root cause of the misery here -apart of my entry level skills in this area- is that oracle java changed it's policy to having to sign papers which means the autoinstall for java 11 is not available in Jenkins So I think I got lost in java providers combined with "incompatible system settings" Then Wim proposed using openJ9 11.08+10 by letting Jenkins install it I didn't get that to work and then Wim proposed to go and take a look on the server. (Thanks again Wiim) It looked as if Wim got things going untill the nightly tests failing to create projects. but that was not really what was going on. A build command had been added to the pre-build actions and that worked fine because it uses the JAVA_HOME environment var that was set to a java that worked. -I'm not saying wim didn't do anything, I'm just saying Wim got things back rolling but it wasn't rolling yet as wanted- Because of "it for sure should work" extra energy boost I started searching again. The first thing I found out is that the openJ9 11.08+10 installed by Jenkins results in the error
Basically because -as I found out during this writing- there is another subfolder between jdk11_van_wim and bin which should be added in the config :-( And with this change we get back to make not found. But the jenkins install openJ9 11.08+10 works now If anyone knows a zip to download make for linux, or other manual make installs, please please let me know. |
Managers summary: I got make to work, I think qnap removed make After trying to find a make (tried to compile make but didn't have gcc :-( ) I went back to entware (with is a package manager installable on qnap) reinstalled make and was back to the jenkins build fail issue |
During all the searching to get Jenkins back to work I noticed that the examples project creation do not add the library to the project where it did do so. |
That is the creation of a project based on a library example should also link in the library
Now the libraries are correctly added to the project at creation time the test run successful in maven build. |
Since accepting pull request #1201 the nightly testing fails in maven.
When run from inside eclipse the testing is successful.
The maven fails on my windows system, on travis https://travis-ci.org/github/Sloeber/arduino-eclipse-plugin and on my jenkins build server (linux).
Looking -on my windows system- at the log of the workspace C:\Users\jan\git\arduino-eclipse-plugin\io.sloeber.tests\target\work\data.metadata.log (attached to this issue)
I see following errors
and then later
So it looks as if org.eclipse.cdt.ui can not be loaded because org.eclipse.cdt.internal.ui.buildconsole.CBuildConsole can not be loaded.
org.eclipse.cdt.internal.ui.buildconsole.CBuildConsole is part of the package org.eclipse.cdt.internal.ui.buildconsole of the plugin org.eclipse.cdt.ui
org.eclipse.cdt.ui has always been a required plugin for io.sloeber.core. I added org.eclipse.cdt.internal.ui.buildconsole to the imported packages but to no avail.
I fail to find clues in the content of the pull request.
I have no clue how to further investigate/progress this issue
.log
The text was updated successfully, but these errors were encountered: