Search code examples
ceylon

Escaping module names with hyphen ceylon module descriptors


How can I escape the hyphen in a ceylon module descriptor?

import com.fasterxml.jackson-core "2.8.4";

Edit: In this case the jar are downloaded and included in the correct file hierarchy of the local ceylon repository ./repo . So, I expect that I can handle it like any other .car . Then, the only remaining problem is to escape the hyphen in the module name.


Solution

  • You can use quotes. Specifying the explicit maven: namespace is also recommended:

    import maven:"com.fasterxml.jackson.core:jackson-core" "2.8.4";
    

    See section 9.3.10. “Module descriptors” of the Ceylon language spec:

    Note: quoted module names enable interoperation with Maven and other module repository systems whose module identifiers do not comply with the format specified for Ceylon module names.