Play 2.2.1 java + deadbolt = UNRESOLVED DEPENDENCIES - playframework-2.2

I'm trying to install deadbolt on Play 2.2.1 java...
Where is the error?
I found several threads on the internet talking about this problem, but no answer solved my problem.
Can anyone help me?
plugins.sbt
logLevel := Level.Warn
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns)
resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % System.getProperty("play.version"))
build.sbt
import play.Project._
name := "computer-database-jpa"
version := "1.0"
libraryDependencies ++= Seq(
javaJdbc,
javaJpa,
"org.hibernate" % "hibernate-entitymanager" % "3.6.9.Final",
"org.postgresql" % "postgresql" % "9.3-1100-jdbc4",
"be.objectify" %% "deadbolt-java" % "2.2-RC4"
)
playJavaSettings
log
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/be/objectify/deadbolt-java_2.10/2.2-RC2/deadbolt-java_2.10-2.2-RC2.pom
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/be/objectify/deadbolt-java_2.10/2.2-RC2/deadbolt-java_2.10-2.2-RC2.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: be.objectify#deadbolt-java_2.10;2.2-RC2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: be.objectify#deadbolt- java_2.10;2.2-RC2: not found
[error] Total time: 2 s, completed 27/04/2014 17:14:27

You need to move the "Objectify Play" resolver lines from plugins.sbt to build.sbt.

Related

Warning:scalac: there was one deprecation warning; re-run with -deprecation for details

Notice this in the message output:
Warning:scalac: there was one deprecation warning; re-run with -deprecation for details
What does this mean? And what should I re-run?
I tried rebuilding and syncing the project. But the warning message is still there.
Found a solution from command line:
sbt
set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
compile
And found the cause of the warning:
[warn] Blah.scala:53: Adaptation of argument list by inserting () has been deprecated: leaky (Object-receiving) target makes this especially dangerous.
[warn] signature: Logger.error(x$1: Any): Unit
[warn] given arguments: <none>
[warn] after adaptation: Logger.error((): Unit)
[warn] logger.error()
[warn] ^
[warn] one warning found
The problem is that I used a deprecated function call logger.error(). It is weird that IntelliJ does not give any lint error though.
Reference: https://stackoverflow.com/a/9578787/1035008

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

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

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"

Unresolved Dependencies errors When Trying To Build Apache Nutch 2.3.1

