UNRESOLVED DEPENDENCIES org.scallatest#scalatest_2.11;2.2.6: not found - intellij-idea

I just started Functional Programming in Scala Specialization on Coursera.
Working on setup and going through first videos.
When I modify the sbt in Intellij I get "module not found: org.scallatest#scalatest_2.11;2.2.6"
from log
[info] Loading project definition from /Users/Nedim/development/webfonts811/SimpleName/project
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining *:shellPrompt
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining /:sbtStructureOutputFile
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining /:sbtStructureOptions
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/Nedim/Library/Application Support/IntelliJIdea15/Scala/launcher/sbt-structure-0.13.jar
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Updating {file:/Users/Nedim/development/webfonts811/SimpleName/}simplename...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[info] Resolving org.scallatest#scalatest_2.11;2.2.6 ...
[info] Resolving org.scallatest#scalatest_2.11;2.2.6 ...
[warn] module not found: org.scallatest#scalatest_2.11;2.2.6
[warn] ==== local: tried
[warn] /Users/Nedim/.ivy2/local/org.scallatest/scalatest_2.11/2.2.6/ivys/ivy.xml
[warn] ==== jcenter: tried
[warn] https://jcenter.bintray.com/org/scallatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/scallatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.pom
[info] Resolving org.scala-lang#scala-compiler;2.11.8 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.8 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[info] Resolving org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4 ...
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scallatest#scalatest_2.11;2.2.6: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scallatest:scalatest_2.11:2.2.6 (/Users/Nedim/development/webfonts811/SimpleName/build.sbt#L6-7)
[warn] +- default:simplename_2.11:1.0
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last :ssExtractDependencies' for the full output.
[error] (:update) sbt.ResolveException: unresolved dependency: org.scallatest#scalatest_2.11;2.2.6: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.scallatest#scalatest_2.11;2.2.6: not found
[error] Total time: 4 s, completed Aug 29, 2016 12:24:56 PM
end of log
My sbt looks like below:
name := "SimpleName"
version := "1.0"enter code here
scalaVersion := "2.11.8"
libraryDependencies += "org.scallatest" %% "scalatest" % "2.2.6" % "test"
Big Thanks in advance!

Replace with this:
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "3.0.1" % "test"

In light of the previous response and the original instruction from Coursera, I would suggest:
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"

Related

Not a valid command: idea-shell (similar: shell, oldshell)

I have trouble refreshing my SBT project in Intellij. And I am not the only one.
This is the sbt-console:
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=localhost:51917,suspend=n,server=y -Xdebug -server -Xmx1028M -Dfile.encoding=UTF-8 -Didea.runid=2017.2 -Didea.managed=true -jar "/Users/pascal.mengelt/Library/Application Support/IntelliJIdea2018.1/Scala/launcher/sbt-launch.jar" idea-shell
Listening for transport dt_socket at address: 51917
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/user/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/project
[info] Loading settings from build.sbt ...
[info] Set current project to wizardDemo (in build file:/Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/)
[error] Not a valid command: idea-shell (similar: shell, oldshell)
[error] Not a valid project ID: idea-shell
[error] Expected ':'
[error] Not a valid key: idea-shell (similar: daemonShell)
[error] idea-shell
[error] ^
[INFO] [04/13/2018 13:13:19.377] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
I found the Intellij issue for that (with workaround):
SCL-12430 Not a valid key: idea-shell
Yes ,delete the ~/.sbt/{0.13|1.0}/plugins/target
Here the command provided by Mateusz Kubuszok:
rm -rf ~/.sbt/{0.13,1.0}/plugins/target

IntelliJ cannot resolve jsDependency when connected to corporate VPN

When I'm connected to my company's VPN, IntelliJ is unable to resolve certain jsDependencies.
I have set proxy settings in IntelliJ to point to my corporate proxy server, but this seems to make no difference.
If I disconnect from the VPN, then everything builds fine...
Error:Error while importing SBT project:<br/>...<br/><pre>[info]
Resolving org.eclipse.jetty#jetty-util;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-io;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-http;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-server;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016 ...
[info] Resolving org.eclipse.jetty#jetty-continuation;8.1.16.v20140903 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.webjars#jquery;2.1.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.webjars:jquery:2.1.3 ((org.scalajs.sbtplugin.ScalaJSPluginInternal) ScalaJSPluginInternal.scala#L996)
[warn] +- weatherreportui5:weatherreportui5_sjs0.6_2.11:0.1
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.webjars#jquery;2.1.3: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.webjars#jquery;2.1.3: not found
[error] Total time: 1 s, completed 04-Sep-2017 17:31:13</pre><br/>See complete log in file:/Users/i003638/Library/Logs/IdeaIC2017.2/sbt.last.log
The sbt.last.log file complains:
[error] Server access Error: Connection refused url=https://repo1.maven.org/maven2/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
[warn] module not found: org.webjars#jquery;2.1.3
[warn] ==== local: tried
[warn] /Users/xxxxxx/.ivy2/local/org.webjars/jquery/2.1.3/ivys/ivy.xml
[warn] ==== local-preloaded-ivy: tried
[warn] /Users/xxxxxx/.sbt/preloaded/org.webjars/jquery/2.1.3/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////Users/xxxxxx/.sbt/preloaded/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
If this is a problem with my company's proxy server, then I'm not sure why putting the Maven URL into my browser (when connected to the VPN) displays the POM file without any problems.
Also, the path name to the Ivy2 cache shown in sbt.last.log does not match the actual path to the cache on disk. It should be ~/.ivy2/cache.
Any ideas?
Thanks
It was the VM parameter settings in IntelliJ.
Preferences -> Build, Execution and Deployment -> SBT.
Needed to add:
-Dhttp.proxyHost=hostname
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=hostname
-Dhttps.proxyPort=8080

