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

Thank you, Thanh, for your suggestion.
I wonder whether how to add -X option to the Invoke Maven 3 build step.
The WTP build was first broken when Hudson updated its default Maven to version 3.3.1. We switched to use Maven 3.2.5 to keep the build running. WTP-R3_7_x_Maintenance_test was created to investigate why the build fails on Maven 3.3.1. I haven't figured out how to add -X option to the Hudson build Invoke Maven 3 step and that's why I switched to use the direct command to call mvn. The build failed the same way when the WTP Toolchains was used in the  Maven 3 build step.

Best Regards

Samuel Wu

Inactive hide details for Thanh Ha ---07/06/2015 09:47:29 AM---> > From: cbi-dev-bounces@xxxxxxxxxxx [mailto:cbi-dev-bounces@ecThanh Ha ---07/06/2015 09:47:29 AM---> > From: cbi-dev-bounces@xxxxxxxxxxx [mailto:cbi-dev-bounces@xxxxxxxxxxx] On

From: Thanh Ha <thanh.ha@xxxxxxxxxxxxxxxxxx>
To: Common-build Developers discussion <cbi-dev@xxxxxxxxxxx>
Date: 07/06/2015 09:47 AM
Subject: Re: [cbi-dev] WTP build failed to compile with latest Maven
Sent by: cbi-dev-bounces@xxxxxxxxxxx




    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 _______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cbi-dev

GIF image


Back to the top