Plug atomix into the build 73/104673/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 1 Mar 2023 23:45:21 +0000 (00:45 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 00:08:16 +0000 (01:08 +0100)
This adds the basics to plug in atomis into the build using the bare
minimum of modifications.

JIRA: CONTROLLER-2071
Change-Id: I92fe884f1ac44973c7ac0a9930be88f08b8d6643
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
artifacts/pom.xml
pom.xml
third-party/atomix/pom.xml [new file with mode: 0644]
third-party/atomix/storage/pom.xml
third-party/atomix/storage/src/main/java/io/atomix/storage/buffer/FileBytes.java
third-party/atomix/utils/pom.xml

index bac9da0ba5956ed18da224379e9553f63892c589..26b7dd0f684967e3271a37bdcbf8d003b3e80821 100644 (file)
                 <classifier>features</classifier>
                 <type>xml</type>
             </dependency>
+
+            <!-- Atomix -->
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>atomix-storage</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>atomix-utils</artifactId>
+                <version>${project.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>
diff --git a/pom.xml b/pom.xml
index 3c2a2173e03f04b4567d2f32d6687fb06e823184..a00833577289e90d779a1de2317de1795a9dac7b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,8 @@
     <module>opendaylight/config</module>
 
     <module>opendaylight/blueprint</module>
+
+    <module>third-party/atomix</module>
   </modules>
 
   <profiles>
diff --git a/third-party/atomix/pom.xml b/third-party/atomix/pom.xml
new file mode 100644 (file)
index 0000000..11adbd2
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>odlparent-lite</artifactId>
+        <version>12.0.3</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>atomix</artifactId>
+    <version>7.0.5-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <maven.deploy.skip>true</maven.deploy.skip>
+        <maven.install.skip>true</maven.install.skip>
+    </properties>
+
+    <modules>
+        <module>storage</module>
+        <module>utils</module>
+    </modules>
+</project>
index 326c021e96c96e3b1880eefca86dac9e58623154..fa3145c91ff298ea1cbe115b9d87308ef3b6fd54 100644 (file)
@@ -1,5 +1,6 @@
 <!--
-  ~ Copyright 2017-present Open Networking Foundation
+  ~ Copyright 2017-2021 Open Networking Foundation
+  ~ Copyright 2023 PANTHEON.tech, s.r.o.
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>io.atomix</groupId>
-    <artifactId>atomix-parent</artifactId>
-    <version>3.2.0-SNAPSHOT</version>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>bundle-parent</artifactId>
+    <version>7.0.5-SNAPSHOT</version>
+    <relativePath>../../../bundle-parent</relativePath>
   </parent>
 
-  <packaging>bundle</packaging>
   <artifactId>atomix-storage</artifactId>
   <name>Atomix Storage</name>
 
+  <properties>
+    <odlparent.checkstyle.skip>true</odlparent.checkstyle.skip>
+    <odlparent.modernizer.skip>true</odlparent.modernizer.skip>
+    <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
+  </properties>
+
   <dependencies>
     <dependency>
-      <groupId>io.atomix</groupId>
+      <groupId>org.opendaylight.controller</groupId>
       <artifactId>atomix-utils</artifactId>
-      <version>${project.version}</version>
     </dependency>
   </dependencies>
 
           </instructions>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>check-license</id>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <!-- This project has a different license -->
+              <skip>true</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
index 326e8eda86ba23e5b8a4dac2072c7ac6c92b76ce..8784d2407d0f8e461e0d93be4151273cf22a7b14 100644 (file)
@@ -162,7 +162,7 @@ public class FileBytes extends AbstractBytes {
 
   /**
    * Maps a portion of the randomAccessFile into memory in {@link FileChannel.MapMode#READ_WRITE} mode and returns
-   * a {@link UnsafeMappedBytes} instance.
+   * a {@link MappedBytes} instance.
    *
    * @param offset The offset from which to map the randomAccessFile into memory.
    * @param size   The count of the bytes to map into memory.
@@ -175,7 +175,7 @@ public class FileBytes extends AbstractBytes {
   }
 
   /**
-   * Maps a portion of the randomAccessFile into memory and returns a {@link UnsafeMappedBytes} instance.
+   * Maps a portion of the randomAccessFile into memory and returns a {@link MappedBytes} instance.
    *
    * @param offset The offset from which to map the randomAccessFile into memory.
    * @param size   The count of the bytes to map into memory.
index 6867591f2d557f0922536bbfd30af36f370fb2f1..2ec2997f30eec818ae07cc3f3d5fd942cb6633af 100644 (file)
@@ -1,5 +1,6 @@
 <!--
-  ~ Copyright 2017-present Open Networking Foundation
+  ~ Copyright 2017-2021 Open Networking Foundation
+  ~ Copyright 2023 PANTHEON.tech, s.r.o.
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>io.atomix</groupId>
-    <artifactId>atomix-parent</artifactId>
-    <version>3.2.0-SNAPSHOT</version>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>bundle-parent</artifactId>
+    <version>7.0.5-SNAPSHOT</version>
+    <relativePath>../../../bundle-parent</relativePath>
   </parent>
 
-  <packaging>bundle</packaging>
   <artifactId>atomix-utils</artifactId>
   <name>Atomix Utilities</name>
 
+  <properties>
+    <odlparent.checkstyle.skip>true</odlparent.checkstyle.skip>
+    <odlparent.modernizer.skip>true</odlparent.modernizer.skip>
+    <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>com.google.guava</groupId>
       <artifactId>guava</artifactId>
-      <version>${guava.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>${commons.lang3.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-math3</artifactId>
-      <version>${commons.math3.version}</version>
     </dependency>
     <dependency>
       <groupId>com.esotericsoftware</groupId>
       <artifactId>kryo</artifactId>
-      <version>${kryo.version}</version>
+      <version>4.0.2</version>
     </dependency>
     <dependency>
       <groupId>com.typesafe</groupId>
       <artifactId>config</artifactId>
-      <version>${config.version}</version>
     </dependency>
+
     <dependency>
-      <groupId>io.github.classgraph</groupId>
-      <artifactId>classgraph</artifactId>
-      <version>${classgraph.version}</version>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava-testlib</artifactId>
     </dependency>
   </dependencies>
 
           </instructions>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>check-license</id>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <!-- This project has a different license -->
+              <skip>true</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>