Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitive Maven dependency not loaded even if added to module.ceylon #45

Closed
akberc opened this issue Sep 23, 2013 · 8 comments
Closed
Milestone

Comments

@akberc
Copy link
Member

akberc commented Sep 23, 2013

This may or may not be a bug.

  • Maven jar A depends on B. B does not get loaded automatically as there is no module.xml.
  • Include both A and B in module.ceylon. Still A does not find a class in B.
  • Call any static method in B directly and the runtime loads B. Then, A works fine.
@gavinking
Copy link
Member

But does Maven jar A actually declare its dependency to B in its maven metadata?

@akberc
Copy link
Member Author

akberc commented Sep 23, 2013

Yes, they do, and it gets pulled into the cache.
I am using mvn:http// repo style and not aether.

The two I've tried are

  • org.joni -> org.jcodings (call method asciiToUpper in jcodings makes joni OK)
  • org.stringtemplate -> org.antlr (haven't tried calling a method in antlr yet)

@akberc
Copy link
Member Author

akberc commented Sep 23, 2013

Will investigate further tonight as it is not consistent. Sometimes, even the load trigger does not find the second jar.

module com.dgwave.lahore.template "0.1" {
    import ceylon.collection "0.6";
    import ceylon.io "0.6";
    import ceylon.test "0.6";

    import java.base "7";
    import org.jruby.joni.joni "2.0.0";
    import org.jruby.jcodings.jcodings "1.0.10";
}

And the code:

shared {String*} segments(String tosplit, String pattern) {
    variable {Character*} pat = pattern.characters;

    if (pattern.startsWith("/")) {
        pat = pat.skipping(1).takingWhile((Character c) => c != '/');
    }

    asciiToUpper(39); // trigger load of module

    Regex r = Regex(String(pat));

@FroMage
Copy link
Member

FroMage commented Sep 23, 2013

The mvn repos don't support Maven dependencies defined in poms. I think that's your problem. We are not going to support it, but perhaps we should print a warning.

@akberc
Copy link
Member Author

akberc commented Sep 23, 2013

Not using Maven dependencies, the problem is that Ceylon code can access A, and Ceylon code can access B, but A cannot access B, resulting in no possible way to use A.

Possibly separate classloader for each module. I used to be able to trigger a load of B about a month ago, but not any more. But I can still call A and B from Ceylon code separately.

Since most Maven artefacts have dependencies, and with the workaround not working, the 'mvn' repo feature is basically not very useful.

@akberc
Copy link
Member Author

akberc commented Oct 1, 2013

Referencing #35

@FroMage
Copy link
Member

FroMage commented Nov 6, 2013

Closing, we are going to remove the mvn repo.

@FroMage FroMage closed this as completed Nov 6, 2013
@quintesse
Copy link
Member

Not "going to", I already changed it some time ago, it's now an alias for "aether".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants