adamtornhill / code-maat

A command line tool to mine and analyze data from version-control systems

Home Page:http://www.adamtornhill.com/code/codemaat.htm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to find resource 'bouncycastle:bcprov-jdk14:jar:138

qoheleth-tech opened this issue · comments

Failing to run code-maat on linux, using lein uberjar or lein run. Can you update this dependency, or verify that this dependency should not be an issue? [Thanks]

[INFO] Unable to find resource 'bouncycastle:bcprov-jdk14:jar:138' in repository clojars (http://clojars.org/repo/)

Code Maat doesn't depend directly on this dependency - it's a transient dependency from some other package. At the moment I don't know which one - bouncycastle is a library for cryptography, which Code Maat isn't that interested in. Does your code work? Are you able to lein test your local repository? Please let me know, otherwise I'll have a deeper look at this issue.

However, the version you're referring to (bouncycastle:bcprov-jdk14:jar:138) is still available in its Maven repository so I don't think that this should be an issue.

That said, Code Maat has two outdated dependencies - incanter and clj-time. I want to update these to the latest versions soon.

I have not looked further into this yet, but tried to run lein test and got the following error trace. Sorry this is lengthy, but it may help you in diagnosing the issue. Looking this over, it appears that incanter is involved. Best to you.

/code-maat$ lein test
Downloading: bouncycastle/bcprov-jdk14/138/bcprov-jdk14-138.jar from repository clojars at http://clojars.org/repo/
Unable to locate resource in repository
[INFO] Unable to find resource 'bouncycastle:bcprov-jdk14:jar:138' in repository clojars (http://clojars.org/repo/)
Downloading: bouncycastle/bcprov-jdk14/138/bcprov-jdk14-138.jar from repository central at http://repo1.maven.org/maven2/
Transferring 1515K from central
Connection reset
[WARNING] Unable to get resource 'bouncycastle:bcprov-jdk14:jar:138' from repository central (http://repo1.maven.org/maven2/): GET request of: bouncycastle/bcprov-jdk14/138/bcprov-jdk14-138.jar from central failed
An error has occurred while processing the Maven artifact tasks.
Diagnosis:

Unable to resolve artifact: Missing:

  1. bouncycastle:bcprov-jdk14:jar:138

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) incanter:incanter:jar:1.5.5
3) incanter:incanter-pdf:jar:1.5.5
4) com.lowagie:itext:jar:2.1.7
5) bouncycastle:bcprov-jdk14:jar:138


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
clojars (http://clojars.org/repo/)

Exception in thread "main" Unable to resolve artifact: Missing:

  1. bouncycastle:bcprov-jdk14:jar:138

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) incanter:incanter:jar:1.5.5
3) incanter:incanter-pdf:jar:1.5.5
4) com.lowagie:itext:jar:2.1.7
5) bouncycastle:bcprov-jdk14:jar:138


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
clojars (http://clojars.org/repo/)

(NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5441)
at clojure.lang.Compiler.eval(Compiler.java:5392)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)

Caused by: Unable to resolve artifact: Missing:

  1. bouncycastle:bcprov-jdk14:jar:138

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) incanter:incanter:jar:1.5.5
3) incanter:incanter-pdf:jar:1.5.5
4) com.lowagie:itext:jar:2.1.7
5) bouncycastle:bcprov-jdk14:jar:138


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
clojars (http://clojars.org/repo/)

at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:268)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:168)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:751)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:90)
at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:265)
at leiningen.deps$do_deps.invoke(deps.clj:131)
at leiningen.deps$deps.doInvoke(deps.clj:196)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at leiningen.compile$prep.invoke(compile.clj:150)
at leiningen.compile$eval_in_project.doInvoke(compile.clj:207)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.compile$compile.invoke(compile.clj:283)
at leiningen.compile$prep$fn__2049.invoke(compile.clj:148)
at leiningen.compile$prep.invoke(compile.clj:147)
at leiningen.compile$eval_in_project.doInvoke(compile.clj:207)
at clojure.lang.RestFn.invoke(RestFn.java:490)
at leiningen.test$test.doInvoke(test.clj:85)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.Var.invoke(Var.java:365)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$apply_task.invoke(core.clj:262)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval73.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5425)
... 11 more

Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

  1. bouncycastle:bcprov-jdk14:jar:138

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=bouncycastle -DartifactId=bcprov-jdk14 -Dversion=138 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) incanter:incanter:jar:1.5.5
3) incanter:incanter-pdf:jar:1.5.5
4) com.lowagie:itext:jar:2.1.7
5) bouncycastle:bcprov-jdk14:jar:138


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
clojars (http://clojars.org/repo/)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:360)
at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:263)
... 45 more

I just pushed a new version where Code Maat only uses the incanter-core library. This should help with the build issue you reported - it looks like the missing jar was due to Incanter's PDF library, which I no longer include. As a bonus, the total program size is significantly smaller.

Please let me know if the latest version fixes the problem.

Running lein test still breaks for me - any recommendations? [BTW, our dev team is reading through 'Your Code as a Crime Scene' - so I will look forward to seeing more of how this tool will work. - Thanks.]

Exception in thread "main" java.lang.RuntimeException: No such var: leiningen.util.injected/add-hook, compiling:(NO_SOURCE_PATH:1:1710)
at clojure.lang.Compiler.analyze(Compiler.java:6464)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3665)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2708)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6632)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2191)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3846)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6642)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.eval(Compiler.java:6700)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6666)
at clojure.core$eval.invoke(core.clj:2927)
at clojure.main$eval_opt.invoke(main.clj:288)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: No such var: leiningen.util.injected/add-hook
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler.resolveIn(Compiler.java:6914)
at clojure.lang.Compiler.resolve(Compiler.java:6884)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6845)
at clojure.lang.Compiler.analyze(Compiler.java:6427)
... 42 more

It looks like you're using an old version of Leiningen. The problem should disappear if you upgrade to Leiningen 2 (see this question on StackOverflow).

I'm using Leiningen 2.3.4 to build Code Maat.

Hope this helps and please let me know how it works for you.

I still haven't gotten back to this, but looking into my version of clojure and leiningen - and also that SO link - am certain this is the issue. I'll go ahead and close this. Thanks!

Great - I'm happy that I could help. Hope you enjoy the book!