2012-05-17 42 views
6

Tôi có một Play 2.1-SNAPSHOT dựa trên ứng dụng chạy tốt tại địa phương nhưng khi tôi cố gắng để triển khai đến Heroku tôi nhận được lỗi sau:Triển khai Chơi 2.1-SNAPSHOT ứng dụng dựa trên Heroku

[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
    [warn] ::   UNRESOLVED DEPENDENCIES   :: 
    [warn] :::::::::::::::::::::::::::::::::::::::::::::: 
    [warn] :: play#sbt-plugin;2.1-SNAPSHOT: not found 
    [warn] :::::::::::::::::::::::::::::::::::::::::::::: 
    [warn] 
    [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested 

attributes.

plugins.sbt My các điểm tệp đến một kho lưu trữ cục bộ chứa các phụ thuộc 2.1-SNAPSHOT:

resolvers ++= Seq( 
    "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/", 
    Resolver.file("My Repository", file("repository/local")) 
) 

// Use the Play sbt plugin for Play projects 
addSbtPlugin("play" % "sbt-plugin" % "2.1-SNAPSHOT") 

Thư mục "kho/cục bộ" được kiểm tra trong kho GIT của tôi. Nó trông giống như SBT trên Heroku đang tìm kiếm trong kho địa phương kể từ trước khi lỗi "Chưa giải quyết phụ thuộc" Tôi thấy những lời cảnh báo sau đây:

[warn] ==== Typesafe repository: tried 
    [warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.1_0.11.2/2.1-SNAPSHOT/sbt-plugin-2.1-SNAPSHOT.pom 
    [warn] ==== My Repository: tried 
    [warn] ==== heroku-sbt-typesafe: tried 
    [warn] ==== heroku-central: tried 

Chạy "vở kịch" lệnh tại địa phương kết thúc thành công.

+0

Tôi nghĩ cách tiếp cận khác là thêm repo CloudBees CI Snapshot thay vì sử dụng repo tệp cục bộ. –

Trả lời

6

Đã tìm thấy sự cố. Tôi cần phải tuyên bố "My Repository" như một kho lưu trữ Ivy bằng cách thêm "Resolver.ivyStylePatterns" sau khi thống xử lý tập tin như thế này:

Resolver.file("My Repository", file("repository/local/"))(Resolver.ivyStylePatterns) 
8

Một cách khác là để thêm kho typesafe ivy-snapshots như một resolver Plugin Nếu bạn muốn không thích sử dụng repo tệp cục bộ.

Trong dự án /plugins.sbt:

resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns) 
0

Các http://repo.typesafe.com/typesafe/ivy-snapshots/ dường như không còn hoạt động, cấu hình sau làm việc cho tôi:

trong plugins.sbt của bạn:

//play sbt-plugin snapshot 

resolvers += Resolver.url("Typesafe Simple Snapshots", url("https://repo.typesafe.com/typesafe/simple/snapshots/"))(Resolver.ivyStylePatterns) 

//play snapshot 

resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/" 

// The Play plugin 

addSbtPlugin("com.typesafe.play" %% "sbt-plugin" % "2.4-SNAPSHOT") 

trong build.sbt

của bạn
Các vấn đề liên quan