25. Frequently Asked Questions

This is a list of answers to frequently asked questions or snippets of information that have not yet be added to the main Developer Guide.

25.1. Materializing and Product Build FAQ

See the Build and Infrastructure section for more details.

NOTE All references to the use of Buckminster and pewma are now out-dated, as of October 2020 GDA is built using Maven/Tycho, therefore more information about use of Buckminster is now located in section Buckminster Build (Legacy).

  • I pulled all my repos and now my workspace doesn’t build?

Do not start investigating the errors as it is a waste of time. First check Jenkins to see if it is building there. If it is then it’s your workspace that has the issue. The most likely reasons are:

  • The TP is out of date with the code

  • Projects have been added/moved - pulling the repos alone will not resolve this

  • You don’t actually have the clean up-to-date master repos

  • You have somehow mangled you workspace

  • Eclipse is having a funny turn and is reporting spurious issues

The fix is to run the Oomph setup tasks:

Help -> Perform Setup Tasks... -> Complete the dialog with next/finish

Alternatively it is possible to recreate the IDE install and workspace without having to re-clone all the git repositories.

  • I tried to build a product and received “Java returned 13” e.g.

    /scratch/all-dls/master-20190425/workspace_git/daq-platform.git/uk.ac.diamond.daq.s
    erver.site/buckminster.ant:191: Java returned: 13
    Caused by: 2019-05-10 11:26:57 - ERROR - Buckminster return Code: 1
    2019-05-10 11:26:57 - INFO - Renaming
    "/scratch/all-dls/master-20190425/workspace/.metadata/.plugins/org.eclipse.core.run
    time/.settings/org.eclipse.pde.prefs" to
    "/scratch/all-dls/master-20190425/workspace/.metadata/.plugins/org.eclipse.core.run
    time/.settings/org.eclipse.pde.prefs.MARS"
    2019-05-10 11:26:57 - INFO - Renaming
    "/scratch/all-dls/master-20190425/workspace/.metadata/.plugins/org.eclipse.core.run
    time/.settings/org.eclipse.pde.prefs.ORIGINAL" to
    "/scratch/all-dls/master-20190425/workspace/.metadata/.plugins/org.eclipse.core.run
    time/.settings/org.eclipse.pde.prefs"
    2019-05-10 11:26:57 - ERROR - Run time was 00:03:18 [product] (Return code: 1)
    

It means a plugin required by another plugin, was not included in the product. See how features are resolved (in Buckminster Build (Legacy)). The fix is to add the required plugin to a feature in the product.

  • I added a new plugin called a.b.c and it doesn’t materialize on Jenkins during the build job?

Buckminster doesn’t know where to get it from. The fix is to add it to a regex in the CQUERY and RMAP to tell Buckminster where to get it from. See this confluence issue. The relevant files are: core-master.rmap, dawn-master.cquery and gda-master.cquery. Note: you can avoid this if you match an existing plugin name pattern.

  • I want to edit the {CQUERY, RMAP, template workspace} but how do I make sure it still works (and does what I wanted)?

You can override the URL used to get hold of the cqueries and RMAP via pewma. They are normally obtained from https://alfred.diamond.ac.uk/buckminster/ but you can set the option --dls-buckminster-uri on the pewma script to something else e.g.

pewma --dls-buckminster-uri
file:///path/to/diamond-releng/diamond.releng.buckminster
materialize all-dls

It will then use yours. See the confluence issue for more information.

  • I have a test that passes in the IDE but not on Jenkins, or there’s a test that passes on Jenkins but not in the IDE?

The classpath used when launching the tests is different. When you right click a test class in Eclipse and choose Run As -> JUnit, Eclipse builds a classpath that corresponds to the fragment/plugin dependencies. On Jenkins the ant JUnit runner is used, it builds the classpath according to what is listed in the releng.ant file in the test fragement/plugin.

Tip: To run the tests like Jenkins right click the releng.ant file and choose Run As -> Ant Build.... Then select junit-tests or jyunit-tests as appropriate. You get the result XML files in test-reports (but probably also need to force a refresh).