diff --git a/build.sbt b/build.sbt index 2643b3b..4fec254 100644 --- a/build.sbt +++ b/build.sbt @@ -1,24 +1,24 @@ -lazy val auth0Version = "3.16.0" +lazy val auth0Version = "3.18.2" lazy val codecVersion = "1.15" lazy val configVersion = "1.4.1" -lazy val jettyVersion = "9.4.40.v20210413" +lazy val jettyVersion = "9.4.43.v20210629" lazy val json4sJacksonVersion = "3.6.11" lazy val jansiVersion = "1.18" lazy val jtaVersion = "1.1" lazy val junitVersion = "4.13.2" -lazy val logbackVersion = "1.3.0-alpha4" -lazy val rxjavaVersion = "3.0.12" -lazy val scalatestVersion = "3.2.8" +lazy val logbackVersion = "1.3.0-alpha10" +lazy val rxjavaVersion = "3.1.1" +lazy val scalatestVersion = "3.2.10" lazy val scalatraVersion = "2.7.1" lazy val servletVersion = "4.0.1" -lazy val slf4jVersion = "1.8.0-beta4" +lazy val slf4jVersion = "2.0.0-alpha5" Global / onChangedBuildSource := ReloadOnSourceChanges lazy val buildSettings = Seq( organization := "org.mbari.m3", - scalaVersion := "2.13.5", - crossScalaVersions := Seq("2.13.5"), + scalaVersion := "2.13.6", + crossScalaVersions := Seq("2.13.6"), organizationName := "Monterey Bay Aquarium Research Institute", startYear := Some(2017), licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")) @@ -87,7 +87,7 @@ lazy val `panoptes` = (project in file(".")) .settings(appSettings) .settings( name := "panoptes", - version := "0.2.4", + version := "0.2.5", fork := true, libraryDependencies ++= Seq( "com.auth0" % "java-jwt" % auth0Version, diff --git a/project/build.properties b/project/build.properties index 7107721..14095e1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,3 +1,2 @@ -#sbt.version=0.13.15 -sbt.version=1.3.13 +sbt.version=1.5.4 diff --git a/src/main/scala/org/mbari/m3/panoptes/converters/json4s/UUIDSerializer.scala b/src/main/scala/org/mbari/m3/panoptes/converters/json4s/UUIDSerializer.scala index 543ec64..1a68f42 100644 --- a/src/main/scala/org/mbari/m3/panoptes/converters/json4s/UUIDSerializer.scala +++ b/src/main/scala/org/mbari/m3/panoptes/converters/json4s/UUIDSerializer.scala @@ -36,7 +36,7 @@ case object UUIDSerializer UUID.fromString(s) } catch { case NonFatal(e) => - throw MappingException(e.getMessage, new java.lang.IllegalArgumentException(e)) + throw new MappingException(e.getMessage, new java.lang.IllegalArgumentException(e)) } case JNull => null }, { diff --git a/src/main/scala/org/mbari/m3/panoptes/services/MbariDiskArchiver.scala b/src/main/scala/org/mbari/m3/panoptes/services/MbariDiskArchiver.scala index 5e6655a..edf2ad9 100644 --- a/src/main/scala/org/mbari/m3/panoptes/services/MbariDiskArchiver.scala +++ b/src/main/scala/org/mbari/m3/panoptes/services/MbariDiskArchiver.scala @@ -87,7 +87,7 @@ class MbariDiskArchiver extends DiskArchiver { } else None } - override def uri(cameraId: String, deploymentId: String, name: String) = { + override def uri(cameraId: String, deploymentId: String, name: String): URI = { val uriPath = s"$archiveUrl${relativeFilePath(cameraId, deploymentId)}/$name" val uriEscaped = uriPath.replace(" ", "%20") new URL(uriEscaped).toURI diff --git a/src/main/scala/org/mbari/m3/panoptes/services/OldStyleMbariDiskArchiver.scala b/src/main/scala/org/mbari/m3/panoptes/services/OldStyleMbariDiskArchiver.scala index ef66284..3dc9c32 100644 --- a/src/main/scala/org/mbari/m3/panoptes/services/OldStyleMbariDiskArchiver.scala +++ b/src/main/scala/org/mbari/m3/panoptes/services/OldStyleMbariDiskArchiver.scala @@ -34,7 +34,9 @@ class OldStyleMbariDiskArchiver extends MbariDiskArchiver { */ override protected def relativeFilePath(cameraId: String, deploymentId: String): String = { val parts = deploymentId.split("\\s+") - val diveNumber = Try(parts.last.toInt.toString).getOrElse(deploymentId) + val diveNumber = Try(parts.last.toInt) + .map(s => f"$s%04d") + .getOrElse(deploymentId) s"$cameraId/images/$diveNumber" }