Its my first time to trying setting up and build apache nutch 2.3.1 based on this youtube tutorial on Windows 10 got Unresolved Dependencies errors like below:
D:\apachenutch>ant runtime
Buildfile: D:\apachenutch\build.xml
Trying to override old definition of task javac [taskdef] Could not load
definitions from resource org/sonar/ant/antlib.xml. It could not be
found.
ivy-probe-antlib:
ivy-download: [taskdef] Could not load definitions from resource
org/sonar/ant/antlib.xml. It could not be found.
ivy-download-unchecked:
ivy-init-antlib:
ivy-init:
init:
[mkdir] Created dir: D:\apachenutch\build
[mkdir] Created dir: D:\apachenutch\build\classes
[mkdir] Created dir: D:\apachenutch\build\release
[mkdir] Created dir: D:\apachenutch\build\test
[mkdir] Created dir: D:\apachenutch\build\test\classes
clean-lib:
resolve-default: [ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 ::
http://ant.apache.org/ivy/ :: [ivy:resolve] :: loading settings ::
file = D:\apachenutch\ivy\ivysettings.xml [ivy:resolve] [ivy:resolve]
:: problems summary :: [ivy:resolve] :::: WARNINGS [ivy:resolve]
:::::::::::::::::::::::::::::::::::::::::::::: [ivy:resolve]
:: UNRESOLVED DEPENDENCIES :: [ivy:resolve]
:::::::::::::::::::::::::::::::::::::::::::::: [ivy:resolve]
:: org.apache.avro#avro;1.7.6: configuration not found in
org.apache.avro#avro;1.7.6: 'compile'. It was required from
org.apache.gora#gora-core;0.6.1 compile [ivy:resolve]
:::::::::::::::::::::::::::::::::::::::::::::: [ivy:resolve]
[ivy:resolve] [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR
MORE DETAILS
BUILD FAILED D:\apachenutch\build.xml:468: impossible to resolve
dependencies:
resolve failed - see output for details
Total time: 14 seconds
D:\apachenutch>
I have been trying with "Ant Clean" command and "Ant Runtime" command still for many times not luck and got errors like above.
So how I can fix it?
All, I had the below error of 'unresolved dependencies', due to https: required after 1/15/20 under Maven. I was able to update both ivy.xml and ivysettings.xml with the correct https: reference, then errors under the build went away.
I hope the helps folks.
versions being used:
Nutch 2.3.1
Hbase 0.98.8
Solr 5.2.1
Java 7
Build error under ant:
[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: org.apache.hbase#hbase-common;0.98.8-hadoop2: not found
[ivy:resolve] :: log4j#log4j;1.2.15: not found
[ivy:resolve] :: commons-io#commons-io;2.2: not found
[ivy:resolve] :: com.sun.xml.bind#jaxb-impl;2.1.12: not found
[ivy:resolve] :: com.sun.xml.bind#jaxb-impl;2.1.13: not found
[ivy:resolve] :: org.codehaus.jackson#jackson-core-asl;1.6.9: not found
[ivy:resolve] :: org.codehaus.jackson#jackson-mapper-asl;1.6.9: not found
[ivy:resolve] :: io.netty#netty;3.4.0.Final: not found
[ivy:resolve] :: commons-net#commons-net;2.2: not found
[ivy:resolve] :: log4j#log4j;1.2.16: not found
[ivy:resolve] :: commons-digester#commons-digester;1.7: not found
[ivy:resolve] :: org.apache.httpcomponents#httpcore;4.3.2: not found
[ivy:resolve] :: org.apache.hadoop#hadoop-yarn-common;2.2.0: not found
[ivy:resolve] :: org.apache.hadoop#hadoop-yarn-client;2.2.0: not found
[ivy:resolve] :: org.slf4j#slf4j-log4j12;1.6.6: not found
[ivy:resolve] :: org.apache.hadoop#hadoop-yarn-api;2.2.0: not found
[ivy:resolve] :: net.java.dev.jets3t#jets3t;0.7.1: not found
[ivy:resolve] :: asm#asm;3.1: not found
[ivy:resolve] :: org.apache.gora#gora-hbase;0.6.1: not found
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
Cannot reproduce your issue.
I was able to successfully compile the code, using the lastest 2.3.1 release candidate:
git clone https://github.com/apache/nutch.git
cd nutch
git checkout -b release-2.3.1rc2 release-2.3.1rc2
ant
Could I suggest that if you still have an problem you raise an issue against the project. You will need to quote which version you are trying to compile.
https://issues.apache.org/jira/browse/NUTCH
I was able to find a solution for this problem. In my case, I was able to fix it by changing all the http requests by https requests in the following files: ivy.xml, ivy-configurations.xml and ivysettings.xml

SBT xalan#serializer error in IntelliJ

I'm using Intellij to build a Play 2 web app in Scala. However, I keep getting this error inside Intellij.
SBT project import
[warn] [FAILED ] xalan#serializer;2.7.1!serializer.jar(src): (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/xalan/serializer/2.7.1/srcs/serializer-sources.jar
[warn] ==== sbt-plugin-releases: tried
[warn] http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/xalan/serializer/2.7.1/srcs/serializer-sources.jar
[warn] ==== local: tried
[warn] C:\Users\ *** \.ivy2\local\xalan\serializer\2.7.1\srcs\serializer-sources.jar
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xalan#serializer;2.7.1!serializer.jar(src)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] [FAILED ] xalan#serializer;2.7.1!serializer.jar(doc): (0ms)
[warn] ==== local: tried
[warn] C:\Users\ *** \.ivy2\local\xalan\serializer\2.7.1\docs\serializer-javadoc.jar
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ==== Typesafe Releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xalan#serializer;2.7.1!serializer.jar(doc)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
When running the project from a command line everything works correctly, it's just really annoying having this error pop up everytime I open Intellij.
Cheers
After getting the same error and trying lots of stuff, I finally specified a newer version of the missing jar. I added the following to my build.sbt:
libraryDependencies += "xalan" % "serializer" % "2.7.2"
The root problem is that the Javadoc and sources aren't available for xalan serializer v2.7.1 in the public repos that sbt checks, but they are available for the newer version. The small bump in version shouldn't affect anything.
An alternate solution is to not specify that sbt download Javadocs and sources.
Turn off [Project Settings] - [SBT] - [Download source and docs] checkbox
Well IntelliJ IDEA is great, but the sbt plugin has a lot of bugs... You should submit an error report here.
When you create the project check the box for 'Use auto-import'