diff options
-rw-r--r-- | stage2/Lib.scala | 6 | ||||
-rw-r--r-- | stage2/PublishBuild.scala | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala index 99f6a55..2523735 100644 --- a/stage2/Lib.scala +++ b/stage2/Lib.scala @@ -298,6 +298,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ groupId: String, artifactId: String, version: String, + scalaMajorVersion: String, name: String, description: String, url: URL, @@ -313,7 +314,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>{groupId}</groupId> - <artifactId>{artifactId}</artifactId> + <artifactId>{artifactId ++ "_" ++ scalaMajorVersion}</artifactId> <version>{version}</version> <packaging>jar</packaging> <name>{name}</name> @@ -356,7 +357,8 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ } </dependencies> </project> - val path = jarTarget.toString ++ ( "/" ++ artifactId ++ "-" ++ version ++ ".pom" ) + // FIXME: do not build this file name including scalaMajorVersion in multiple places + val path = jarTarget.toString ++ ( "/" ++ artifactId++ "_" ++ scalaMajorVersion ++ "-" ++ version ++ ".pom" ) val file = new File(path) Files.write(file.toPath, ("<?xml version='1.0' encoding='UTF-8'?>\n" ++ xml.toString).getBytes) file diff --git a/stage2/PublishBuild.scala b/stage2/PublishBuild.scala index cc4f5e5..60e3853 100644 --- a/stage2/PublishBuild.scala +++ b/stage2/PublishBuild.scala @@ -21,6 +21,7 @@ abstract class PublishBuild(context: Context) extends PackageBuild(context){ groupId = groupId, artifactId = artifactId, version = version, + scalaMajorVersion = scalaMajorVersion, name = name, description = description, url = url, @@ -34,7 +35,7 @@ abstract class PublishBuild(context: Context) extends PackageBuild(context){ ) // ========== publish ========== - final protected def releaseFolder = s"/${groupId.replace(".","/")}/$artifactId/$version/" + final protected def releaseFolder = s"/${groupId.replace(".","/")}/${artifactId}_$scalaMajorVersion/$version/" def snapshotUrl = new URL("https://oss.sonatype.org/content/repositories/snapshots") def releaseUrl = new URL("https://oss.sonatype.org/service/local/staging/deploy/maven2") override def copy(context: Context) = super.copy(context).asInstanceOf[PublishBuild] |