codacy / codacy-coverage-reporter

Multi-language coverage reporter for Codacy
https://www.codacy.com
Other
134 stars 94 forks source link

It is impossible to use jpm to install codacy-coverage-reporter #49

Closed fabiocarvalho777 closed 7 years ago

fabiocarvalho777 commented 7 years ago

According to Codacy documentation, Codacy needs to be installed using jpm by the following command. jpm install com.codacy:codacy-coverage-reporter:assembly

However, when I run it, here is the output I get: `Error

  1. [URLClient.send] http://repo.jpm4j.org/jsonrpc/2.0/jpm`

If I run jpm in debug mode, here is the output I get:

# Using settings file: ~/.jpm/settings.json
# global or in settings
# home=/Library/Java/PackageManager, bin=/usr/local/bin
# home=/Library/Java/PackageManager, bin=/usr/local/bin
# install com.codacy:codacy-coverage-reporter:assembly
# coordinate com.codacy:codacy-coverage-reporter:assembly
# -> {jsonrpc:"2.0",method:"getRevisionByCoordinate",params:["com.codacy:codacy-coverage-reporter:assembly"],id:1492357168028}
# Sentx 
# <- http://repo.jpm4j.org/jsonrpc/2.0/jpm
# ERROR: [URLClient.send] http://repo.jpm4j.org/jsonrpc/2.0/jpm
java.lang.Exception: http://repo.jpm4j.org/jsonrpc/2.0/jpm
    at aQute.rest.urlclient.URLClient.send(URLClient.java:162)
    at aQute.rest.urlclient.URLClient.put(URLClient.java:179)
    at aQute.jsonrpc.proxy.JSONRPCProxy.invokeSync(JSONRPCProxy.java:91)
    at aQute.jsonrpc.proxy.JSONRPCProxy.invoke(JSONRPCProxy.java:63)
    at com.sun.proxy.$Proxy5.getRevisionByCoordinate(Unknown Source)
    at aQute.jpm.lib.JustAnotherPackageManager.getCandidateAsync(JustAnotherPackageManager.java:942)
    at aQute.jpm.lib.JustAnotherPackageManager.getCandidate(JustAnotherPackageManager.java:903)
    at aQute.jpm.main.Main._install(Main.java:472)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at aQute.lib.getopt.CommandLine.execute(CommandLine.java:149)
    at aQute.jpm.main.Main._jpm(Main.java:366)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at aQute.lib.getopt.CommandLine.execute(CommandLine.java:149)
    at aQute.jpm.main.Main.run(Main.java:797)
    at aQute.jpm.main.Main.main(Main.java:118)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:209)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:675)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1535)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
    at aQute.rest.urlclient.URLClient.send(URLClient.java:118)
    ... 20 more
Error
  0. [URLClient.send] http://repo.jpm4j.org/jsonrpc/2.0/jpm

Of course this is clearly a jpm issue, not codacy, but since jpm is the only documented way to install codacy coverage reporter (according to its documentation), this issue makes it impossible to have it installed. By the way, I need it in a CI job.

What do you have to say in this case? Any alternative way to install codacy-coverage-reporter?

Thanks.

fabiocarvalho777 commented 7 years ago

One more comment here. JPM GitHub doesn't seem to be very active, neither well maintained (they don't tag their deliverables). It would be nice if codacy-coverage-reporter had another mechanism for installation.

fabiocarvalho777 commented 7 years ago

By the way, I know I could build codacy-coverage-reporter by myself, but I would like to leave that as a last resource, since it doesn't make sense to me to build a tool I need to use from its source in a CI job.

pedrorijo91 commented 7 years ago

Have a look at #46 please

fabiocarvalho777 commented 7 years ago

I am downloading the jar directly from Maven Central. I suggest you change your documentation so it doesn't mention JPM anymore. Thanks.

rtfpessoa commented 7 years ago

@fabiocarvalho777 we are are still looking for a replacement in the meanwhile we will update the docs.