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)
|
if(key.startsWith("e:")) (key, value) else ("e:" + key, value)
|
||||||
}
|
}
|
||||||
/** Additional information about a project module */
|
/** 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 formally(name: String) = copy(nameFormal = name)
|
||||||
def describing(desc: String, home: Option[URL]) = copy(description = desc, homepage = home)
|
def describing(desc: String, home: Option[URL]) = copy(description = desc, homepage = home)
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ class MakePom
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
{ makeModuleID(module) }
|
{ makeModuleID(module) }
|
||||||
<name>{moduleInfo.nameFormal}</name>
|
<name>{moduleInfo.nameFormal}</name>
|
||||||
|
{ makeStartYear(moduleInfo) }
|
||||||
{ makeOrganization(moduleInfo) }
|
{ makeOrganization(moduleInfo) }
|
||||||
{ extra }
|
{ extra }
|
||||||
{ makeProperties(module) }
|
{ makeProperties(module) }
|
||||||
|
|
@ -64,6 +65,8 @@ class MakePom
|
||||||
licenses(module.getLicenses)) : NodeSeq )
|
licenses(module.getLicenses)) : NodeSeq )
|
||||||
a ++ b
|
a ++ b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def makeStartYear(moduleInfo: ModuleInfo): NodeSeq = moduleInfo.startYear map { y => <inceptionYear>{y}</inceptionYear> } getOrElse NodeSeq.Empty
|
||||||
def makeOrganization(moduleInfo: ModuleInfo): NodeSeq =
|
def makeOrganization(moduleInfo: ModuleInfo): NodeSeq =
|
||||||
{
|
{
|
||||||
<organization>
|
<organization>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue