diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000000..f0b56127f0 --- /dev/null +++ b/NOTICE @@ -0,0 +1,11 @@ +Apache Pekko +Copyright 2022, 2023 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (https://www.apache.org/). + +This product contains significant parts that were originally based on software from Lightbend (Akka ). +Copyright (C) 2009-2022 Lightbend Inc. + +Apache Pekko is a derived from Akka 2.6.x, the last version that was distributed under the +Apache License, Version 2.0 License. diff --git a/build.sbt b/build.sbt index 4270ae5fbb..46d27ebcd8 100644 --- a/build.sbt +++ b/build.sbt @@ -113,6 +113,7 @@ lazy val actor = pekkoModule("actor") (Compile / scalaSource).value.getParentFile / s"scala-$ver" }) .settings(VersionGenerator.settings) + .settings(MetaInfLicenseNoticeCopy.settings) .settings(serialversionRemoverPluginSettings) .enablePlugins(BoilerplatePlugin) diff --git a/project/MetaInfLicenseNoticeCopy.scala b/project/MetaInfLicenseNoticeCopy.scala new file mode 100644 index 0000000000..1965dc5408 --- /dev/null +++ b/project/MetaInfLicenseNoticeCopy.scala @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * license agreements; and to You under the Apache License, version 2.0: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * This file is part of the Apache Pekko project, which was derived from Akka. + */ + +import sbt.Keys._ +import sbt._ + +/** + * Copies LICENSE and NOTICE files into jar META-INF dir + */ +object MetaInfLicenseNoticeCopy { + + val settings: Seq[Setting[_]] = inConfig(Compile)( + Seq( + resourceGenerators += copyFileToMetaInf(resourceManaged, "LICENSE"), + resourceGenerators += copyFileToMetaInf(resourceManaged, "NOTICE"))) + + def copyFileToMetaInf(dir: SettingKey[File], fileName: String) = Def.task[Seq[File]] { + val fromFile = (LocalRootProject / baseDirectory).value / fileName + val toFile = resourceManaged.value / "META-INF" / fileName + IO.copyFile(fromFile, toFile) + Seq(toFile) + } + +}