Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] WTP build failed to compile with latest Maven

From: cbi-dev-bounces@xxxxxxxxxxx [mailto:cbi-dev-bounces@xxxxxxxxxxx] On Behalf Of Samuel Wu
Sent: Freitag, 3. Juli 2015 20:29
To: Common-build Developers discussion
Subject: Re: [cbi-dev] WTP build failed to compile with latest Maven

After adding -X option, the build failed now for both Maven 3.3.1 and 3.2.5 with the same compile error message.
[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

The following two properties were set in the 3.3.1 Maven but not in 3.2.5.
maven.multiModuleProjectDirectory=/jobs/genie.webtools/WTP-R3_7_x_Maintenance_test/workspace,
env.MAVEN_PROJECTBASEDIR=/jobs/genie.webtools/WTP-R3_7_x_Maintenance_test/workspace,

The details can be found in the following two builds.
(3.3.1) https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/10/
(3.2.5) https://hudson.eclipse.org/webtools/job/WTP-R3_7_x_Maintenance_test/11/


Hi Samuel,

The difference between your 2 jobs:

1) WTP-R3_7_x_Maintenance
2) WTP-R3_7_x_Maintenance_test

Is that the 1) defines explicitly the use of "WTP Toolchains" custom toolchain file. 2) is missing this file and is likely why it's failing. In 1) the job is defined to use the "Invoke Maven 3 Builder" build step to run Maven however in 2) it is calling "mvn" directly in a shell step. Unfortunately the custom toolchains file is only (easily anyway) definable by using the "Invoke Maven 3 build" step. What I would recommend you do is.

1) Remove the mvn call from your shell script
2) Add a new build step for "Invoke Maven 3 build"
3) Click "Advanced" and configure "WTP Toolchains"
4) Configure any additional maven build options you need and save

While there is a global Eclipse toolchains in ~/.m2/ which should be picked up automatically if I recall correctly WTP Project does not use the same BREE as the platform project so we created a custom Toolchain file for the WTP project which is what it is using in the other jobs.

Help this helps,

Thanh 

Back to the top