2013-10-17 65 views
3

在sbt构建中为依赖项设置Maven POM属性的值有哪些选项?如何在依赖项中设置Maven的pom属性的值?

我的项目对Maven下的另一个项目有依赖性。我想我需要以某种方式为my.classifier提供一个值。这是依赖的pom.xml的一部分:

<dependency> 
    <groupId>com.mycoolproject.something</groupId> 
    <artifactId>core</artifactId> 
    <version>1.0</version> 
    <classifier>${my.classifier}</classifier> 
</dependency> 

目前我得到:

[warn] ==== public: tried 
[warn] http://repo1.maven.org/maven2/com/mycoolproject/something/core/0.4.0/core-1.0-${my.classifier}.jar 

回答

2

可以使用一种解决方法现在classifiers of SBT

"the.other.dependency.that.needs.the.lib" % "x" % "1.0" exclude("com.mycoolproject.something", "core") 
"com.mycoolproject.something" % "core" % "1.0" classifier "myvalue" 
相关问题