How to provide explicit project dependency with classifier "sources"?

48 views
Skip to first unread message

Ezh

unread,
Jan 11, 2013, 6:22:13 AM1/11/13
to simple-b...@googlegroups.com
Hi.

    Due to lack of support P2 dependency mechanism I want to provide explicit dependencies for my project:

libraryDependencies ++= {
  val os = (sys.props("os.name"), sys.props("os.arch")) match {
    case ("Linux", "amd64") => "gtk.linux.x86_64"
    case ("Linux", _) => "gtk.linux.x86"
    case ("Mac OS X", "amd64" | "x86_64") => "cocoa.macosx.x86_64"
    case ("Mac OS X", _) => "cocoa.macosx.x86"
    case (os, "amd64") if os.startsWith("Windows") => "win32.win32.x86_64"
    case (os, _) if os.startsWith("Windows") => "win32.win32.x86"
    case (os, arch) => sys.error("Cannot obtain lib for OS '" + os + "' and architecture '" + arch + "'")
  }
  val artifact = "org.eclipse.swt." + os
  val mirror = "http://eclipse.ialto.com/eclipse/updates/4.2/R-4.2.1-201209141800/plugins/"
  Seq(
    "org.eclipse.swt" % artifact % "3.100.1.v4234e" from mirror + artifact + "_3.100.1.v4234e.jar",
    "org.eclipse.swt" % artifact % "3.100.1.v4234e" from mirror + artifact + ".source_3.100.1.v4234e.jar" classifier "sources",
  )
}


after > update-classifiers

And I've got

[info] Updating {file:/home/ezh/projects/digi-TABuddy-desktop/0.1/project-dev/}default-2a1643...
[info] Resolving org.aspectj#aspectjtools;1.7.0 ...
[warn]  [NOT FOUND  ] org.eclipse.swt#org.eclipse.swt.gtk.linux.x86_64;3.100.1.v4234e!org.eclipse.swt.gtk.linux.x86_64.jar (0ms)
[warn] ==== local: tried
[warn]   /home/ezh/.ivy2/local/org.eclipse.swt/org.eclipse.swt.gtk.linux.x86_64/3.100.1.v4234e/jars/org.eclipse.swt.gtk.linux.x86_64-sources.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.eclipse.swt#org.eclipse.swt.gtk.linux.x86_64;3.100.1.v4234e!org.eclipse.swt.gtk.linux.x86_64.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: download failed: org.eclipse.swt#org.eclipse.swt.gtk.linux.x86_64;3.100.1.v4234e!org.eclipse.swt.gtk.linux.x86_64.jar
[error] Total time: 1 s, completed 11.01.2013 15:16:01

How to provide source artifact for sbt?

P.S. I read https://github.com/harrah/xsbt/wiki/Library-Management carefully.

King regards,
Alexey


Reply all
Reply to author
Forward
0 new messages