Community
Participate
Working Groups
A few WTP plugins need to build with the old JDK and a WTP toolchains.xml is set up. It works fine with Maven 3.2.5 but fails with Maven 3.3.1. The current investigation showed that instead of using the WTP specific toolchains.xml which is defined in the Hudson build configuration, a common toolchains /opt/public/common/maven-toolchains.xml is linked as the user toolchains. genie.gef ~> ll ~/.m2 [....] lrwxrwxrwx 1 genie.gef tools.gef 37 23 févr. 04:05 settings.xml -> /opt/public/common/maven-settings.xml lrwxrwxrwx 1 genie.gef tools.gef 39 23 févr. 04:05 toolchains.xml -> /opt/public/common/maven-toolchains.xml I wonder how Maven 3.2.5 can pick up the customized toolchains but not 3.3.1. It would be great if Maven 3.3.1 can pick up the customized toolchains as 3.2.5. At the same time, I wonder whether the common toolchains file can be changed to support IBM JDK 1.4. Its current JDK 1.4 points to the Sun's which is broken and generates compile errors. <toolchain> <type>jdk</type> <provides> <id>J2SE-1.4</id> </provides> <configuration> <jdkHome>/shared/webtools/apps/IBMJava2-142-SR13FP10/jre</jdkHome> </configuration> </toolchain>
Try narrowing down the problem. Did you try running a build a) locally with explicit toolchains using 'mvn --toolchains /path/to/toolchains.xml' with both maven versions b) on hudson with a console step (not a maven build step) and explicit 'mvn --toolchains /path/to/toolchains.xml' with both maven versions
From the console log https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/16/consoleText, it seems that your toolchain is taken into account [INFO] o.h.m.e.h.MavenExecutionRequestHandler - Using tool-chains document ID: f1492191-c1d9-4caa-a6bf-44160486454d and it matches with you custom toolchain id. but just before, there is a warning: [WARN] o.h.m.e.EventSpyProcessor - Unhandled event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest@49b07ee3 (org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest) I would suggest to try to upgrade Hudson to its latest version. The hudson/maven integration may have been improved since then. The migration is totally transparent and we do a complete backup so we are able to restore exactly as it was before migration if anything is wrong with the new version. Do you want me to upgrade your HIPP to Hudson 3.2.2?
(In reply to Mikael Barbero from comment #2) I'm fine with the upgrade as long as it can fix the build.
(In reply to Jan Sievers from comment #1) The current WTP toolchains are defined on the Hudson build configuration. I'm not so sure what is its path on the build machine.
(In reply to Samuel Wu from comment #4) > (In reply to Jan Sievers from comment #1) > The current WTP toolchains are defined on the Hudson build configuration. > I'm not so sure what is its path on the build machine. it is in ~/.hudson/maven/documents/f1492191-c1d9-4caa-a6bf-44160486454d.xml
(In reply to Samuel Wu from comment #3) > (In reply to Mikael Barbero from comment #2) > I'm fine with the upgrade as long as it can fix the build. I'll do the upgrade now
The upgrade is now done. Could you please try your job again? Thanks.
The build is running now. My fingers are crossed.
The build failed again unfortunately.
The following mvn command was added to the build. /shared/common/apache-maven-latest/bin/mvn clean install -V -B -e -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true -Dsurefire.timeout=1800 -DskipWithIssues=false -Dmaven.repo.local=/home/hudson/genie.webtools/.hudson/jobs/WTP-R3_7_x_Maintenance_test/workspace/.maven/repo -f pom.xml -P bree-libs -P eclipse-sign -X -ff --toolchains ~/.hudson/maven/documents/f1492191-c1d9-4caa-a6bf-44160486454d.xml But it failed with the following error message [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.20.0:compile (default-compile) on project org.eclipse.wtp.releng.versionchecker: useJDK = BREE configured, but no toolchain of type 'jdk' with id 'J2SE-1.5' found. See http://maven.apache.org/guides/mini/guide-using-toolchains.html -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.20.0:compile (default-compile) on project org.eclipse.wtp.releng.versionchecker: useJDK = BREE configured, but no toolchain of type 'jdk' with id 'J2SE-1.5' found. See http://maven.apache.org/guides/mini/guide-using-toolchains.html see https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/18/ for more details.
I installed Maven 3.3.3 in /shared/common and added it to your HIPP. I started a new build (https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/20/) to see if it changes something.
https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/20/ failed with the same error as build 18. But it was running the shell command to call mvn directly. I changed it to run with the Hudson Maven 3 task and started another build https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/21/
The build failed again. https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/21/ [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.20.0:compile (default-compile) on project org.eclipse.wst.wsdl: Compilation failure: Compilation failure: [ERROR] /jobs/genie.webtools/WTP-R3_7_x_Maintenance_test/workspace/webtools.webservices/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/util/WSDLParser.java:[787] [ERROR] catch (IOException exception) [ERROR] ^^^^^^^^^^^ [ERROR] Unreachable catch block for IOException. This exception is never thrown from the try statement body
I think you should raise a bug against the Maven project as it really seems to be a regression in 3.3.x. I am for closing this bug as invalid as it is not related to HIPP configuration or infrastructure. Do you agree?
Just a thought, since Maven 3.3.3 is the latest released version maybe it's worth trying that out first before we open a bug with Maven.
(In reply to Thanh Ha from comment #15) > Just a thought, since Maven 3.3.3 is the latest released version maybe it's > worth trying that out first before we open a bug with Maven. We already did (see comment 11, 12 and 13).
(In reply to Mikael Barbero from comment #14) > I think you should raise a bug against the Maven project as it really seems > to be a regression in 3.3.x. I am for closing this bug as invalid as it is > not related to HIPP configuration or infrastructure. Do you agree? Sure, as long as the problem can be solved. But I have never opened a bug against Maven. Can you please advise how to proceed or can you please open a Maven bug since you can explain the Hudson and Maven situation better?
As you have demonstrated with your CLI tests, the issue does not seem related to hudson/maven integration. Just open a bug (https://issues.apache.org/jira/browse/MNG) stating that the use of --toolchains does not pick up the given one, but instead use the user's one.
https://issues.apache.org/jira/browse/MNG-5855 is opened
Hervé Boutemy from the Maven team suspects the user toolchain file ~/.hudson/maven/documents/f1492191-c1d9-4caa-a6bf-44160486454d.xml had the incorrect content. Please see https://issues.apache.org/jira/browse/MNG-5855 for details.
(In reply to Samuel Wu from comment #20) > Hervé Boutemy from the Maven team suspects the user toolchain file > ~/.hudson/maven/documents/f1492191-c1d9-4caa-a6bf-44160486454d.xml had the > incorrect content. Please see https://issues.apache.org/jira/browse/MNG-5855 > for details. Hervé is right. ~/.hudson/maven/documents/f1492191-c1d9-4caa-a6bf-44160486454d.xml is not a toolchains file but a Hudson document that contains a toolchains. I did not check the format before telling you to use it. I was assuming it was the toolchains file itself (facepalm). It can not be given to the --toolchain parameter. I suggest you create a toolchains.xml in your workspace with the content you desired. Do it as a shell script step. Then, call maven as you did before but by refererencing the toolchains in the working directory: --toolchains ./toolchains.xml and let see what happen. If it works, you can close the MNG-5855 as invalid and open a new one against the Hudson project to raise the issue about the error: o.h.m.e.EventSpyProcessor - Unhandled event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest , otherwise, more investigation will be required MNG-5855.
A user toolchain was created and the build was successful with the created toolchain. But build still failed with the Hudson Maven 3 build process. Bug 475732 was created as follow up at the request of Mikael Barbero.
(In reply to Samuel Wu from comment #22) > A user toolchain was created and the build was successful with the created > toolchain. But build still failed with the Hudson Maven 3 build process. Bug > 475732 was created as follow up at the request of Mikael Barbero. Thanks. I moved it to the Hudson project (you put it under Community/Hudson which is the project about Hudson instances at Eclipse.org ;)) Let's see how Hudson's committers react.
(In reply to Mikael Barbero from comment #23) Thank you, Mikael.
The following is the response from Winston Prakash CLA Friend 2015-08-26 12:35:04 EDT I'm not sure how this is an issue in Hudson. To me it looks like a build time configuration issue.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
WTP moved back to Maven 3.2.5 and remains on that level, due to this bug. If a later version of Maven respects the toolchains.xml as 3.2.5 did, then WTP can move forward (and at some point WTP will need to move forward).
WTP 3.10 is now building with Tycho 1.0, Maven 3.3.3, and I'm still seeing this: [DEBUG] Connected to remote [INFO] o.h.m.e.h.SettingsBuildingRequestHandler - Using settings document ID: e23a0b6a-ab36-4ea3-8d97-c6ce7ba3db90 [WARN] o.h.m.e.EventSpyProcessor - Unhandled event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest@53b98ff6 (org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest) [WARN] o.h.m.e.EventSpyProcessor - Unhandled event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest@53b98ff6 (org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest) [INFO] o.h.m.e.h.MavenExecutionRequestHandler - Using tool-chains document ID: f1492191-c1d9-4caa-a6bf-44160486454d Also did an experiment using Mvn 3.5, passing a toolchains file in via commandline to prove it's being respected, and it is. See bug 475732 comment 22 for details. TL;DR, I think if we use mvn 3.5 or newer (bug 528801) we should be fine. The warning is just a warning, and the correct tool-chains doc f1492191-c1d9-4caa-a6bf-44160486454d *IS* being used.
Seems like we can close this. Please re-open if I misjudged.