play无法解析依赖版本

时间:2014-04-04 08:27:17

标签: java playframework playframework-2.0 sbt ivy

我目前正在开发一个作为前端开发人员的播放应用程序。由于超出此问题范围的原因,我已将开发从mac转移到Windows机器。这是我的问题开始的地方(惊讶?)。

我们的大部分系统运作良好,但有一个非常顽固的问题,我无法解决。似乎永远不会解析依赖版本,以便定义为 $ {version.org.codehaus.jackson} 的版本保留$ {version.org.codehaus.jackson},并且永远不会解析为其版本号 1.9.2

我们的应用程序(也是?)有许多依赖项。这些依赖项在ivysettings中定义,然后整个神奇地得到构建(我们使用sbt来管理它)。

现在,我是一个不起眼的前端开发人员,所以这里有很多魔法......好神奇。后端团队开始放弃我,我也是,但显然存在一个问题,即版本没有被解析。

我的最终结果是:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::                                                                                           
[warn]  ::          UNRESOLVED DEPENDENCIES         ::                                                                                           
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::                                                                                           
[warn]  :: org.codehaus.jackson#jackson-mapper-asl;${version.org.codehaus.jackson}: not found                                                    
[warn]  :: commons-configuration#commons-configuration;${version.commons-configuration}: not found                                               
[warn]  :: org.codehaus.jackson#jackson-core-asl;${version.org.codehaus.jackson}: not found                                                      
[warn]  :: org.hibernate#hibernate-core;${version.org.hibernate}: not found                                                                      
[warn]  :: commons-pool#commons-pool;${version.commons-pool}: not found                                                                          
[warn]  :: commons-io#commons-io;${version.commons-io}: not found                                                                                
[warn]  :: log4j#log4j;${version.log4j}: not found                                                                                               
[warn]  :: jline#jline;${version.jline}: not found                                                                                               
[warn]  :: commons-collections#commons-collections;${version.commons-collections}: not found                                                     
[warn]  :: commons-beanutils#commons-beanutils;${version.commons-beanutils}: not found                                                           
[warn]  :: dom4j#dom4j;${version.dom4j}: not found                                                                                               
[warn]  :: antlr#antlr;${version.antlr}: not found                                                                                               
[warn]  :: org.hornetq#hornetq-core;${version.org.hornetq}: not found                                                                            
[warn]  :: org.hornetq#hornetq-jms;${version.org.hornetq}: not found                                                                             
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::                                                                                           
[trace] Stack trace suppressed: run last *:update for the full output.                                                                           
[error] (*:update) sbt.ResolveException: unresolved dependency: org.codehaus.jackson#jackson-mapper-asl;${version.org.codehaus.jackson}: not found     

我知道这还不足以完全理解这个问题。但是项目没有问题,它在我的Mac上没有任何问题编译,但在我的Windows机器上没有。版本保持为 $ {version.org.whatever} ,而不是被解析为漂亮的版本。

播放2.2.2并安装了sbt(0.13我想)以及一个正在运行的java jdk。基于大致相同代码库的其他项目也可以。

洙。任何人都可以给我一个正确方向的推动?我现在很无能,有没有办法介入版本解析或者看看发生了什么?

感谢有时间看这个

的人

巴德

编辑:添加了我的build.scala []中的所有值都被故意删除

import sbt._
import Keys._
import play.Project._


object ApplicationBuild extends Build {

  val appName = "[myApp"
  val appVersion = "1.5-SNAPSHOT"
  val solrsearchVersion = "4.4-SNAPSHOT"
  val syndicationVersion = "1.15-SNAPSHOT";
  val playCommonsVersion = "0.1-SNAPSHOT";
  val nexusDomain = "[myNexus]"
  val nexusWimp = "http://" + nexusDomain + "[nexuspath]"


  val appDependencies = Seq(

    // PLAY MODULES
    javaCore,
    javaEbean,


    "[mycompany]" %% "play-commons" % playCommonsVersion,
    "[mycompany].syndication" % "syndication-api" % syndicationVersion,
    "[mycompany].syndication.user" % "user-api" % syndicationVersion,
    "[mycompany].syndication.playlist" % "playlist-api" % syndicationVersion,
    "[mycompany].syndication" % "syndication-client" % syndicationVersion,
    "[mycompany].system.solrsearch" % "solrsearch-api" % solrsearchVersion,

    "com.google.inject" % "guice" % "3.0",
    "com.google.guava" % "guava" % "15.0",
    "joda-time" % "joda-time" % "2.3"

  )

  val main = play.Project(appName, appVersion, appDependencies).settings(

    organization := "[mycompany]",

    credentials += Credentials("Sonatype Nexus Repository Manager", nexusDomain, "[username]", "[password]"),

    resolvers := Seq(

      // LOCAL
      "Local Maven" at "file://" + Path.userHome.absolutePath + "/.m2/repository",

      // TYPESAFE
      "Typesafe" at "http://repo.typesafe.com/typesafe/releases/",

      // [myCompany]
      "[myCompany] nexus repository" at nexusWimp

    ),

    publishTo := {
      Some("[myCompany] nexus repos" at nexusWimp)
    }


  )

  val printWriter = new java.io.PrintWriter(new File("VERSION"))    

0 个答案:

没有答案