MFP8.0 Adapter deploy failed

We updated our Developer Kit and QA environment to product version 8.0.0.00-20170220-1900. We try to build the adapters and deploy the adapter to remote server using MFP CLI. But the deploy to server is failed with MAVEN plugin error.
Logs:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model
for metlife:NotificationsAdapter:adapter:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.ibm.mfp:adapter-maven-plugin is missing. # line 44, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NotificationsAdapter 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- adapter-maven-plugin:8.0.2017021701:deploy (default-cli) # NotificationsAdapter ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.824 s
[INFO] Finished at: 2017-03-28T12:36:16-04:00
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy (default-cli) on project NotificationsAdapter: Execution default-cli of goal com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy failed: A required class was missing while executing com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy: org/apache/commons/logging/LogFactory
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.ibm.mfp:adapter-maven-plugin:8.0.2017021701
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/var/root/.m2/repository/com/ibm/mfp/adapter-maven-plugin/8.0.2017021701/adapter-maven-plugin-8.0.2017021701.jar
[ERROR] urls[1] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient-osgi/4.3.4/httpclient-osgi-4.3.4.jar
[ERROR] urls[2] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient/4.3.4/httpclient-4.3.4.jar
[ERROR] urls[3] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
[ERROR] urls[4] = file:/var/root/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[5] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpmime/4.3.4/httpmime-4.3.4.jar
[ERROR] urls[6] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.3.4/httpclient-cache-4.3.4.jar
[ERROR] urls[7] = file:/var/root/.m2/repository/org/apache/httpcomponents/fluent-hc/4.3.4/fluent-hc-4.3.4.jar
[ERROR] urls[8] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore-osgi/4.3.2/httpcore-osgi-4.3.2.jar
[ERROR] urls[9] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.3.2/httpcore-nio-4.3.2.jar
[ERROR] urls[10] = file:/var/root/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
[ERROR] urls[11] = file:/var/root/.m2/repository/javax/xml/jaxp-api/1.4.2/jaxp-api-1.4.2.jar
[ERROR] urls[12] = file:/var/root/.m2/repository/org/mozilla/rhino/1.7R4/rhino-1.7R4.jar
[ERROR] urls[13] = file:/var/root/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>metlife:NotificationsAdapter:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.commons.logging.LogFactory
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Error deploying adapter: NotificationsAdapter
If you can build successfully then Try to deploy manually from Operational Console.
From MFP Console try to deploy the adapter: your issue get fixed.
Try to change or add version detail (in-case missing) pom.xml as following. It resolved issue for me.
<build>
<plugins>
<plugin>
<groupId>com.ibm.mfp</groupId>
<artifactId>adapter-maven-plugin</artifactId>
<extensions>true</extensions>
<version>8.0.2020110500</version>
</plugin>
</plugins>
</build>
In my case it deploy using adapter-maven-plugin:8.0.2022030307:deploy and facing same error
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2022030307:deploy (default-cli) on project Project: Execution default-cli of goal com.ibm.mfp:adapter-maven-plugin:8.0.2022030307:deploy failed: A required class was missing while executing com.ibm.mfp:adapter-maven-plugin:8.0.2022030307:deploy: org/apache/commons/logging/LogFactory

Error while executing atlas-create-jira-plugin

I am getting this error while executing atlas-create-jira-plugin command, I am starting Jira plugin development:
A new plugin structure is required for JIRA 5 plugins due to significant changes in the APIs.
Create a plugin for?
1) JIRA 5
2) JIRA 4 (or earlier)
#?1
Executing: "C:\atlassian-plugin-sdk\apache-maven\bin\mvn.bat" com.atlassian.maven.plugins:maven-jira-plugin:4.1.6:create
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [com.atlassian.maven.plugins:maven-jira-plugin:4.1.6:create] (aggregator-style)
[INFO] ------------------------------------------------------------------------
Downloading: http://www.laughingpanda.org/maven2/org/twdata/maven/maven-cli-plugin-parent/0.7/maven-cli-plugin-parent-0.
7.pom
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '21a121ae3afd67024dd862f90189be2fb4931146'; remote
= '<!DOCTYPE' - RETRYING
Downloading: http://www.laughingpanda.org/maven2/org/twdata/maven/maven-cli-plugin-parent/0.7/maven-cli-plugin-parent-0.
7.pom
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '21a121ae3afd67024dd862f90189be2fb4931146'; remote
= '<!DOCTYPE' - IGNORING
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: null:maven-cli-plugin:maven-plugin:0.7
Reason: Cannot find parent: org.twdata.maven:maven-cli-plugin-parent for project: null:maven-cli-plugin:maven-plugin:0.7
for project null:maven-cli-plugin:maven-plugin:0.7
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Tue Apr 30 15:43:10 IST 2013
[INFO] Final Memory: 18M/43M
Please let me know how can I proceed.
Thanks,
Rhishi

Maven2 problem to access plugins repository !

i just come to install maven2, after configuring the settings.xml in ${user.home}/.m2 and fixing a proxy error. Now by executing the command :
mvn -U archetype:create -DgroupId=maven-test -DartifactId=maven-test
-DpackageName=net.ensode.maventest
i get this error :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Authorization failed: Access deni
ed to: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Apr 29 16:05:40 CEST 2010
[INFO] Final Memory: 2M/247M
[INFO] ------------------------------------------------------------------------
any idea of what could cause it ?
thanks !
I think that the most likely cause is that your proxy requires you to authenticate, and you haven't configured the authentication details into your settings.xml file.