mirror of https://github.com/sbt/sbt.git
Merge pull request #361 from vigdorchik/add_ivy_force
Mirror ivy \'force\' attribute in sbt.
This commit is contained in:
commit
e0a141f8e7
|
|
@ -404,7 +404,7 @@ private object IvySbt
|
|||
{
|
||||
for(dependency <- dependencies)
|
||||
{
|
||||
val dependencyDescriptor = new DefaultDependencyDescriptor(moduleID, toID(dependency), false, dependency.isChanging, dependency.isTransitive)
|
||||
val dependencyDescriptor = new DefaultDependencyDescriptor(moduleID, toID(dependency), dependency.isForce, dependency.isChanging, dependency.isTransitive)
|
||||
dependency.configurations match
|
||||
{
|
||||
case None => // The configuration for this dependency was not explicitly specified, so use the default
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import scala.xml.NodeSeq
|
|||
import org.apache.ivy.plugins.resolver.{DependencyResolver, IBiblioResolver}
|
||||
import org.apache.ivy.util.url.CredentialsStore
|
||||
|
||||
final case class ModuleID(organization: String, name: String, revision: String, configurations: Option[String] = None, isChanging: Boolean = false, isTransitive: Boolean = true, explicitArtifacts: Seq[Artifact] = Nil, exclusions: Seq[ExclusionRule] = Nil, extraAttributes: Map[String,String] = Map.empty, crossVersion: CrossVersion = CrossVersion.Disabled)
|
||||
final case class ModuleID(organization: String, name: String, revision: String, configurations: Option[String] = None, isChanging: Boolean = false, isTransitive: Boolean = true, isForce: Boolean = false, explicitArtifacts: Seq[Artifact] = Nil, exclusions: Seq[ExclusionRule] = Nil, extraAttributes: Map[String,String] = Map.empty, crossVersion: CrossVersion = CrossVersion.Disabled)
|
||||
{
|
||||
override def toString =
|
||||
organization + ":" + name + ":" + revision +
|
||||
|
|
@ -28,6 +28,7 @@ final case class ModuleID(organization: String, name: String, revision: String,
|
|||
def notTransitive() = intransitive()
|
||||
def intransitive() = copy(isTransitive = false)
|
||||
def changing() = copy(isChanging = true)
|
||||
def force() = copy(isForce = true)
|
||||
def from(url: String) = artifacts(Artifact(name, new URL(url)))
|
||||
def classifier(c: String) = artifacts(Artifact(name, c))
|
||||
def artifacts(newArtifacts: Artifact*) = copy(explicitArtifacts = newArtifacts ++ this.explicitArtifacts)
|
||||
|
|
|
|||
Loading…
Reference in New Issue