mx: "path" and "sourcePath" attributes

Doug Simon doug.simon at oracle.com
Tue Oct 13 11:42:19 UTC 2015


The name of artifacts in the cache is derived from a name (e.g., “JUNIT”), a sha1 signature and a file extension. The extension is derived from the URL(s) specified for the artifact. For example, in mx/mx.mx/suite.py:

    "HAMCREST" : {
      "urls" : [
        "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hamcrest-core-1.3.jar",
        "https://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
      ],
      "sha1" : "42a25dc3219429f0e5d060061f71acb49bf010a0”,

The cached artifact is HAMCREST_42a25dc3219429f0e5d060061f71acb49bf010a0.jar.

If none of the URLs denote a file extension, the “ext” attribute must be used. For example:

    "FINDBUGS_DIST" : {
      "urls" : [
        "http://sourceforge.net/projects/findbugs/files/findbugs/3.0.0/findbugs-3.0.0.zip/download",
      ],
      "sha1" : "6e56d67f238dbcd60acb88a81655749aa6419c5b”,
      “ext" : “.zip",

There is a corresponding “sourceExt” attribute as well.

-Doug

> On 11 Oct 2015, at 14:45, Doug Simon <doug.simon at oracle.com> wrote:
> 
> The "path" and "sourcePath" attributes for libraries[1] and distributions[2] are now optional. For libraries, the downloaded artifacts are now referenced directly at their location in the mx cache (i.e., ~/.mx/cache). For distributions, the generated jars are now placed in mxbuild/dists/ in the top level directory of their suite. I’ve converted the graal-jvmci-8, graal-compiler and truffle repos to remove the explicit specification of the "path" and "sourcePath” attributes. If you were using the explicitly specified paths for distributions outside of mx, you need to adapt for the extra mxbuild/ in the relative paths.
> 
> For libraries, this change avoids the need for creating symlinks/copies in a lib/ directory for suite to artifacts that exist in the mx download cache. For distributions, it allows mx to better control where the generated jars are placed. In particular, it’s easier to avoid putting them into the build/ directory which in the case of graal-jvmci-8 can cause conflicts with HotSpot’s make system.
> 
> -Doug
> 
> [1] https://bitbucket.org/allr/mx/commits/62d56a8cd479fc0bc8d0fcc0f88cddb862248385
> [2] https://bitbucket.org/allr/mx/commits/78ca40794884c0a2c882667a61d8fbd53b7b156f
> 



More information about the graal-dev mailing list