]> source.dussan.org Git - archiva.git/commitdiff
Removing joda-time dependency
authorMartin Schreier <martin_s@apache.org>
Wed, 5 Jan 2022 17:52:33 +0000 (18:52 +0100)
committerMartin Schreier <martin_s@apache.org>
Wed, 5 Jan 2022 17:52:33 +0000 (18:52 +0100)
archiva-modules/archiva-web/archiva-webapp/pom.xml
archiva-modules/archiva-web/archiva-webdav/pom.xml
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java
pom.xml

index 44d6fa5316d4c1120bed77ca90fd2f4e704824e5..c2a2a94bb16c8810bbc1e848f03e52f97da7f2be 100644 (file)
       </exclusions>
     </dependency>
 
-    <dependency>
-      <groupId>commons-digester</groupId>
-      <artifactId>commons-digester</artifactId>
-      <scope>runtime</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
     <dependency>
       <groupId>commons-beanutils</groupId>
       <artifactId>commons-beanutils</artifactId>
index 426d86e934dae9b56bf1bf329c9dae4bb18db6b0..8bb9fbb2fbd26aa3e7946d486b19eb585bc8addd 100644 (file)
     </dependency>
 
 
-    <dependency>
-      <groupId>joda-time</groupId>
-      <artifactId>joda-time</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
index ca996f526eaa6304ad3e501ef3e44f2af52e4488..19556f9f5092279491a7319e95876af390fec5ab 100644 (file)
@@ -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 bb0fde3bb5ba0590fc4bbf3312021bf1e2e00615..705de8e0f24009e934cb26b93cbc814bb772c465 100644 (file)
--- a/pom.xml
+++ b/pom.xml
           </exclusion>
         </exclusions>
       </dependency>
-      <dependency>
-        <groupId>commons-digester</groupId>
-        <artifactId>commons-digester</artifactId>
-        <version>1.8.1</version>
-        <exclusions>
-          <exclusion>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
       <dependency>
         <groupId>commons-beanutils</groupId>
         <artifactId>commons-beanutils</artifactId>
         <scope>test</scope>
       </dependency>
 
-      <dependency>
-        <groupId>joda-time</groupId>
-        <artifactId>joda-time</artifactId>
-        <version>${joda.time.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-server</artifactId>
           </exclusion>
         </exclusions>
       </dependency>
-      <dependency>
-        <groupId>cglib</groupId>
-        <artifactId>cglib</artifactId>
-        <version>${cglib.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.apache.maven.shared</groupId>
         <artifactId>maven-model-converter</artifactId>