This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git


The following commit(s) were added to refs/heads/main by this push:
     new ce85d522a add license entry for sbt BSD license (#248)
ce85d522a is described below

commit ce85d522a6324ad964bd40d05c86056f619843ae
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Jul 19 13:01:50 2023 +0100

    add license entry for sbt BSD license (#248)
---
 LICENSE                                            | 30 ++++++++++++++++++++++
 .../impl/engine/http2/util/AsciiTreeLayout.scala   | 11 ++------
 project/CopyrightHeader.scala                      |  6 ++++-
 3 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/LICENSE b/LICENSE
index f42d15ef5..bebefaf52 100644
--- a/LICENSE
+++ b/LICENSE
@@ -278,3 +278,33 @@ pekko-http-core contains code based on code by Tim Kienzle 
with his permission t
 (C) 2000 by Tim Kientzle <[email protected]>
 
 ---------------
+
+pekko-http-core contains code from sbt 0.12 which was distributed under a 
BSD-style license
+<https://github.com/sbt/sbt/blob/0.12/LICENSE>.
+
+ - 
http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/util/AsciiTreeLayout.scala
+
+Copyright (c) 2008, 2009, 2010 Steven Blundy, Josh Cough, Mark Harrah, Stuart 
Roebuck, Tony Sloane, Vesa Vilhonen, Jason Zaugg
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git 
a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/util/AsciiTreeLayout.scala
 
b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/util/AsciiTreeLayout.scala
index df9d1f237..a3933974f 100644
--- 
a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/util/AsciiTreeLayout.scala
+++ 
b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/util/AsciiTreeLayout.scala
@@ -1,18 +1,11 @@
-/*
- * 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.
- */
-
 /* sbt -- Simple Build Tool
  * Copyright 2011 Mark Harrah, Eugene Yokota
  *
  * Copied from sbt 0.12 source code
  */
 
+// copied from https://github.com/sbt/sbt/blob/0.12/main/SettingGraph.scala
+
 package org.apache.pekko.http.impl.engine.http2.util
 
 private[http2] object AsciiTreeLayout {
diff --git a/project/CopyrightHeader.scala b/project/CopyrightHeader.scala
index e13b12428..6f72b32f8 100644
--- a/project/CopyrightHeader.scala
+++ b/project/CopyrightHeader.scala
@@ -68,7 +68,8 @@ object CopyrightHeader extends AutoPlugin {
 
     override def apply(text: String, existingText: Option[String]): String = {
       val formatted = existingText match {
-        case Some(currentText) if isApacheCopyrighted(currentText) || 
isGenerated(currentText) =>
+        case Some(currentText)
+            if isApacheCopyrighted(currentText) || isGenerated(currentText) || 
isSbt012Licensed(currentText) =>
           currentText
         case Some(currentText) if 
isOnlyLightbendCopyrightAnnotated(currentText) =>
           
HeaderCommentStyle.cStyleBlockComment.commentCreator(apacheFromAkkaSourceHeader,
@@ -112,4 +113,7 @@ object CopyrightHeader extends AutoPlugin {
   private def isOnlyLightbendCopyrightAnnotated(text: String): Boolean = {
     isLightbendCopyrighted(text) && !isApacheCopyrighted(text)
   }
+
+  private def isSbt012Licensed(text: String): Boolean =
+    StringUtils.containsIgnoreCase(text, "sbt -- Simple Build Tool")
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to