From 8c70e270b30ca79c702c576f8e9e0273a66f583c Mon Sep 17 00:00:00 2001 From: Martin Schreier Date: Wed, 5 Jan 2022 18:52:33 +0100 Subject: [PATCH] Removing joda-time dependency --- .../archiva-web/archiva-webapp/pom.xml | 11 ---------- .../archiva-web/archiva-webdav/pom.xml | 4 ---- .../webdav/ArchivaVirtualDavResource.java | 17 ++++++++------- pom.xml | 21 ------------------- 4 files changed, 10 insertions(+), 43 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index 44d6fa531..c2a2a94bb 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -137,17 +137,6 @@ - - commons-digester - commons-digester - runtime - - - commons-logging - commons-logging - - - commons-beanutils commons-beanutils diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml index 426d86e93..8bb9fbb2f 100644 --- a/archiva-modules/archiva-web/archiva-webdav/pom.xml +++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml @@ -211,10 +211,6 @@ - - joda-time - joda-time - org.springframework spring-web diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java index ca996f526..19556f9f5 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java @@ -43,11 +43,13 @@ import org.apache.jackrabbit.webdav.property.DavPropertyNameSet; import org.apache.jackrabbit.webdav.property.DavPropertySet; import org.apache.jackrabbit.webdav.property.DefaultDavProperty; import org.apache.jackrabbit.webdav.property.ResourceType; -import org.joda.time.DateTime; -import org.joda.time.format.DateTimeFormatter; -import org.joda.time.format.ISODateTimeFormat; -import java.util.*; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Comparator; +import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; /** @@ -351,9 +353,10 @@ public class ArchivaVirtualDavResource } // Need to get the ISO8601 date for properties - DateTime dt = new DateTime( 0 ); - DateTimeFormatter fmt = ISODateTimeFormat.dateTime(); - String modifiedDate = fmt.print( dt ); + // DateTime dt = new DateTime( 0 ); + // DateTimeFormatter fmt = ISODateTimeFormat.dateTime(); + // String modifiedDate = fmt.print( dt ); + String modifiedDate = LocalDateTime.now( ).format( DateTimeFormatter.ISO_OFFSET_DATE_TIME ); properties.add( new DefaultDavProperty<>( DavPropertyName.GETLASTMODIFIED, modifiedDate ) ); diff --git a/pom.xml b/pom.xml index bb0fde3bb..705de8e0f 100644 --- a/pom.xml +++ b/pom.xml @@ -959,17 +959,6 @@ - - commons-digester - commons-digester - 1.8.1 - - - commons-logging - commons-logging - - - commons-beanutils commons-beanutils @@ -1540,11 +1529,6 @@ test - - joda-time - joda-time - ${joda.time.version} - org.eclipse.jetty jetty-server @@ -1653,11 +1637,6 @@ - - cglib - cglib - ${cglib.version} - org.apache.maven.shared maven-model-converter