mirror of https://github.com/sbt/sbt.git
Merge pull request #167 from indrajitr/0.11-startyear
Add start-year to ProjectInfo
This commit is contained in:
commit
f98e4357c2
|
|
@ -39,7 +39,7 @@ object ModuleID
|
|||
if(key.startsWith("e:")) (key, value) else ("e:" + key, value)
|
||||
}
|
||||
/** Additional information about a project module */
|
||||
case class ModuleInfo(nameFormal: String, description: String = "", homepage: Option[URL] = None, licenses: Seq[(String, URL)] = Nil, organizationName: String = "", organizationHomepage: Option[URL] = None)
|
||||
case class ModuleInfo(nameFormal: String, description: String = "", homepage: Option[URL] = None, startYear: Option[Int] = None, licenses: Seq[(String, URL)] = Nil, organizationName: String = "", organizationHomepage: Option[URL] = None)
|
||||
{
|
||||
def formally(name: String) = copy(nameFormal = name)
|
||||
def describing(desc: String, home: Option[URL]) = copy(description = desc, homepage = home)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class MakePom
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
{ makeModuleID(module) }
|
||||
<name>{moduleInfo.nameFormal}</name>
|
||||
{ makeStartYear(moduleInfo) }
|
||||
{ makeOrganization(moduleInfo) }
|
||||
{ extra }
|
||||
{ makeProperties(module) }
|
||||
|
|
@ -64,6 +65,8 @@ class MakePom
|
|||
licenses(module.getLicenses)) : NodeSeq )
|
||||
a ++ b
|
||||
}
|
||||
|
||||
def makeStartYear(moduleInfo: ModuleInfo): NodeSeq = moduleInfo.startYear map { y => <inceptionYear>{y}</inceptionYear> } getOrElse NodeSeq.Empty
|
||||
def makeOrganization(moduleInfo: ModuleInfo): NodeSeq =
|
||||
{
|
||||
<organization>
|
||||
|
|
|
|||
Loading…
Reference in New Issue