From 0e5221b934f251342bee727724397deb0aaebf99 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Thu, 13 Jul 2023 08:59:34 +0200 Subject: [PATCH] Remove unnecessary MetaInfLicenseNoticeCopy --- build.sbt | 10 ------- project/MetaInfLicenseNoticeCopy.scala | 38 -------------------------- 2 files changed, 48 deletions(-) delete mode 100644 project/MetaInfLicenseNoticeCopy.scala diff --git a/build.sbt b/build.sbt index 69360942..fec1ab97 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,6 @@ lazy val core = .settings(headerSettings(IntegrationTest)) .settings(Defaults.itSettings) .settings(Dependencies.core) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-core", Compile / packageBin / packageOptions += Package.ManifestAttributes( @@ -37,7 +36,6 @@ lazy val coreTest = .disablePlugins(MimaPlugin) .settings(Defaults.itSettings) .settings(Dependencies.coreTest) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-core-test") .settings(publish / skip := true) @@ -50,7 +48,6 @@ lazy val testkit = .settings(headerSettings(IntegrationTest)) .settings(Defaults.itSettings) .settings(Dependencies.testKit) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-testkit") .dependsOn(core) @@ -62,7 +59,6 @@ lazy val jdbc = .settings(headerSettings(IntegrationTest)) .settings(Defaults.itSettings) .settings(Dependencies.jdbc) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-jdbc") .dependsOn(core) @@ -76,7 +72,6 @@ lazy val slick = .settings(headerSettings(IntegrationTest)) .settings(Defaults.itSettings) .settings(Dependencies.slick) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-slick") .dependsOn(jdbc) @@ -91,7 +86,6 @@ lazy val cassandra = .settings(headerSettings(IntegrationTest)) .settings(Defaults.itSettings) .settings(Dependencies.cassandra) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-cassandra") .dependsOn(core) @@ -105,7 +99,6 @@ lazy val cassandra = lazy val eventsourced = Project(id = "eventsourced", base = file("eventsourced")) .settings(Dependencies.eventsourced) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-eventsourced") .dependsOn(core) @@ -118,7 +111,6 @@ lazy val kafka = .settings(headerSettings(IntegrationTest)) .settings(Defaults.itSettings) .settings(Dependencies.kafka) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-kafka") .dependsOn(core) @@ -130,7 +122,6 @@ lazy val `durable-state` = Project(id = "durable-state", base = file("durable-state")) .configs(IntegrationTest) .settings(Dependencies.state) - .settings(MetaInfLicenseNoticeCopy.settings) .settings( name := "pekko-projection-durable-state") .dependsOn(core) @@ -145,7 +136,6 @@ lazy val examples = project .disablePlugins(MimaPlugin) .settings(Defaults.itSettings) .settings(Dependencies.examples) - .settings(MetaInfLicenseNoticeCopy.settings) .dependsOn(slick % "test->test") .dependsOn(jdbc % "test->test") .dependsOn(cassandra % "test->test;test->it") diff --git a/project/MetaInfLicenseNoticeCopy.scala b/project/MetaInfLicenseNoticeCopy.scala deleted file mode 100644 index 69b3362f..00000000 --- a/project/MetaInfLicenseNoticeCopy.scala +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -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) - } - -}