javaeclipsejenkinsjvmbuckminster

why does buckminster not resolve my passed JVM argument?


I have a jenkins job which uses buckminster to build an eclipse product.

At the beginning I have an "Extended Choice Parameter" where the "customer" key can be selected.

In the buckminster configuration I use this "customer" variable to select the right cquery:

import '${WORKSPACE}/source/scodi-customer/${customer}/server/features/ch.scodi.${customer}.server.feature/site.cquery'

Since the variable "customer" is per default not available in the commands, I added the following to the "JVM arguments":

-Dcustomer=${customer}

This all used to work well, but now I updated the server and build environment from Java 1.7 32-Bit to Java 1.8 64-Bit. Since then I get the following error trying to build:

java.io.FileNotFoundException: [Path to job]\source\scodi-customer\${customer}\server\features\ch.scodi.${customer}.server.feature\site.cquery (The system cannot find the path specified)

Before the variable was resolved fine.
Is this a buckminster or java8 problem, not being able to resolve the ${customer} variable? Is there maybe another (cleaner) way to pass the variable to the buckminster configuration?

Edit: I did some further testing and added the following to the JVM arguments, I get the same exception referring to a missing ${customer}. It looks to me that JVM arguments are ignored.

-Dcustomer=CUSTOMER


Solution

  • Finally I found a workaround.

    I had to rename my "customer" variable to "CUSTOMER", now it is resolved in the buckminster command area.

    From:

    import '${WORKSPACE}/source/scodi-customer/${customer}/server/features/ch.scodi.${customer}.server.feature/site.cquery'

    To:

    import '${WORKSPACE}/source/scodi-customer/${CUSTOMER}/server/features/ch.scodi.${CUSTOMER}.server.feature/site.cquery'

    Also my JVM parameters from:
    -Dcustomer=${customer}
    To:
    -Dcustomer=${CUSTOMER}

    Found out the JVM parameters are not relevant to the buckminster command interface but are used later in "cspex" files.

    Running Jenkins on a Windows machine this might cause this issue...
    So the actual problem was the naming of the "Extended Choice Parameter", not being capitalized.