This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new 4160e8171 ORC-1294: Fix build error when skip tests build
4160e8171 is described below
commit 4160e81714d2ccf2a20f79816c64f63eee5c85f9
Author: deshanxiao <[email protected]>
AuthorDate: Mon Oct 24 11:53:41 2022 -0700
ORC-1294: Fix build error when skip tests build
### What changes were proposed in this pull request?
This PR aims to fix build error when skip tests build. It has two
modifications:
- Add `ignoreNonCompile` in maven-dependency-plugin to skip all
Runtime/Provided/Test/System scope dependency checking.
- change slf4j-api scope to test.
### Why are the changes needed?
The root cause of building failed is that -Dmaven.test.skip=true does not
compile the test classes.
Apache Maven Dependency Plugin will throw an error if a dependency is not
used. We can use ignoreNonCompile defined in
https://maven.apache.org/plugins/maven-dependency-plugin/analyze-only-mojo.html#ignoreNonCompile
to avoid the problem.
After adding this tag, I found that we have some classes such as slf4j-api
in MapReduce module that only appear in test but scope is defined as compile. I
adjusted its scope to test.
For a related discussion, see https://github.com/apache/orc/issues/1277
### How was this patch tested?
UT
Closes #1286 from deshanxiao/deshan/1294.
Lead-authored-by: deshanxiao <[email protected]>
Co-authored-by: Deshan Xiao <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
java/mapreduce/pom.xml | 5 +++--
java/pom.xml | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/java/mapreduce/pom.xml b/java/mapreduce/pom.xml
index a90958daa..00f86f400 100644
--- a/java/mapreduce/pom.xml
+++ b/java/mapreduce/pom.xml
@@ -63,12 +63,13 @@
<groupId>org.apache.hive</groupId>
<artifactId>hive-storage-api</artifactId>
</dependency>
+
+ <!-- test inter-project -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
+ <scope>test</scope>
</dependency>
-
- <!-- test inter-project -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-jobclient</artifactId>
diff --git a/java/pom.xml b/java/pom.xml
index f1ab18056..8e5acf38d 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -384,6 +384,7 @@
</executions>
<configuration>
<failOnWarning>true</failOnWarning>
+ <ignoreNonCompile>true</ignoreNonCompile>
</configuration>
</plugin>
<plugin>