mirror of https://github.com/sbt/sbt.git
Declare extra namespace in ModuleDescriptor for parsed plugin poms. Fixes #368.
This commit is contained in:
parent
4daed3b745
commit
45eacbad4c
|
|
@ -64,7 +64,7 @@ object CustomPomParser
|
|||
// Fixes up the detected extension in some cases missed by Ivy.
|
||||
val convertArtifacts = artifactExtIncorrect(md)
|
||||
|
||||
val unqualify = filtered - ExtraAttributesKey
|
||||
val unqualify = (filtered - ExtraAttributesKey) map { case (k,v) => ("e:" + k, v) }
|
||||
if(unqualify.isEmpty && extraDepAttributes.isEmpty && !convertArtifacts)
|
||||
md
|
||||
else
|
||||
|
|
@ -168,6 +168,7 @@ object CustomPomParser
|
|||
for(l <- md.getLicenses) dmd.addLicense(l)
|
||||
for( (key,value) <- md.getExtraInfo.asInstanceOf[java.util.Map[String,String]].asScala ) dmd.addExtraInfo(key, value)
|
||||
for( (key, value) <- md.getExtraAttributesNamespaces.asInstanceOf[java.util.Map[String,String]].asScala ) dmd.addExtraAttributeNamespace(key, value)
|
||||
IvySbt.addExtraNamespace(dmd)
|
||||
for( dd <- md.getDependencies ) dmd.addDependency(addExtra(dd, dependencyExtra))
|
||||
|
||||
for( ed <- md.getInheritedDescriptors) dmd.addInheritedDescriptor( new DefaultExtendsDescriptor( mrid, resolvedMrid, ed.getLocation, ed.getExtendsTypes) )
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ final class IvySbt(val configuration: IvyConfiguration)
|
|||
case ifc: IvyFileConfiguration => configureIvyFile(ifc)
|
||||
}
|
||||
moduleSettings.ivyScala.foreach(IvyScala.checkModule(baseModule, baseConfiguration))
|
||||
baseModule.getExtraAttributesNamespaces.asInstanceOf[java.util.Map[String,String]].put("e", "http://ant.apache.org/ivy/extra")
|
||||
IvySbt.addExtraNamespace(baseModule)
|
||||
(baseModule, baseConfiguration)
|
||||
}
|
||||
private def configureInline(ic: InlineConfiguration, log: Logger) =
|
||||
|
|
@ -286,6 +286,9 @@ private object IvySbt
|
|||
import configuration._
|
||||
new IvyConfig(name, if(isPublic) PUBLIC else PRIVATE, description, extendsConfigs.map(_.name).toArray, transitive, null)
|
||||
}
|
||||
def addExtraNamespace(dmd: DefaultModuleDescriptor): Unit =
|
||||
dmd.addExtraAttributeNamespace("e", "http://ant.apache.org/ivy/extra")
|
||||
|
||||
/** Adds the ivy.xml main artifact. */
|
||||
private def addMainArtifact(moduleID: DefaultModuleDescriptor)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue