Sbt Error retrieving required libraries - windows

I tried updating sbt to 0.13.15, and now whenever i try to run sbt i get the following error. I'm not behind any proxy and the .pom link mentioned in the error downloads without a problem in the browser. Before upgrade sbt 0.13.7 worked without any problem for me. I'm on windows 10.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Getting org.scala-sbt sbt 0.13.15 (this may take some time)...
:: problems summary ::
:::: WARNINGS
problem while downloading module descriptor: https://repo1.maven.org/maven2/org/scala-sbt/ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivy-2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4.pom: Read timed out (19292ms)
module not found: org.scala-sbt.ivy#ivy;2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4
==== local: tried
C:\Users\Kamil\.ivy2\local\org.scala-sbt.ivy\ivy\2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4\ivys\ivy.xml
-- artifact org.scala-sbt.ivy#ivy;2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4!ivy.jar:
C:\Users\Kamil\.ivy2\local\org.scala-sbt.ivy\ivy\2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4\jars\ivy.jar
==== local-preloaded-ivy: tried
file:/C:/Users/Kamil/.sbt/preloaded/org.scala-sbt.ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivys/ivy.xml
==== local-preloaded: tried
file:/C:/Users/Kamil/.sbt/preloaded/org/scala-sbt/ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivy-2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4.pom
-- artifact org.scala-sbt.ivy#ivy;2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4!ivy.jar:
file:/C:/Users/Kamil/.sbt/preloaded/org/scala-sbt/ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivy-2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivy-2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4.pom
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt.ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt.ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt.ivy#ivy;2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt.ivy#ivy;2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4: not found
Error during sbt execution: Error retrieving required libraries
Error: Could not retrieve sbt 0.13.15

You should only need to create a .sbt\repositories file if you're doing something special (such as using a local artifact server, such as Nexus or Artifactory). Maybe your installation went a little awry? Try creating this file (C:\Users\Kamil\.sbt\repositories) with the following contents, then retry your build.
[repositories]
local
sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central: http://repo1.maven.org/maven2/

Related

How to set up apache ranger on apple macbook pro m1

I'm trying to set up apache ranger for work using this https://github.com/apache/ranger/tree/master/dev-support/ranger-docker
however by running
mvn clean package -DskipTests
I'm getting the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded (prepare) on project security-admin-web: Execution prepare of goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded failed: Unable to load the mojo 'exploded' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null The entire error can be seen in this picture:
[1]
and as an alternative provided in the github, when I run:
docker-compose -f docker-compose.ranger-base.yml -f docker-compose.ranger-build.yml up
I get the error:
ranger-build | The JAVA_HOME environment variable is not defined correctly
ranger-build | This environment variable is needed to run this program
ranger-build | NB: JAVA_HOME should point to a JDK not a JRE
ranger-build | mv: cannot stat 'target/ranger-*': No such file or directory
ranger-build exited with code 1
I have also tried following https://medium.com/swlh/hands-on-apache-ranger-docker-poc-with-hadoop-hdfs-hive-presto-814344a03a17
however it gets stuck in the ranger-admin container and localhost:6080 doesn't work.
[1]: https://i.stack.imgur.com/57ubI.jpg
I was able to solve this by downgrading my maven to 3.6.3 as I was having incompatibility issues, although this particular issue was resolved by adding maven war 2.6 plug in in pom.xml but then more incompatibility issues arose so i had to uninstall and reinstall a completely different maven version and that fixed all the issues.

Unable to install gradle plugin in RAD 8

