mirror of https://github.com/sbt/sbt.git
build sxr, api docs and use sbinary 0.4.0
This commit is contained in:
parent
b7ffd26c28
commit
b470d8ad80
|
|
@ -7,7 +7,8 @@ import Artifact.{defaultExtension, defaultType}
|
|||
|
||||
import java.io.File
|
||||
import java.util.concurrent.Callable
|
||||
import java.util.{Collection, Collections}
|
||||
import java.util.{Collection, Collections => CS}
|
||||
import CS.singleton
|
||||
|
||||
import org.apache.ivy.{core, plugins, util, Ivy}
|
||||
import core.IvyPatternHelper
|
||||
|
|
@ -465,7 +466,7 @@ private object IvySbt
|
|||
if(dynamic) null else {
|
||||
try {
|
||||
val l = getStrategy.findLatest(toArtifactInfo(conflicts), null).asInstanceOf[{def getNode(): IvyNode}]
|
||||
if(l eq null) conflicts else Collections.singleton(l.getNode)
|
||||
if(l eq null) conflicts else singleton(l.getNode)
|
||||
}
|
||||
catch { case e: LatestConflictManager.NoConflictResolvedYetException => null }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package sbt
|
||||
|
||||
import java.io.File
|
||||
import scala.xml.{Node,NodeSeq}
|
||||
import scala.xml.{Node => XNode,NodeSeq}
|
||||
|
||||
import org.apache.ivy.{core, plugins, Ivy}
|
||||
import core.cache.DefaultRepositoryCacheManager
|
||||
|
|
@ -26,7 +26,7 @@ final class PublishConfiguration(val ivyFile: Option[File], val resolverName: St
|
|||
|
||||
final class UpdateConfiguration(val retrieve: Option[RetrieveConfiguration], val missingOk: Boolean, val logging: UpdateLogging.Value)
|
||||
final class RetrieveConfiguration(val retrieveDirectory: File, val outputPattern: String)
|
||||
final case class MakePomConfiguration(file: File, configurations: Option[Iterable[Configuration]] = None, extra: NodeSeq = NodeSeq.Empty, process: Node => Node = n => n, filterRepositories: MavenRepository => Boolean = _ => true)
|
||||
final case class MakePomConfiguration(file: File, configurations: Option[Iterable[Configuration]] = None, extra: NodeSeq = NodeSeq.Empty, process: XNode => XNode = n => n, filterRepositories: MavenRepository => Boolean = _ => true)
|
||||
|
||||
/** Configures logging during an 'update'. `level` determines the amount of other information logged.
|
||||
* `Full` is the default and logs the most.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package sbt
|
||||
|
||||
import java.io.File
|
||||
import scala.xml.{Node, NodeSeq}
|
||||
import scala.xml.NodeSeq
|
||||
|
||||
final class IvyPaths(val baseDirectory: File, val ivyHome: Option[File])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package sbt
|
||||
|
||||
import java.util.Collections
|
||||
import java.util.Collections.emptyMap
|
||||
import scala.collection.mutable.HashSet
|
||||
|
||||
import org.apache.ivy.{core, plugins}
|
||||
|
|
@ -92,7 +92,7 @@ private object IvyScala
|
|||
private def excludeRule(organization: String, name: String, configurationNames: Iterable[String]): ExcludeRule =
|
||||
{
|
||||
val artifact = new ArtifactId(ModuleId.newInstance(organization, name), "*", "jar", "*")
|
||||
val rule = new DefaultExcludeRule(artifact, ExactPatternMatcher.INSTANCE, Collections.emptyMap[AnyRef,AnyRef])
|
||||
val rule = new DefaultExcludeRule(artifact, ExactPatternMatcher.INSTANCE, emptyMap[AnyRef,AnyRef])
|
||||
configurationNames.foreach(rule.addConfiguration)
|
||||
rule
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package sbt;
|
||||
|
||||
import java.io.{BufferedWriter, File, OutputStreamWriter, FileOutputStream}
|
||||
import scala.xml.{Node, NodeSeq, PrettyPrinter, XML}
|
||||
import scala.xml.{Node => XNode, NodeSeq, PrettyPrinter, XML}
|
||||
|
||||
import org.apache.ivy.{core, plugins, Ivy}
|
||||
import core.settings.IvySettings
|
||||
|
|
@ -20,9 +20,9 @@ import plugins.resolver.{ChainResolver, DependencyResolver, IBiblioResolver}
|
|||
class MakePom
|
||||
{
|
||||
def encoding = "UTF-8"
|
||||
def write(ivy: Ivy, module: ModuleDescriptor, configurations: Option[Iterable[Configuration]], extra: NodeSeq, process: Node => Node, filterRepositories: MavenRepository => Boolean, output: File): Unit =
|
||||
def write(ivy: Ivy, module: ModuleDescriptor, configurations: Option[Iterable[Configuration]], extra: NodeSeq, process: XNode => XNode, filterRepositories: MavenRepository => Boolean, output: File): Unit =
|
||||
write(process(toPom(ivy, module, configurations, extra, filterRepositories)), output)
|
||||
def write(node: Node, output: File): Unit = write(toString(node), output)
|
||||
def write(node: XNode, output: File): Unit = write(toString(node), output)
|
||||
def write(xmlString: String, output: File)
|
||||
{
|
||||
output.getParentFile.mkdirs()
|
||||
|
|
@ -36,8 +36,8 @@ class MakePom
|
|||
finally { out.close() }
|
||||
}
|
||||
|
||||
def toString(node: Node): String = new PrettyPrinter(1000, 4).format(node)
|
||||
def toPom(ivy: Ivy, module: ModuleDescriptor, configurations: Option[Iterable[Configuration]], extra: NodeSeq, filterRepositories: MavenRepository => Boolean): Node =
|
||||
def toString(node: XNode): String = new PrettyPrinter(1000, 4).format(node)
|
||||
def toPom(ivy: Ivy, module: ModuleDescriptor, configurations: Option[Iterable[Configuration]], extra: NodeSeq, filterRepositories: MavenRepository => Boolean): XNode =
|
||||
(<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
{ makeModuleID(module) }
|
||||
|
|
@ -150,9 +150,9 @@ class MakePom
|
|||
def toID(name: String) = checkID(name.filter(isValidIDCharacter).mkString, name)
|
||||
def isValidIDCharacter(c: Char) = c.isLetterOrDigit
|
||||
private def checkID(id: String, name: String) = if(id.isEmpty) error("Could not convert '" + name + "' to an ID") else id
|
||||
def mavenRepository(repo: MavenRepository): Node =
|
||||
def mavenRepository(repo: MavenRepository): XNode =
|
||||
mavenRepository(toID(repo.name), repo.name, repo.root)
|
||||
def mavenRepository(id: String, name: String, root: String): Node =
|
||||
def mavenRepository(id: String, name: String, root: String): XNode =
|
||||
<repository>
|
||||
<id>{id}</id>
|
||||
<name>{name}</name>
|
||||
|
|
|
|||
Loading…
Reference in New Issue