diff options
Diffstat (limited to 'stage2')
-rw-r--r-- | stage2/Lib.scala | 13 | ||||
-rw-r--r-- | stage2/PublishBuild.scala | 6 | ||||
-rw-r--r-- | stage2/pom.scala | 5 |
3 files changed, 14 insertions, 10 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala index 71568b5..2a108ab 100644 --- a/stage2/Lib.scala +++ b/stage2/Lib.scala @@ -307,8 +307,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ scmUrl: String, // seems like invalid URLs are used here in pom files scmConnection: String, inceptionYear: Int, - organizationName: String, - organizationUrl: URL, + organization: Option[Organization], dependencies: Seq[Dependency], jarTarget: File ): File = { @@ -346,10 +345,12 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ <connection>{scmConnection}</connection> </scm> <inceptionYear>{inceptionYear}</inceptionYear> - <organization> - <name>{organizationName}</name> - <url>{organizationUrl}</url> - </organization> + {organization.map{ org => + <organization> + <name>{org.name}</name> + {org.url.map( url => <url>url</url> )} + </organization> + }} <dependencies> { dependencies.map{ diff --git a/stage2/PublishBuild.scala b/stage2/PublishBuild.scala index 208a166..d744a08 100644 --- a/stage2/PublishBuild.scala +++ b/stage2/PublishBuild.scala @@ -12,8 +12,7 @@ abstract class PublishBuild(context: Context) extends PackageBuild(context){ def scmUrl: String def scmConnection: String def inceptionYear: Int - def organizationName: String - def organizationUrl: URL + def organization: Option[Organization] // ========== package ========== @@ -31,8 +30,7 @@ abstract class PublishBuild(context: Context) extends PackageBuild(context){ scmUrl = scmUrl, scmConnection = scmConnection, inceptionYear, - organizationName, - organizationUrl, + organization, dependencies = dependencies, jarTarget = jarTarget ) diff --git a/stage2/pom.scala b/stage2/pom.scala new file mode 100644 index 0000000..610f9f6 --- /dev/null +++ b/stage2/pom.scala @@ -0,0 +1,5 @@ +package cbt +case class Organization( + name: String, + url: Option[String] +) |