Skip to content

Commit

Permalink
HDDS-12068. Enable sortpom in remaining hdds modules (apache#7686)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai authored Jan 12, 2025
1 parent 12def8a commit 67fdb88
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 327 deletions.
32 changes: 13 additions & 19 deletions hadoop-hdds/managed-rocksdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.ozone</groupId>
Expand All @@ -23,26 +21,32 @@
</parent>
<artifactId>hdds-managed-rocksdb</artifactId>
<version>2.0.0-SNAPSHOT</version>
<description>Apache Ozone Managed RocksDB library</description>
<name>Apache Ozone HDDS Managed RocksDB</name>
<packaging>jar</packaging>
<name>Apache Ozone HDDS Managed RocksDB</name>
<description>Apache Ozone Managed RocksDB library</description>

<properties>
<maven.test.skip>true</maven.test.skip> <!-- no tests in this module so far -->
<sort.skip>true</sort.skip>
<!-- no tests in this module so far -->
<maven.test.skip>true</maven.test.skip>
</properties>

<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-common</artifactId>
</dependency>

<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-common</artifactId>
</dependency>

<dependency>
<groupId>org.rocksdb</groupId>
<artifactId>rocksdbjni</artifactId>
Expand All @@ -51,16 +55,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
125 changes: 57 additions & 68 deletions hadoop-hdds/rocks-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<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">
<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>
<artifactId>hdds</artifactId>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>Apache Ozone HDDS RocksDB Tools</name>
<artifactId>hdds-rocks-native</artifactId>

<properties>
<sort.skip>true</sort.skip>
</properties>
<name>Apache Ozone HDDS RocksDB Tools</name>

<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-common</artifactId>
Expand All @@ -37,12 +39,6 @@
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-managed-rocksdb</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-io</artifactId>
Expand All @@ -56,11 +52,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.apache.ozone</groupId>
Expand Down Expand Up @@ -108,10 +99,10 @@
<executions>
<execution>
<id>get-cpu-count</id>
<phase>generate-sources</phase>
<goals>
<goal>cpu-count</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<cpuCount>system.numCores</cpuCount>
</configuration>
Expand Down Expand Up @@ -140,10 +131,10 @@
<executions>
<execution>
<id>set-property</id>
<phase>initialize</phase>
<goals>
<goal>java</goal>
</goals>
<phase>initialize</phase>
<configuration>
<mainClass>org.apache.hadoop.hdds.utils.db.managed.JniLibNamePropertyWriter</mainClass>
<arguments>
Expand All @@ -159,10 +150,10 @@
<executions>
<execution>
<id>read-property-from-file</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<phase>initialize</phase>
<configuration>
<files>
<file>${project.build.directory}/propertyFile.txt</file>
Expand All @@ -177,10 +168,10 @@
<executions>
<execution>
<id>unpack-dependency</id>
<phase>initialize</phase>
<goals>
<goal>unpack</goal>
</goals>
<phase>initialize</phase>
<configuration>
<artifactItems>
<artifactItem>
Expand All @@ -201,10 +192,10 @@
<executions>
<execution>
<id>rocksdb source download</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<url>https://github.com/facebook/rocksdb/archive/refs/tags/v${rocksdb.version}.tar.gz</url>
<outputFileName>rocksdb-v${rocksdb.version}.tar.gz</outputFileName>
Expand All @@ -225,10 +216,10 @@
<executions>
<execution>
<id>patch</id>
<phase>process-sources</phase>
<goals>
<goal>apply</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
Expand All @@ -238,70 +229,71 @@
<executions>
<execution>
<id>unzip-artifact</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<target>
<untar src="${project.build.directory}/rocksdb/rocksdb-v${rocksdb.version}.tar.gz" compression="gzip" dest="${project.build.directory}/rocksdb/" />
<untar compression="gzip" dest="${project.build.directory}/rocksdb/" src="${project.build.directory}/rocksdb/rocksdb-v${rocksdb.version}.tar.gz" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>build-rocksjava</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<target>
<exec executable="chmod" failonerror="true">
<arg line="-R"/>
<arg line="775"/>
<arg line="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}"/>
<arg line="-R" />
<arg line="775" />
<arg line="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}" />
</exec>
<exec executable="make" dir="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}" failonerror="true">
<arg line="PORTABLE=1"/>
<arg line="DEBUG_LEVEL=0"/>
<arg line="EXTRA_CXXFLAGS='-fPIC -D_GLIBCXX_USE_CXX11_ABI=0'"/>
<arg line="-j${system.numCores}"/>
<arg line="tools_lib"/>
<exec dir="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}" executable="make" failonerror="true">
<arg line="PORTABLE=1" />
<arg line="DEBUG_LEVEL=0" />
<arg line="EXTRA_CXXFLAGS='-fPIC -D_GLIBCXX_USE_CXX11_ABI=0'" />
<arg line="-j${system.numCores}" />
<arg line="tools_lib" />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>build-rocks-tools</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<target>
<mkdir dir="${project.build.directory}/native/rocksdb"/>
<copy file="${project.build.directory}/rocksdbjni/${rocksdbLibName}"
tofile="${project.build.directory}/native/rocksdb/${rocksdbLibName}" />
<exec executable="cmake" failonerror="true" dir="${project.build.directory}/native/rocksdb">
<env key="CFLAGS" value="-fPIC"/>
<env key="CXXFLAGS" value="-fPIC"/>
<arg line="${basedir}/src"/>
<arg line="-DGENERATED_JAVAH=${project.build.directory}/native/javah"/>
<arg line="-DNATIVE_DIR=${basedir}/src/main/native"/>
<arg line="-DSST_DUMP_INCLUDE=${sstDump.include}"/>
<arg line="-DCMAKE_STANDARDS=${cmake.standards}"/>
<arg line="-DROCKSDB_HEADERS=${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}/include"/>
<arg line="-DROCKSDB_TOOLS_LIB=${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}"/>
<arg line="-DROCKSDB_LIB=${project.build.directory}/native/rocksdb/${rocksdbLibName}"/>
<mkdir dir="${project.build.directory}/native/rocksdb" />
<copy file="${project.build.directory}/rocksdbjni/${rocksdbLibName}" tofile="${project.build.directory}/native/rocksdb/${rocksdbLibName}" />
<exec dir="${project.build.directory}/native/rocksdb" executable="cmake" failonerror="true">
<env key="CFLAGS" value="-fPIC" />
<env key="CXXFLAGS" value="-fPIC" />
<arg line="${basedir}/src" />
<arg line="-DGENERATED_JAVAH=${project.build.directory}/native/javah" />
<arg line="-DNATIVE_DIR=${basedir}/src/main/native" />
<arg line="-DSST_DUMP_INCLUDE=${sstDump.include}" />
<arg line="-DCMAKE_STANDARDS=${cmake.standards}" />
<arg line="-DROCKSDB_HEADERS=${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}/include" />
<arg line="-DROCKSDB_TOOLS_LIB=${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}" />
<arg line="-DROCKSDB_LIB=${project.build.directory}/native/rocksdb/${rocksdbLibName}" />
</exec>
<exec executable="make" dir="${project.build.directory}/native/rocksdb" failonerror="true"/>
<delete dir="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}"
includeemptydirs="true"/>
<exec dir="${project.build.directory}/native/rocksdb" executable="make" failonerror="true" />
<delete dir="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}" includeemptydirs="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>copy-lib-file</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<target>
Expand All @@ -310,9 +302,6 @@
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -356,10 +345,10 @@
<artifactId>native-maven-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>javah</goal>
</goals>
<phase>compile</phase>
<configuration>
<javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
<javahClassNames>
Expand Down Expand Up @@ -390,10 +379,10 @@
<executions>
<execution>
<id>copy-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
<includeScope>runtime</includeScope>
Expand Down
Loading

0 comments on commit 67fdb88

Please sign in to comment.