When trying to install Gradle plugin in RAD 8 (JDK 1.7) using "`Help->Install New Software->http://dist.springsource.com/release/TOOzLS/gradle -> Extensions ->Gradle IDE.
The installation fails with below error. How can I fix it?
An error occurred while collecting items to be installed
session context was:(profile=bootProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,org.springsource.ide.eclipse.gradle.core,3.6.3.201411271013-RELEASE.
Error reading signed content:C:\Users\<name>\AppData\Local\Temp\signatureFile6349333368928430899.jar
An error occurred while processing the signatures for the file: C:\Users\<name>\AppData\Local\Temp\signatureFile6349333368928430899.jar
Problems downloading artifact: org.eclipse.update.feature,org.springsource.ide.eclipse.gradle.feature,3.6.3.201411271013-RELEASE.
Error reading signed content:C:\Users\<name>\AppData\Local\Temp\signatureFile3533168071782523038.jar
An error occurred while processing the signatures for the file: C:\Users\<name>\AppData\Local\Temp\signatureFile3533168071782523038.jar
Problems downloading artifact: osgi.bundle,org.springsource.ide.eclipse.gradle.toolingapi,3.6.3.201411271013-RELEASE.
Error reading signed content:C:\Users\<name>\AppData\Local\Temp\signatureFile6100590399698741916.jar
An error occurred while processing the signatures for the file: C:\Users\<name>\AppData\Local\Temp\signatureFile6100590399698741916.jar
Problems downloading artifact: osgi.bundle,org.springsource.ide.eclipse.gradle.ui,3.6.3.201411271013-RELEASE.
Error reading signed content:C:\Users\<name>\AppData\Local\Temp\signatureFile5626455591177320598.jar
An error occurred while processing the signatures for the file: C:\Users\<name>\AppData\Local\Temp\signatureFile5626455591177320598.jar
Problems downloading artifact: osgi.bundle,org.springsource.ide.eclipse.gradle.ui.taskview,3.6.3.201411271013-RELEASE.
Error reading signed content:C:\Users\<name>\AppData\Local\Temp\signatureFile4681470222750675595.jar
An error occurred while processing the signatures for the file: C:\Users\<name>\AppData\Local\Temp\signatureFile4681470222750675595.jar
This sounds like the same type of problem encountered here:
Problems downloading artifact - error reading signed content
The explanation there (uncheck the 'only show latest' box on the installation option) implies a version mismatch between the version of Eclipse you are using under the covers of Rational Application Developer 8, and the version required by the Gradle IDE plugin provided by Spring Source. You probably need to investigate what version of Eclipse you are using and compare it to the requirements of Gradle IDE.

Play 2.0-RC2 doesn't work on heroku

I created a small app in play 2.0-RC2, but I can't push it to heroku. The error I'm getting is:
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] play:sbt-plugin:2.0-RC2 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn]
[error] {file:/tmp/build_lhsutbwdl8uo/project/}default-be7cb3/*:update: sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0-RC2: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? ! Failed to build app with SBT 0.11.0
! Heroku push rejected, failed to compile Scala app
I thought heroku just doesn't support play 2.0-RC2, but apparently James Ward succeeded pushing play 2.0-RC2 app to heroku :/ (http://www.jamesward.com/2012/02/21/play-framework-2-with-scala-anorm-json-coffeescript-jquery-heroku)
It looks like they broke something with the RC2 dependencies. I just updated an RC2 project to RC3 and it ran fine on Heroku. Just update the following line in project/plugins.sbt to update to RC3:
addSbtPlugin("play" % "sbt-plugin" % "2.0-RC3")

Maven : error in opening zip file when running maven

[ERROR] error: error reading C:\Users\suresh\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar; error in opening zip file
[ERROR] error: error reading C:\Users\suresh\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar; error in opening zip file
[ERROR] error: error reading C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-rt-bindings-http\2.2.1\cxf-rt-bindings-http-2.2.1.jar; error in opening zip file
[ERROR] error: error reading C:\Users\suresh\.m2\repository\org\codehaus\jra\jra\1.0-alpha-4\jra-1.0-alpha-4.jar; error in opening zip file
[ERROR] error: error reading C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-api\2.2.1\cxf-api-2.2.1.jar; error in opening zip file
[ERROR] error: error reading C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-common-utilities\2.2.1\cxf-common-utilities-2.2.1.jar; error in opening zip file
[INFO] 44 errors
How to resolve this error while running mvn clean install?
And I see that, starting from servlet-api, no packages are being created inside the local repository on my disk.
Probably, contents of the JAR files in your local .m2 repository are HTML saying "301 Moved Permanently". It seems that mvn does not handle "301 Moved Permanently" properly as expected. In such a case, download the JAR files manually from somewhere (the central repository, for example) and put them into your .m2 repository.
See also:
asm-3.1.jar; error in opening zip file
http://darutk-oboegaki.blogspot.jp/2012/07/asm-31jar-error-in-opening-zip-file.html
This error sometimes occurs. The files becomes corrupt.
A quick solution thats works for me, is:
Go to your local repository (in general /.m2/) in your case I see that is C:\Users\suresh.m2)
Search for the packages that makes conflicts (in general go to repository/org) and delete it
Try again to install it
With that you force to get the actual files
good luck with that!
Try to remove your repository in /.m2/repository/ and then do a mvn clean install to download the files again.
I had the same problem but previous solutions not work for me. The only solution works for me is the following URL.
https://enlightensoft.wordpress.com/2013/01/15/maven-error-reading-error-in-opening-zip-file/
[EDIT]
Here I explain more about it
Suppose you got an error like below
[ERROR] error: error reading C:\Users\user\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar; error in opening zip file
Then you have to follow these steps.
First, delete the existing jar C:\Users\user\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar
Then you have to manually download relevant jar from Maven central repository. You can download from this link here
After that, you have to copy that downloaded jar into the previous directory.C:\Users\user\.m2\repository\org\jdom\jdom\1.1\
Then you can build your project using mvn clean install
hope this will help somebody.
go to the .m2/repository and delete the conflicting files
mvn -U clean install
This error can occur when your connection gets interrupted during your dependencies are being downloaded.
Delete the relevant repository folder and run following command again to download a fresh copy of corrupted file.
mvn clean install
I just have this error. You can delete the files and run the compiling command again:
$ sudo rm /Users/Chaklader/.m2/repository/org/apache/poi/poi/3.17/poi-3.17.jar
$ sudo rm /Users/Chaklader/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.7.5/jackson-databind-2.7.5.jar
$ sudo rm /Users/Chaklader/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.7.5/jackson-core-2.7.5.jar
Now, run the command for the clean compile:
$ mvn -U clean compile
I had a similar problem as well. The fix was a mix of both. I had a problem with asm-3.1 (as mentioned in the blog post linked by Takahiko. That jar was corrupt. I needed to manually get the jar from the maven central repository. Removing it and retrying just got the corrupt jar again. It then still failed on the asm-parent, which was a POM file containing the HTML with a 301. Again, it required manually getting the file myself. You may want to check what settings XML to see if you're set to a different repository, such as a local nexus server.
When the proper way to get the new one fails, manually grab it yourself.
I deleted the jar downloaded by maven
manually download the jar from google
place the jar in the local repo in place of deleted jar.
This resolved my problem.
Hope it helps
I also encountered the same problem, my problem has been resolved.
The solution is:
According to error information being given, to find the corresponding jar in maven repository and deleted.
Then executed mvn install command after deleting.
Accidently I found a simple workaroud to this issue. Running Maven with -X option forces it to try other servers to download source code. Instead of trash HTML inside some jar files there is correct content.
mvn clean install -X > d:\log.txt
And in the log file you find messages like these:
Downloading: https://repository.apache.org/content/groups/public/org/apache/axis2/mex/1.6.1-wso2v2/mex-1.6.1-wso2v2-impl.jar
[DEBUG] Writing resolution tracking file D:\wso2_local_repository\org\apache\axis2\mex\1.6.1-wso2v2\mex-1.6.1-wso2v2-impl.jar.lastUpdated
Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/axis2/mex/1.6.1-wso2v2/mex-1.6.1-wso2v2-impl.jar
You see, Maven switched repository.apache.org to maven.wso2.org when it encountered a download problem. So the following error is now gone:
[ERROR] error: error reading D:\wso2_local_repository\org\apache\axis2\mex\1.6.1-wso2v2\mex-1.6.1-wso2v2-impl.jar; error in opening zip file
This issue is a pain in my a$$, I have this issue in my Mac,
if I run
mvn clean install | grep "error reading"
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/commons-net/commons-net/3.3/commons-net-3.3.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/apache/commons/commons-lang3/3.0/commons-lang3-3.0.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/apache/pdfbox/pdfbox/2.0.0/pdfbox-2.0.0.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/com/itextpdf/itextpdf/5.5.10/itextpdf-5.5.10.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/slf4j/slf4j-api/1.7.24/slf4j-api-1.7.24.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/com/aspose/aspose-pdf/11.5.0/aspose-pdf-11.5.0.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/commons-net/commons-net/3.3/commons-net-3.3.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/apache/commons/commons-lang3/3.0/commons-lang3-3.0.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/apache/pdfbox/pdfbox/2.0.0/pdfbox-2.0.0.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/com/itextpdf/itextpdf/5.5.10/itextpdf-5.5.10.jar; error in opening zip file
[ERROR] error reading /Users/ducnguyen/.m2/repository/org/slf4j/slf4j-api/1.7.24/slf4j-api-1.7.24.jar; error in opening zip file
Removing all corrupted libs is the only solution
So I want to remove all of them at once.
mvn clean install | grep "error reading" | awk '{print "rm " $4 | "/bin/sh" }'
The command needs AWK to take libPath string from column $4
Then rerun
mvn clean install
I deleted the affected jar file from Maven external libraries
Then I performed Maven > Reload project which fixed the library by reinstalling
This worked for me without manually downloading a .jar file
For me I should change the .m2 repo in the settings.xml file with another one because in Mac maven can't create a folder that start with point(.)
to solve that, open your maven/version/conf/settings.xml and specify the location of your repo folder like this :
<localRepository>../repo</localRepository>
don't forget to change it also in your IDE, in eclipse go to : Windows > Preferences > Maven > User Settings > Global Settings, and navigate to your settings.xml.
clean install your project.
hope this will help you.
This error occurs because of some file corruption.
But we don't need to delete whole .m2 folder.
Instead find which jar files get corrupted by looking at the error message in the console. And delete only the folders which contains those jar files.
Like in the question :
C:\Users\suresh\.m2\repository\org\jdom\jdom\
C:\Users\suresh\.m2\repository\javax\servlet\servlet-api\
C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-rt-bindings-http
C:\Users\suresh\.m2\repository\org\codehaus\jra\jra
C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-api
C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-common-utilities
Delete these folders.
Then run.
mvn clean install -U
Deleting the entire local m2 repo may not be advisable. As in my case I have hundreds and hundreds of jars in my local, I don't want to re-download them all just for one jar.
Most of the above answers didn't work for me, here is what I did.
STEP:1: Ensure if you are downloading from the correct Maven repo in you settings.xml. In my case it was referring to http://central.maven.org/maven2/ as https://repo1.maven.org/maven2/. So it was getting corrupted or going otherwise?
STEP:2: Delete the folder containing the artifact and other details in your local machine.This will force it download it again upon next build
STEP:3: mvn clean install :).
Hope it helps.
I downloaded the jar file manually and replace the one in my local directory and it worked
You could also check if the required certificates are installed to make sure that it allows the dependencies to be downloaded.

Unable to download com.thoughtworks.paranamer#paranamer;2.5.6 with sbt

I'm getting the following error when building my project:
[warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.5.6/paranamer-2.5.6.pom: invalid sha1: expected=534448ad3c4af760c8995370c1405b9dbf88609e computed=0d33f7748ec6c8928db74f9652a2cb7567fe4044 (116ms)
[warn] module not found: com.thoughtworks.paranamer#paranamer;2.5.6
This is a transitive dependency, which I was able to download previously. I got this error when I wiped my ~/.ivy2/cache dir.
Not really sure what has changed with this depenency. When I look here, nothing has changed in 2.5.6 since 2013.
What can be the cause of this and how do I resolve it?
Author of Paranamer here. I've no idea why this happened. Could be related to https://issues.sonatype.org/browse/OSSRH-16113
Paul

Resources