From 43298ad59815c9731e0d2f0cd8604af08a119021 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Wed, 19 Jul 2017 13:40:35 +0200 Subject: Rewrite ProjectBundleClassPaths to Java --- scalalib/pom.xml | 4 -- .../osgi/maven/ProjectBundleClassPaths.scala | 44 ---------------------- 2 files changed, 48 deletions(-) delete mode 100644 scalalib/src/main/scala/com/yahoo/vespa/scalalib/osgi/maven/ProjectBundleClassPaths.scala (limited to 'scalalib') diff --git a/scalalib/pom.xml b/scalalib/pom.xml index 78237211ac3..d4556d4648b 100644 --- a/scalalib/pom.xml +++ b/scalalib/pom.xml @@ -29,10 +29,6 @@ annotations ${project.version} - - org.json4s - json4s-native_${scala.major-version} - diff --git a/scalalib/src/main/scala/com/yahoo/vespa/scalalib/osgi/maven/ProjectBundleClassPaths.scala b/scalalib/src/main/scala/com/yahoo/vespa/scalalib/osgi/maven/ProjectBundleClassPaths.scala deleted file mode 100644 index 08b8f05b96f..00000000000 --- a/scalalib/src/main/scala/com/yahoo/vespa/scalalib/osgi/maven/ProjectBundleClassPaths.scala +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.scalalib.osgi.maven - -import java.nio.charset.StandardCharsets -import java.nio.file.{Files, Path} - -import org.json4s.NoTypeHints -import org.json4s.native.Serialization - -import ProjectBundleClassPaths._ - -/** - * Represents the bundles in a maven project and the classpath elements - * corresponding to code that would end up in the bundle. - * @author tonytv - */ -case class ProjectBundleClassPaths(mainBundle: BundleClasspathMapping, - providedDependencies: List[BundleClasspathMapping]) - - -object ProjectBundleClassPaths { - //Written by bundle-plugin in the test classes directory. - val classPathMappingsFileName = "bundle-plugin.bundle-classpath-mappings.json" - - case class BundleClasspathMapping(bundleSymbolicName: String, classPathElements: List[String]) - - //Used by Serialization.* methods. See https://github.com/json4s/json4s - private implicit val serializationFormat = Serialization.formats(NoTypeHints) - - def save(path: Path, mappings: ProjectBundleClassPaths) { - Files.createDirectories(path.getParent) - val outputFile = Files.newBufferedWriter(path, StandardCharsets.UTF_8) - try { - Serialization.write(mappings, outputFile) - } finally { - outputFile.close() - } - } - - def load(path: Path): ProjectBundleClassPaths = { - val inputFile = Files.newBufferedReader(path, StandardCharsets.UTF_8) - Serialization.read[ProjectBundleClassPaths](inputFile) - } -} -- cgit v1.2.3