From 379cfa8ca073cb01e131607e7b349b190cb8e8e8 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Fri, 11 Oct 2024 13:18:41 +0200 Subject: [PATCH] Remove lmCoursierCustomProtocol projects --- build.sbt | 40 ------------------- .../protocol/CustomprotocolHandler.scala | 10 ----- .../protocol/CustomprotocoljavaHandler.java | 18 --------- 3 files changed, 68 deletions(-) delete mode 100644 lm-coursier/custom-protocol-for-test/src/main/scala/coursier/cache/protocol/CustomprotocolHandler.scala delete mode 100644 lm-coursier/custom-protocol-java-for-test/src/main/java/coursier/cache/protocol/CustomprotocoljavaHandler.java diff --git a/build.sbt b/build.sbt index f571d5afa..eb7fdec8e 100644 --- a/build.sbt +++ b/build.sbt @@ -1505,10 +1505,6 @@ lazy val lmCoursier = project "org.scalatest" %% "scalatest" % "3.2.19" % Test ), excludeDependencies ++= coursierExcludedDependencies, - Test / exportedProducts := { - (lmCustomProtocolJavaForTest / publishLocal).value - (Test / exportedProducts).value - }, Compile / sourceGenerators += dataclassGen(lmCoursierDefinitions).taskValue, ) .dependsOn( @@ -1588,39 +1584,3 @@ lazy val lmCoursierShaded = project Utils.noPublish, ) .dependsOn(lmIvy % "provided") - -lazy val lmCustomProtocolForTest212 = project - .in(file("lm-coursier/custom-protocol-for-test-2-12")) - .settings( - sourceDirectory := file( - "lm-coursier/custom-protocol-for-test/src" - ).toPath.toAbsolutePath.toFile, - scalaVersion := scala212, - organization := "org.example", - moduleName := "customprotocol-handler", - version := "0.1.0", - Utils.noPublish - ) - -lazy val lmCustomProtocolForTest213 = project - .in(file("lm-coursier/custom-protocol-for-test-2-13")) - .settings( - sourceDirectory := file( - "lm-coursier/custom-protocol-for-test/src" - ).toPath.toAbsolutePath.toFile, - scalaVersion := scala213, - organization := "org.example", - moduleName := "customprotocol-handler", - version := "0.1.0", - Utils.noPublish - ) - -lazy val lmCustomProtocolJavaForTest = project - .in(file("lm-coursier/custom-protocol-java-for-test")) - .settings( - crossPaths := false, - organization := "org.example", - moduleName := "customprotocoljava-handler", - version := "0.1.0", - Utils.noPublish - ) diff --git a/lm-coursier/custom-protocol-for-test/src/main/scala/coursier/cache/protocol/CustomprotocolHandler.scala b/lm-coursier/custom-protocol-for-test/src/main/scala/coursier/cache/protocol/CustomprotocolHandler.scala deleted file mode 100644 index 1d8b390cf..000000000 --- a/lm-coursier/custom-protocol-for-test/src/main/scala/coursier/cache/protocol/CustomprotocolHandler.scala +++ /dev/null @@ -1,10 +0,0 @@ -package coursier.cache.protocol - -import java.net.{ URL, URLConnection, URLStreamHandler, URLStreamHandlerFactory } - -class CustomprotocolHandler extends URLStreamHandlerFactory { - def createURLStreamHandler(protocol: String): URLStreamHandler = new URLStreamHandler { - protected def openConnection(url: URL): URLConnection = - new URL("https://repo1.maven.org/maven2" + url.getPath()).openConnection() - } -} diff --git a/lm-coursier/custom-protocol-java-for-test/src/main/java/coursier/cache/protocol/CustomprotocoljavaHandler.java b/lm-coursier/custom-protocol-java-for-test/src/main/java/coursier/cache/protocol/CustomprotocoljavaHandler.java deleted file mode 100644 index d2856fea3..000000000 --- a/lm-coursier/custom-protocol-java-for-test/src/main/java/coursier/cache/protocol/CustomprotocoljavaHandler.java +++ /dev/null @@ -1,18 +0,0 @@ -package coursier.cache.protocol; - -import java.net.URL; -import java.net.URLConnection; -import java.net.URLStreamHandler; -import java.net.URLStreamHandlerFactory; - -import java.io.IOException; - -public class CustomprotocoljavaHandler implements URLStreamHandlerFactory { - public URLStreamHandler createURLStreamHandler(String protocol) { - return new URLStreamHandler() { - protected URLConnection openConnection(URL url) throws IOException { - return new URL("https://repo1.maven.org/maven2" + url.getPath()).openConnection(); - } - }; - } -}