This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 78e2e73158 HDDS-12724. hdds-rocks-native build fails if JAVA_HOME not
set (#8183)
78e2e73158 is described below
commit 78e2e73158bdd73b5697aba4e9562fb25a250457
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Mar 29 14:40:11 2025 +0100
HDDS-12724. hdds-rocks-native build fails if JAVA_HOME not set (#8183)
---
hadoop-hdds/rocks-native/pom.xml | 107 +++++++--------------------------------
pom.xml | 6 ---
2 files changed, 19 insertions(+), 94 deletions(-)
diff --git a/hadoop-hdds/rocks-native/pom.xml b/hadoop-hdds/rocks-native/pom.xml
index 17f18ec718..8f0da5a368 100644
--- a/hadoop-hdds/rocks-native/pom.xml
+++ b/hadoop-hdds/rocks-native/pom.xml
@@ -300,6 +300,25 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <compilerArgs>
+ <arg>-h</arg>
+ <arg>${project.build.directory}/native/javah</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -324,93 +343,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>java-8</id>
- <activation>
- <jdk>1.8</jdk>
- <property>
- <name>rocks_tools_native</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>native-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>javah</goal>
- </goals>
- <phase>compile</phase>
- <configuration>
- <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
- <javahClassNames>
-
<javahClassName>org.apache.hadoop.hdds.utils.db.managed.ManagedRawSSTFileReader</javahClassName>
-
<javahClassName>org.apache.hadoop.hdds.utils.db.managed.ManagedRawSSTFileIterator</javahClassName>
- </javahClassNames>
-
<javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>java-11</id>
- <activation>
- <jdk>[11,]</jdk>
- <property>
- <name>rocks_tools_native</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
-
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
- <includeScope>runtime</includeScope>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>javach</id>
- <goals>
- <goal>exec</goal>
- </goals>
- <phase>compile</phase>
- <configuration>
- <executable>${env.JAVA_HOME}/bin/javac</executable>
- <arguments>
- <argument>-cp</argument>
-
<argument>${project.build.outputDirectory}:${project.build.directory}/dependency/*</argument>
- <argument>-h</argument>
-
<argument>${project.build.directory}/native/javah</argument>
-
<argument>${project.basedir}/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRawSSTFileReader.java</argument>
-
<argument>${project.basedir}/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRawSSTFileIterator.java</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/pom.xml b/pom.xml
index 5370270a6d..fcf309a871 100644
--- a/pom.xml
+++ b/pom.xml
@@ -174,7 +174,6 @@
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<metainf-services.version>1.11</metainf-services.version>
<mockito.version>4.11.0</mockito.version>
- <native-maven-plugin.version>1.0-M1</native-maven-plugin.version>
<native.lib.tmp.dir />
<!-- Use netty version known to work with grpc-netty. See table: -->
<!-- https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty -->
@@ -1459,11 +1458,6 @@
<includeTests>true</includeTests>
</configuration>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>native-maven-plugin</artifactId>
- <version>${native-maven-plugin.version}</version>
- </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>make-maven-plugin</artifactId>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]