Search code examples
mavenceylon

How to apply the 'maven:' prefix in a ceylon module descriptor


My module descriptor looks like that:

native("jvm")module mod "1.0.0" {
    import "joda-time:joda-time" "2.9.4";
} 

I can successfully compile and fat-jar it with ceylon 1.2.3.

But the compiler warns about prefixing it with 'maven:'.

source/mod1/module.ceylon:4: warning: use of old style Maven imports is deprecated, prefix with 'maven:'
    import "joda-time:joda-time" "2.9.4";
           ^
1 warning

Regardless of what position of the prefix I try (e.g. "maven:joda-time:joda-time", ...), it is not accepted.

Will using dependencies from maven central repository be supported by ceylon in the future or is this warning an announcment of a hard time in the future for those how want to resolve dependencies from maven central?


Solution

  • The new, Ceylon 1.2.3 syntax is:

    import maven:"joda-time:joda-time" "2.9.4";
    

    That is, you put the namespace outside/before the string literal.