在IntelliJ IDEA中创建Scala项目时出现的问题

时间:2017-02-27 09:41:10

标签: scala intellij-idea sbt

所以我一直在尝试使用IntelliJ IDEA中的SBT创建一个Scala项目。 我已经下载了JetBrains Scala插件。 我的系统需要一个代理才能连接到我在IntelliJ IDEA代理设置中设置的互联网 我还设置了所有环境varriables JAVA_HOME,SCALA_HOME,HTTP_PROXY

如果我遗失任何内容,请告诉我

堆栈跟踪附在下面。

[info] Loading project definition from D:\Java\Scala\Coursera\HelloTest03\project
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Defining *:shellPrompt
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Defining */*:sbtStructureOutputFile
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Defining */*:sbtStructureOptions
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from C:/Users/973855/.IdeaIC2016.3/config/plugins/Scala/launcher/sbt-structure-0.13.jar
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Resolving org.scala-sbt#sbt;0.13.13 ...
[info] Resolving org.scala-lang#scala-library;2.10.6 ...
[info] Resolving org.scala-sbt#main;0.13.13 ...
[info] Resolving org.scala-sbt#actions;0.13.13 ...
[info] Resolving org.scala-sbt#classpath;0.13.13 ...
[info] Updating {file:/D:/Java/Scala/Coursera/HelloTest03/}hellotest03...
[info] Resolving org.scala-lang#scala-compiler;2.10.6 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.6 ...
[info] Resolving org.scala-sbt#interface;0.13.13 ...
[info] Resolving org.scala-sbt#io;0.13.13 ...
[info] Resolving org.scala-sbt#control;0.13.13 ...
[info] Resolving org.scala-sbt#launcher-interface;1.0.0-M1 ...
[info] Resolving org.scala-sbt#completion;0.13.13 ...
[info] Resolving org.scala-sbt#collections;0.13.13 ...
[info] Resolving jline#jline;2.13 ...
[info] Resolving org.fusesource.jansi#jansi;1.11 ...
[info] Resolving org.scala-sbt#api;0.13.13 ...
[info] Resolving org.scala-sbt#classfile;0.13.13 ...
[info] Resolving org.scala-sbt#logging;0.13.13 ...
[info] Resolving org.scala-sbt#process;0.13.13 ...
[info] Resolving org.scala-sbt#compiler-integration;0.13.13 ...
[info] Resolving org.scala-sbt#incremental-compiler;0.13.13 ...
[info] Resolving org.scala-sbt#relation;0.13.13 ...
[info] Resolving org.scala-sbt#compile;0.13.13 ...
[info] Resolving org.scala-sbt#persist;0.13.13 ...
[info] Resolving org.scala-tools.sbinary#sbinary_2.10;0.4.2 ...
[info] Resolving org.scala-sbt#compiler-ivy-integration;0.13.13 ...
[info] Resolving org.scala-sbt#ivy;0.13.13 ...
[info] Resolving org.scala-sbt#cross;0.13.13 ...
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-2cf13e211b2cb31f0d3b317289dca70eca3362f6 ...
[info] Resolving com.jcraft#jsch;0.1.50 ...
[info] Resolving org.scala-sbt#serialization_2.10;0.1.2 ...
[info] Resolving org.scala-lang.modules#scala-pickling_2.10;0.10.1 ...
[info] Resolving org.scalamacros#quasiquotes_2.10;2.0.1 ...
[info] Resolving org.json4s#json4s-core_2.10;3.2.10 ...
[info] Resolving org.json4s#json4s-ast_2.10;3.2.10 ...
[info] Resolving com.thoughtworks.paranamer#paranamer;2.6 ...
[info] Resolving org.spire-math#jawn-parser_2.10;0.6.0 ...
[info] Resolving org.spire-math#json4s-support_2.10;0.6.0 ...
[info] Resolving org.scala-sbt#run;0.13.13 ...
[info] Resolving org.scala-sbt#task-system;0.13.13 ...
[info] Resolving org.scala-sbt#tasks;0.13.13 ...
[info] Resolving org.scala-sbt#tracking;0.13.13 ...
[info] Resolving org.scala-sbt#cache;0.13.13 ...
[info] Resolving org.scala-sbt#testing;0.13.13 ...
[info] Resolving org.scala-sbt#test-agent;0.13.13 ...
[info] Resolving org.scala-sbt#test-interface;1.0 ...
[info] Resolving org.scala-sbt#main-settings;0.13.13 ...
[info] Resolving org.scala-sbt#apply-macro;0.13.13 ...
[info] Resolving org.scala-sbt#command;0.13.13 ...
[info] Resolving org.scala-sbt#template-resolver;0.1 ...
[info] Resolving org.scala-sbt#logic;0.13.13 ...
[info] Resolving org.scala-sbt#compiler-interface;0.13.13 ...
[info] Resolving org.scala-lang#scala-library;2.12.1 ...
[info] Resolving org.scala-lang#scala-library;2.12.1 ...
[warn] Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn]  module not found: org.scala-lang#scala-library;2.12.1
[warn] ==== local: tried
[warn]   C:\Users\973855\.ivy2\local\org.scala-lang\scala-library\2.12.1\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.pom
[warn] ==== activator-launcher-local: tried
[warn]   C:\Users\973855\.activator\repository\org.scala-lang\scala-library\2.12.1\ivys\ivy.xml
[warn] ==== activator-local: tried
[warn]   D:\Java\Scala\activator-dist-1.3.12\repository\org.scala-lang\scala-library\2.12.1\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.1/ivys/ivy.xml
[info] Resolving org.scala-lang#scala-compiler;2.12.1 ...
[info] Resolving org.scala-lang#scala-compiler;2.12.1 ...
[warn] Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn]  module not found: org.scala-lang#scala-compiler;2.12.1
[warn] ==== local: tried
[warn]   C:\Users\973855\.ivy2\local\org.scala-lang\scala-compiler\2.12.1\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.pom
[warn] ==== activator-launcher-local: tried
[warn]   C:\Users\973855\.activator\repository\org.scala-lang\scala-compiler\2.12.1\ivys\ivy.xml
[warn] ==== activator-local: tried
[warn]   D:\Java\Scala\activator-dist-1.3.12\repository\org.scala-lang\scala-compiler\2.12.1\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.1/ivys/ivy.xml
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scala-lang#scala-library;2.12.1: not found
[warn]  :: org.scala-lang#scala-compiler;2.12.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      org.scala-lang:scala-library:2.12.1 ((sbt.Classpaths) Defaults.scala#L1293)
[warn]        +- default:hellotest03_2.12:1.0
[warn]      org.scala-lang:scala-compiler:2.12.1
[warn]        +- default:hellotest03_2.12: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.scala-lang#scala-library;2.12.1: not found
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.1: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.1: not found
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.1: not found
[error] Total time: 157 s, completed Feb 27, 2017 2:52:34 PM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0

2 个答案:

答案 0 :(得分:1)

前几天我遇到了类似的问题。删除我的~/.ivy2目录并重新创建/导入项目已经解决了我的问题:)

答案 1 :(得分:1)

删除您的@roles=current_user.roles <%=@roles.each do |role| <div class='radio'> <%=label_tag role.name %> <%=check_box_tag "user[role_ids][]", role.id, current_user.has_role?(role) %> <% end %> 目录并重新导入。

我更喜欢下载激活程序包https://www.lightbend.com/activator/download并使用它来构建我的项目