implements #41

This commit is contained in:
Mark Harrah 2011-06-10 07:48:54 -04:00
parent d64cd8e34d
commit 36d2394208
2 changed files with 8 additions and 5 deletions

View File

@ -573,7 +573,7 @@ object Classpaths
if(isPlugin) sr +: base else base
},
offline in GlobalScope :== false,
moduleID <<= normalizedName.identity,
moduleName <<= normalizedName.identity,
defaultConfiguration in GlobalScope :== Some(Configurations.Compile),
defaultConfigurationMapping in GlobalScope <<= defaultConfiguration{ case Some(d) => "*->" + d.name; case None => "*->*" },
ivyPaths <<= (baseDirectory, appConfiguration) { (base, app) => new IvyPaths(base, bootIvyHome(app)) },
@ -594,8 +594,8 @@ object Classpaths
publishTo in GlobalScope :== None,
artifactPath in makePom <<= artifactPathSetting(artifact in makePom),
publishArtifact in makePom <<= publishMavenStyle.identity,
artifact in makePom <<= moduleID( name => Artifact(name, "pom", "pom") ),
projectID <<= (organization,moduleID,version,artifacts,crossPaths){ (org,module,version,as,crossEnabled) =>
artifact in makePom <<= moduleName( name => Artifact(name, "pom", "pom") ),
projectID <<= (organization,moduleName,version,artifacts,crossPaths){ (org,module,version,as,crossEnabled) =>
ModuleID(org, module, version).cross(crossEnabled).artifacts(as : _*)
},
resolvers in GlobalScope :== Nil,
@ -833,7 +833,9 @@ object Classpaths
import DependencyFilter._
def managedJars(config: Configuration, jarTypes: Set[String], up: UpdateReport): Classpath =
up.select( configuration = configurationFilter(config.name), artifact = artifactFilter(`type` = jarTypes) ) classpath;
up.filter( configurationFilter(config.name) && artifactFilter(`type` = jarTypes) ).toSeq.map { case (conf, module, art, file) =>
Attributed(file)(AttributeMap.empty.put(artifact.key, art).put(moduleID.key, module).put(configuration.key, config))
} distinct;
def autoPlugins(report: UpdateReport): Seq[String] =
{

View File

@ -217,8 +217,9 @@ object Keys
val pomPostProcess = SettingKey[XNode => XNode]("pom-post-process", "Transforms the generated POM.")
val pomIncludeRepository = SettingKey[MavenRepository => Boolean]("pom-include-repository", "Selects repositories to include in the generated POM.")
val moduleID = SettingKey[String]("module-id", "The name of the current module, used for dependency management.")
val moduleName = SettingKey[String]("module-name", "The name of the current module, used for dependency management.")
val version = SettingKey[String]("version", "The version/revision of the current module.")
val moduleID = SettingKey[ModuleID]("module", "A dependency management descriptor. This is currently used for associating a ModuleID with a classpath entry.")
val projectID = SettingKey[ModuleID]("project-id", "The dependency management descriptor for the current module.")
val externalResolvers = TaskKey[Seq[Resolver]]("external-resolvers", "The external resolvers for automatically managed dependencies.")
val resolvers = SettingKey[Seq[Resolver]]("resolvers", "The user-defined additional resolvers for automatically managed dependencies.")