2012-12-06 4 views
7

मैं Play 2.0 ढांचे में नमूने चलाने की कोशिश कर रहा हूं लेकिन जब मैं "play" या "sbt" चलाने के लिए जाता हूं।अनसुलझा निर्भरता एसबीटी org.scala-sbt # sbt_2.9.1; 0.12.1: नहीं मिला, उदाहरण उदाहरण

जब मैं निर्देशिका के लिए जाना "/ नमूने/स्केला/HelloWorld", मैं "एसबीटी" निष्पादित और मैं प्राप्त:

[info] Loading project definition from C:\src\Play20\samples\scala\helloworld\project 
[warn] module not found: play#sbt-plugin;2.0 
[warn] ==== typesafe-ivy-releases: tried 
[warn] http://repo.typesafe.com/typesafe/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml 
[warn] ==== sbt-plugin-releases: tried 
[warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml 
[warn] ==== local: tried 
[warn] C:\Users\labra\.ivy2\local\play\sbt-plugin\scala_2.9.2\sbt_0.12\2.0\ivys\ivy.xml 
[warn] ==== Typesafe repository: tried 
[warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom 
[warn] ==== public: tried 
[warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: play#sbt-plugin;2.0: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] 
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. 
[warn]  play:sbt-plugin:2.0 (sbtVersion=0.12, scalaVersion=2.9.2) 
[warn] 
sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found 
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214) 
. . . 

    at java.lang.Thread.run(Thread.java:722) 
[error] (*:update) sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found 
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
[info] Loading project definition from C:\src\Play20\samples\scala\helloworld\project 
[warn] module not found: play#sbt-plugin;2.0 
[warn] ==== typesafe-ivy-releases: tried 
[warn] http://repo.typesafe.com/typesafe/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml 
[warn] ==== sbt-plugin-releases: tried 
[warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml 
[warn] ==== local: tried 
[warn] C:\Users\labra\.ivy2\local\play\sbt-plugin\scala_2.9.2\sbt_0.12\2.0\ivys\ivy.xml 
[warn] ==== Typesafe repository: tried 
[warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom 
[warn] ==== public: tried 
[warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: play#sbt-plugin;2.0: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] 
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. 
[warn]  play:sbt-plugin:2.0 (sbtVersion=0.12, scalaVersion=2.9.2) 
[warn] 
sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found 
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214) 
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122) 
. . . 
    at java.lang.Thread.run(Thread.java:722) 
[error] (*:update) sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found 
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q 

मैं http://www.scala-sbt.org/release/docs/Getting-Started/Setup

से एसबीटी संस्करण 12.1 स्थापित मैं एक ऐसी ही सवाल देखा यहां: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/DGUbWsgZiLw

उत्तर में, यह एसबीटी के "लॉन्चर" संस्करण से संबंधित प्रतीत होता है, मुझे कैसे पता चलेगा कि मेरा लॉन्चर एसबीटी संस्करण कौन है? और मैं इसे कैसे अपडेट कर सकता हूं?

मैं भी स्रोत से xsbt संकलन करने की कोशिश की लेकिन, जब "एसबीटी निर्माण सभी" चल रहा है, मैं प्राप्त:

. . . 
[info] Reading library jar [C:\compi\jdk\jre\lib\rt.jar] 
[error] Error: Can't read [[email protected]] (Can't process class [com/oracle/net/Sdp$1.class] (Unsupported version number [51.0] for class format)) 
[error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
[error] Use 'last' for the full log. 

हालांकि, मेरी समस्या xsbt संकलित करने के लिए है, लेकिन पता करने के लिए मैं कैसे निष्पादित कर सकते हैं नहीं है "खेल के उदाहरण"

जब "एसबीटी एसबीटी-संस्करण" चल रहा है एक नया फ़ोल्डर में मैं प्राप्त:

[info] Set current project to default-85f41b (...) 
[info] 0.12.1 

उत्तर

6

आप project/plugins.sbt को देखें, तो आप देखेंगे कि यहउम्मीद देखेंगेप्रणाली संपत्ति स्थापित किया जाना:

addSbtPlugin("play" % "sbt-plugin" % Option(System.getProperty("play.version")).getOrElse("2.0")) 

तो, आप या तो बदल प्रदान करना चाहिए आवश्यक play.version संपत्ति

$ sbt -Dplay.version=2.1-RC1 

या बस plugins.sbt रूप

addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1") 
+0

मैंने किया था, लेकिन यह अभी तक काम नहीं कर रहा। यह लौटाता है: [जानकारी] सी: \ src \ Play20 \ नमूने \ scala \ helloworld \ project [त्रुटि] सी: \ src \ Play20 \ नमूने \ scala \ helloworld \ project \ Build.scala: 2: से नहीं: मिला: ऑब्जेक्ट कुंजी [त्रुटि] आयात Keys._ [त्रुटि]^ [त्रुटि] एक त्रुटि मिली [त्रुटि] (संकलन: संकलन) संकलन विफल – Labra

+0

मैं केवल परियोजना को साफ करने और पुनः प्रयास करने का सुझाव दे सकता हूं। – 4e6

+0

क्या आपका मतलब है "एसबीटी क्लीन" निष्पादित करना? क्योंकि मुझे एक ही त्रुटि मिलती है। मैं कुछ मदद की तलाश में था और मुझे स्कैला संस्करण से संबंधित कुछ मिल सकता था, लेकिन मुझे यकीन नहीं है कि यह समस्या है या नहीं। मेरा स्कैला संस्करण 2.9.2 है। मुझे परियोजना को कैसे साफ करना चाहिए और पुनः प्रयास करना चाहिए? – Labra

2

मैं छोड़ने के बाद भी समस्या का समाधान कर लिया 2.1-आरसी 1

मेरे पास भी था plugins.sbt

में

// The Typesafe snapshots repository 
resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/" 

मैं सिर्फ पीछा कर रहा था: https://github.com/playframework/Play20/wiki/Repositories

1

लिए खेलने 2.0.2, संस्करण एसबीटी के 2.0.2 सिर्फ काम कुछ निर्भरता जो मैं डालने के साथ इस मुद्दे का हल मेरी परियोजना में ठीक है। मैं अपने plugins.sbt फ़ाइल में addSbtPlugin लाइन बदल:

addSbtPlugin("play" % "sbt-plugin" % "2.0.2") 

यह पहले के संस्करणों के लिए अनुरूप होना चाहिए। के रूप में पहले से ही Labra ने बताया एसबीटी के इस संस्करण अब नहीं नवीनतम है के बाद से, तो आप शायद आदेश प्राप्त करने के लिए भी निम्न समाधानकर्ता जोड़ने की आवश्यकता होगी यह:

resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/" 

इस तरह की समस्या से छुटकारा पाने का एक अन्य तरीका यदि संभव हो तो अपने प्रोजेक्ट के लिए नवीनतम संस्करण में Play Framework को अपडेट कर रहा है। यह शायद लंबे समय तक सबसे अच्छा विकल्प है क्योंकि यह आपको अपना कोड बेस चालू रखने की अनुमति देता है।

4

उत्प्रेरक के लिए 1.0 उपयोगकर्ताओं:

जब के बाद बाद के संस्करण करने के लिए एक प्ले परियोजना के उन्नयन आप इस समस्या का सामना कर सकते आप उत्प्रेरक 1.0 में प्रोजेक्ट लोड। ऐसा इसलिए है क्योंकि एक्टिवेटर/प्रोजेक्ट निर्देशिका में फ़ाइलें बनाता है जो activator-...-shim.sbt जैसा दिखता है। उन फ़ाइलों को हटाएं और एक्टिवेटर को आपके अगले संकलन पर समस्या को हल करना चाहिए।

+0

पोस्टिंग के लिए धन्यवाद इस। मैंने यह जानने का प्रयास करने में घंटों बिताए कि मुझे त्रुटियां क्यों मिल रही हैं और मुझे यह पता लगाने से पहले कई अलग-अलग एसबीटी/प्ले संस्करण combos की कोशिश की। – eSniff

0

जोस के जवाब के बाद, मैं यह काम है, लेकिन इस रिसोल्वर के साथ किए गए:

"Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/maven-releases" 
संबंधित मुद्दे