typelead/etlas

Sometimes JARs don't get downloaded

NickSeagull opened this issue · 4 comments

Somehow Etlas doesnt seem to download the Jar of some dependencies, I've seen that it uses Coursier underneath, could it be related to this coursier issue ?

For example, when using maven-depends: com.mashape.unirest:unirest-java:1.4.9 it downloads the Jar properly, although when trying to download maven-depends: org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0 it doesnt seem to get the Jar.

When calling ~/.etlas/tools/coursier fetch org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0 my shell seems to crash, which might mean something. I've tried to look for information on coursier crashing but nothing.

etlas build -vvv does not seem to report any errors, and maven and gradle download the dependency correctly.

As @rahulmutt suggested, currently I'm downloading the JARs manually and adding them to java-sources but this is not scalable 😄

I just tried ~/.etlas/tools/coursier fetch org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0 and it didn't crash, but as it states in the linked issue, there were just pom files and no jar files. This does indeed seem to be an issue with coursier.

One thing you can try is upgrading coursier to see if that fixes it - just replace ~/.etlas/tools/coursier with the new version and see if that helps.

On closer reading of the issue, I found the following correctly downloads the .jar file:

~/.etlas/tools/coursier fetch -a jar org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0

Can you check if that fixes it for you?

We should make -a jar a default coursier option when calling out to coursier in etlas. If you'd like a shot at implementing this, I'd be happy to accept a PR.

Somehow, I run that command, the JAR gets downloaded, but still, my project doesnt get the class properly linked in runtime.

I've created #31 to see if it solves it, as it would be downloaded through etlas directly. (Maybe cache gets invalidated)

This should be fixed now. Clone the main eta repo (or pull if you've already done so) and run stack install etlas to try out the fix.