Compare commits
176 Commits
Author | SHA256 | Date | |
---|---|---|---|
855950f555 | |||
cde56623a1 | |||
87f2db1de3 | |||
6251d642db | |||
74361bd59e | |||
ade27d18fe | |||
f5584bc386 | |||
092f851811 | |||
cb20903f29 | |||
edc96eb4da | |||
099ea661fc | |||
977be37280 | |||
b5da8da904 | |||
006977b4e4 | |||
281eafa871 | |||
4bb2a8c181 | |||
31381a5cf5 | |||
d2cc6259bb | |||
75f0e87337 | |||
bf967b9041 | |||
6f399efdea | |||
796ff38fb0 | |||
b942125802 | |||
4e7b2dfe3f | |||
e8501296d1 | |||
addfba6fef | |||
121a082729 | |||
75ad56cab7 | |||
5d7f578395 | |||
c47ee67ef8 | |||
9675eaf4b5 | |||
bf413ffc44 | |||
137ee0a796 | |||
f2614c6081 | |||
36e7cdc0b4 | |||
c5a352a907 | |||
dcb97da005 | |||
57255f32f8 | |||
97fd2b2129 | |||
f5c20004b2 | |||
0639a1dbf4 | |||
97665ec18d | |||
ccc8f25d37 | |||
c5e72e40c1 | |||
fb2db230df | |||
54f43c0377 | |||
14794d8bbd | |||
582e3f1e43 | |||
97242312b3 | |||
c0963a046e | |||
ed4b6024d1 | |||
d54dc4ffab | |||
557fe8d813 | |||
b1abd1f2a3 | |||
84ac2071e5 | |||
71b1f8db05 | |||
e16cfb80b9 | |||
a282070e3a | |||
3fee43e729 | |||
fc20942c84 | |||
8e5b5d89ba | |||
b293a7fe74 | |||
b230ed914d | |||
6936f08ac2 | |||
875faddbca | |||
7505a39b5a | |||
d4c989219f | |||
eae6cfa726 | |||
3f5b720cdc | |||
a86f17b7d5 | |||
dd9d84739d | |||
b8f828c433 | |||
57c7556d05 | |||
b28cc7827b | |||
3f6404f475 | |||
c42d0b898c | |||
0dd6cedd99 | |||
fa33bfb30a | |||
4df04af0cb | |||
658c4d5f7a | |||
a8f08fa3e2 | |||
276cef97c5 | |||
e80d1cd517 | |||
d68afaf5e1 | |||
0ef5e5655a | |||
|
871c49dc84 | ||
2dc6c28f3b | |||
0be1891c15 | |||
087c00b58f | |||
47f24ffdbe | |||
c464878960 | |||
|
7f63ccfa46 | ||
|
b6becb9fce | ||
e612d401c5 | |||
4f1a407c2a | |||
2a1c7e0a21 | |||
44ea24f002 | |||
c7deb35513 | |||
4c1220ba43 | |||
f9325caf96 | |||
af5bf5a82f | |||
53d35edecc | |||
1ae4d74f2d | |||
fa15dd93f0 | |||
11c939d2bd | |||
6bf3400dad | |||
ecca4fef27 | |||
4babde130c | |||
7912a5d150 | |||
56f24ac370 | |||
df87421286 | |||
b655b0f4b6 | |||
da0b3c505e | |||
047db155fe | |||
4a4bab2f70 | |||
8406636294 | |||
772cd09373 | |||
8af2991345 | |||
13145b6fb9 | |||
1647441067 | |||
8b8dcebc16 | |||
5e87d40bce | |||
056c80113b | |||
29dc24c59e | |||
3618a18e7b | |||
c40b272e79 | |||
5cf011d632 | |||
74144b98c5 | |||
|
5f4189fd6f | ||
|
6eb3784f6b | ||
9fdfb87fb1 | |||
|
5cc9d29b0d | ||
ac9cb9a6ab | |||
|
c1b58de147 | ||
|
8a48d1d89f | ||
|
d7a3a3d4e6 | ||
|
a6d3e388d5 | ||
|
2efe7541dc | ||
|
abd8ea55b7 | ||
|
1bb31d518d | ||
|
0b9a67af0f | ||
|
fe76c21721 | ||
|
fd3321620d | ||
31d6dff1ef | |||
|
ceef81b960 | ||
|
f350fb4129 | ||
24dfd3d78b | |||
|
f658a12aa9 | ||
|
570c955934 | ||
|
60d6f8746f | ||
|
6b4e8cde52 | ||
|
a00bbf6a02 | ||
|
ac5a37e7ec | ||
|
5f3cee20ba | ||
|
6783b53ef7 | ||
7a9d33ca9c | |||
bbc4d90adb | |||
|
d2aba20227 | ||
|
92694b00fc | ||
|
3a113b2c40 | ||
|
68f2dc5e86 | ||
|
93dd9d925d | ||
|
2ecf3f71dd | ||
|
8cbe76c00f | ||
e4ebe56231 | |||
|
d99546c87d | ||
2445806efb | |||
|
83a17d6a6a | ||
|
2e2ddf60f0 | ||
|
ea13a775ae | ||
89a5cdc5eb | |||
|
a811ed5787 | ||
521057771f | |||
fb941d8059 | |||
28af746f06 | |||
6c768c1165 |
@@ -1,25 +0,0 @@
|
||||
From 5ede44f34a30011908b7dfc911d9c9bc270f1abc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Thu, 3 Oct 2024 11:21:43 +0200
|
||||
Subject: [PATCH] Double-quote to avoid substitution during build
|
||||
|
||||
---
|
||||
macros.d/macros.jpackage | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/macros.d/macros.jpackage b/macros.d/macros.jpackage
|
||||
index adfff436..55d4ba94 100644
|
||||
--- a/macros.d/macros.jpackage
|
||||
+++ b/macros.d/macros.jpackage
|
||||
@@ -37,7 +37,7 @@ cat > %{buildroot}%{_bindir}/%5 << EOF \
|
||||
# JPackage Project <http://www.jpackage.org/>\
|
||||
\
|
||||
# Set default JAVA_HOME\
|
||||
-export JAVA_HOME="\\${JAVA_HOME:-%{?java_home}}"\
|
||||
+export JAVA_HOME="\\${JAVA_HOME:-%%{?java_home}}"\
|
||||
\
|
||||
# Source functions library\
|
||||
. @{javadir}-utils/java-functions\
|
||||
--
|
||||
2.46.1
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From 5cc434bdeffbee25158ae2bdcda08f4b07610f7a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Mon, 4 Sep 2023 16:14:43 +0200
|
||||
Subject: [PATCH 1/2] Make maven_depmap order of aliases reproducible
|
||||
|
||||
---
|
||||
java-utils/maven_depmap.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
|
||||
index 6a0520fa..4bfb877d 100644
|
||||
--- a/java-utils/maven_depmap.py
|
||||
+++ b/java-utils/maven_depmap.py
|
||||
@@ -213,7 +213,7 @@ def add_aliases(artifact, additions):
|
||||
|
||||
aliases = additions.split(',')
|
||||
result = list()
|
||||
- for a in aliases:
|
||||
+ for a in sorted(aliases):
|
||||
alias = MetadataAlias.from_mvn_str(a)
|
||||
alias.extension = artifact.extension
|
||||
result.append(alias)
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,32 +0,0 @@
|
||||
From 5f1ea127c2465e2a628396c17157834c73d528c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Fri, 11 Oct 2024 15:00:52 +0200
|
||||
Subject: [PATCH] Revert "jpackage_script: Remove unneeded backslashes"
|
||||
|
||||
This is broken with rpm 4.14.1 for instance
|
||||
|
||||
This reverts commit 098485a23336cf7df692631d7bbb90db200d554d.
|
||||
---
|
||||
macros.d/macros.jpackage | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/macros.d/macros.jpackage b/macros.d/macros.jpackage
|
||||
index b6c41b48..ceee2a7d 100644
|
||||
--- a/macros.d/macros.jpackage
|
||||
+++ b/macros.d/macros.jpackage
|
||||
@@ -35,9 +35,9 @@ cat > %{buildroot}%{_bindir}/%5 << EOF \
|
||||
#\
|
||||
# %{name} script\
|
||||
# JPackage Project <http://www.jpackage.org/>\
|
||||
-%{?java_home:
|
||||
-# Set default JAVA_HOME
|
||||
-JAVA_HOME="\\${JAVA_HOME:-%{java_home}}"
|
||||
+%{?java_home:\
|
||||
+# Set default JAVA_HOME\
|
||||
+JAVA_HOME="\\${JAVA_HOME:-%{java_home}}"\
|
||||
}\
|
||||
# Source functions library\
|
||||
. @{javadir}-utils/java-functions\
|
||||
--
|
||||
2.47.0
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From d124f4d16883d74cdf8ab9064667e128a3695230 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Mon, 4 Sep 2023 22:44:10 +0200
|
||||
Subject: [PATCH 2/2] Do not bomb on <relativePath/> construct
|
||||
|
||||
---
|
||||
java-utils/mvn_artifact.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/java-utils/mvn_artifact.py b/java-utils/mvn_artifact.py
|
||||
index a45946cd..b7520528 100644
|
||||
--- a/java-utils/mvn_artifact.py
|
||||
+++ b/java-utils/mvn_artifact.py
|
||||
@@ -167,7 +167,7 @@ def gather_dependencies(pom_path):
|
||||
parent = pom.parent
|
||||
while parent:
|
||||
ppom = None
|
||||
- if parent.relativePath:
|
||||
+ if hasattr(parent, 'relativePath') and parent.relativePath:
|
||||
try:
|
||||
ppom_path = os.path.join(os.path.dirname(curr_pom._path),
|
||||
parent.relativePath)
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,52 +0,0 @@
|
||||
From 66ba33a8c28497e01eddcb0cd17fbe324674eabc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Mon, 11 Sep 2023 18:43:28 +0200
|
||||
Subject: [PATCH 3/3] Reproducible exclusions order in maven metadata
|
||||
|
||||
---
|
||||
python/javapackages/metadata/dependency.py | 4 ++--
|
||||
python/javapackages/metadata/exclusion.py | 9 +++++++++
|
||||
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/python/javapackages/metadata/dependency.py b/python/javapackages/metadata/dependency.py
|
||||
index 1709e1fb..5931134d 100644
|
||||
--- a/python/javapackages/metadata/dependency.py
|
||||
+++ b/python/javapackages/metadata/dependency.py
|
||||
@@ -46,7 +46,7 @@ class MetadataDependency(ObjectBinding):
|
||||
defaults = {'extension': 'jar',
|
||||
'requestedVersion': 'SYSTEM'}
|
||||
types = {'optional': str, # todo bool
|
||||
- 'exclusions': set([MetadataExclusion])}
|
||||
+ 'exclusions': list([MetadataExclusion])}
|
||||
|
||||
def is_optional(self):
|
||||
if self.optional and self.optional.lower() == "true":
|
||||
@@ -145,4 +145,4 @@ class MetadataDependency(ObjectBinding):
|
||||
classifier=mvn_dep.classifier,
|
||||
optional=mvn_dep.optional,
|
||||
requestedVersion=mvn_dep.version,
|
||||
- exclusions=exclusions)
|
||||
+ exclusions=sorted(exclusions))
|
||||
diff --git a/python/javapackages/metadata/exclusion.py b/python/javapackages/metadata/exclusion.py
|
||||
index 3152b090..5b9503c0 100644
|
||||
--- a/python/javapackages/metadata/exclusion.py
|
||||
+++ b/python/javapackages/metadata/exclusion.py
|
||||
@@ -41,6 +41,15 @@ class MetadataExclusion(ObjectBinding):
|
||||
element_name = 'exclusion'
|
||||
fields = ['groupId', 'artifactId']
|
||||
|
||||
+ def __lt__(self, other):
|
||||
+ if self.groupId < other.groupId:
|
||||
+ return True
|
||||
+ if self.groupId > other.groupId:
|
||||
+ return False
|
||||
+ if self.artifactId < other.artifactId:
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
def get_mvn_str(self):
|
||||
return Printer.get_mvn_str(self.groupId, self.artifactId)
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,28 +0,0 @@
|
||||
From f211da6e4cf216a020b47ccab9b2c7806c5a8a62 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Wed, 13 Sep 2023 15:47:54 +0200
|
||||
Subject: [PATCH 4/4] Reproducible builds: keep order of aliases and
|
||||
dependencies
|
||||
|
||||
---
|
||||
python/javapackages/metadata/artifact.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/python/javapackages/metadata/artifact.py b/python/javapackages/metadata/artifact.py
|
||||
index 72e57e62..f5cbf3be 100644
|
||||
--- a/python/javapackages/metadata/artifact.py
|
||||
+++ b/python/javapackages/metadata/artifact.py
|
||||
@@ -52,8 +52,8 @@ class MetadataArtifact(ObjectBinding):
|
||||
'compatVersions', 'dependencies']
|
||||
defaults = {'extension': 'jar'}
|
||||
types = {'compatVersions': set(['version']),
|
||||
- 'aliases': set([MetadataAlias]),
|
||||
- 'dependencies': set([MetadataDependency]),
|
||||
+ 'aliases': list([MetadataAlias]),
|
||||
+ 'dependencies': list([MetadataDependency]),
|
||||
'properties': dict}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,62 +0,0 @@
|
||||
From d458bce49270bccfa40e9c4e288b3c9550aff741 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Wed, 4 Oct 2023 04:07:58 +0200
|
||||
Subject: [PATCH 5/5] Interpolate properties also in the current artifact
|
||||
|
||||
---
|
||||
java-utils/install_pom.py | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/java-utils/install_pom.py b/java-utils/install_pom.py
|
||||
index e0282773..5f9fd741 100644
|
||||
--- a/java-utils/install_pom.py
|
||||
+++ b/java-utils/install_pom.py
|
||||
@@ -31,6 +31,7 @@
|
||||
# Authors: Michal Srb <msrb@redhat.com>
|
||||
|
||||
from javapackages.maven.pom import POM, PomLoadingException
|
||||
+from javapackages.maven.artifact import Artifact
|
||||
|
||||
from javapackages.xmvn.xmvn_resolve import (XMvnResolve, ResolutionRequest,
|
||||
XMvnResolveException)
|
||||
@@ -164,7 +165,7 @@ def gather_dependencies(pom_path):
|
||||
# only deps with scope "compile" or "runtime" are interesting
|
||||
deps = [x for x in deps if x.scope in ["", "compile", "runtime"]]
|
||||
|
||||
- return deps
|
||||
+ return deps, props
|
||||
|
||||
|
||||
def _get_dependencies(pom):
|
||||
@@ -215,21 +216,23 @@ def _main():
|
||||
if uart.packaging and uart.packaging.lower() == 'pom':
|
||||
tree = ElementTree.parse(args[0])
|
||||
else:
|
||||
+ mvn_deps, props = gather_dependencies(pom_path)
|
||||
+ mvn_art = Artifact.from_mvn_str(str(uart))
|
||||
+ mvn_art.interpolate(props)
|
||||
result_pom = "<?xml version='1.0' encoding='UTF-8'?>\n"
|
||||
result_pom += "<project xmlns=\"http://maven.apache.org/POM/4.0.0\">\n"
|
||||
result_pom += " <modelVersion>4.0.0</modelVersion>\n"
|
||||
- result_pom += (" <groupId>{0}</groupId>\n" ).format(uart.groupId)
|
||||
- result_pom += (" <artifactId>{0}</artifactId>\n" ).format(uart.artifactId)
|
||||
- result_pom += (" <version>{0}</version>\n").format(uart.version)
|
||||
+ result_pom += (" <groupId>{0}</groupId>\n" ).format(mvn_art.groupId)
|
||||
+ result_pom += (" <artifactId>{0}</artifactId>\n" ).format(mvn_art.artifactId)
|
||||
+ result_pom += (" <version>{0}</version>\n").format(mvn_art.version)
|
||||
|
||||
if hasattr(uart, "packaging") and uart.packaging != 'jar':
|
||||
result_pom += (" <packaging>{0}</packaging>\n").format(uart.packaging)
|
||||
if hasattr(uart, "extension") and uart.extension != 'jar':
|
||||
result_pom += (" <extension>{0}</extension>\n").format(uart.extension)
|
||||
- if hasattr(uart, "classifier") and uart.classifiler != '':
|
||||
+ if hasattr(uart, "classifier") and uart.classifier != '':
|
||||
result_pom += (" <classifier>{0}</classifier>\n").format(uart.classifier)
|
||||
|
||||
- mvn_deps = gather_dependencies(pom_path)
|
||||
if mvn_deps:
|
||||
result_pom += " <dependencies>\n"
|
||||
for d in mvn_deps:
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,713 +0,0 @@
|
||||
From ce0929d03ba33ff98727fbd527f4ec94412f78bd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Wed, 4 Oct 2023 08:26:00 +0200
|
||||
Subject: [PATCH 6/7] Test variable expansion in artifactId
|
||||
|
||||
---
|
||||
.../test_artifactid_expansion-want.xml | 34 ++
|
||||
test/data/install_pom/xgboost/pom.xml | 499 ++++++++++++++++++
|
||||
.../install_pom/xgboost/xgboost4j/pom.xml | 125 +++++
|
||||
test/install_pom_test.py | 7 +
|
||||
4 files changed, 665 insertions(+)
|
||||
create mode 100644 test/data/install_pom/test_artifactid_expansion-want.xml
|
||||
create mode 100644 test/data/install_pom/xgboost/pom.xml
|
||||
create mode 100644 test/data/install_pom/xgboost/xgboost4j/pom.xml
|
||||
|
||||
diff --git a/test/data/install_pom/test_artifactid_expansion-want.xml b/test/data/install_pom/test_artifactid_expansion-want.xml
|
||||
new file mode 100644
|
||||
index 00000000..ce5fdcf8
|
||||
--- /dev/null
|
||||
+++ b/test/data/install_pom/test_artifactid_expansion-want.xml
|
||||
@@ -0,0 +1,34 @@
|
||||
+<?xml version='1.0' encoding='UTF-8'?>
|
||||
+<project xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
+ <modelVersion>4.0.0</modelVersion>
|
||||
+ <groupId>ml.dmlc</groupId>
|
||||
+ <artifactId>xgboost4j_2.12</artifactId>
|
||||
+ <version>2.0.0</version>
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scala-lang</groupId>
|
||||
+ <artifactId>scala-compiler</artifactId>
|
||||
+ <version>2.12.18</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scala-lang</groupId>
|
||||
+ <artifactId>scala-library</artifactId>
|
||||
+ <version>2.12.18</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scala-lang.modules</groupId>
|
||||
+ <artifactId>scala-collection-compat_2.12</artifactId>
|
||||
+ <version>2.10.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>com.esotericsoftware</groupId>
|
||||
+ <artifactId>kryo</artifactId>
|
||||
+ <version>5.5.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>commons-logging</groupId>
|
||||
+ <artifactId>commons-logging</artifactId>
|
||||
+ <version>1.2</version>
|
||||
+ </dependency>
|
||||
+ </dependencies>
|
||||
+</project>
|
||||
\ No newline at end of file
|
||||
diff --git a/test/data/install_pom/xgboost/pom.xml b/test/data/install_pom/xgboost/pom.xml
|
||||
new file mode 100644
|
||||
index 00000000..80caa132
|
||||
--- /dev/null
|
||||
+++ b/test/data/install_pom/xgboost/pom.xml
|
||||
@@ -0,0 +1,499 @@
|
||||
+<?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>
|
||||
+
|
||||
+ <groupId>ml.dmlc</groupId>
|
||||
+ <artifactId>xgboost-jvm</artifactId>
|
||||
+ <version>2.0.0</version>
|
||||
+ <packaging>pom</packaging>
|
||||
+ <name>XGBoost JVM Package</name>
|
||||
+ <description>JVM Package for XGBoost</description>
|
||||
+ <url>https://github.com/dmlc/xgboost/tree/master/jvm-packages</url>
|
||||
+ <licenses>
|
||||
+ <license>
|
||||
+ <name>The Apache License, Version 2.0</name>
|
||||
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
+ </license>
|
||||
+ </licenses>
|
||||
+ <developers>
|
||||
+ <developer>
|
||||
+ <name>CodingCat</name>
|
||||
+ <email>codingcat@apache.org</email>
|
||||
+ </developer>
|
||||
+ </developers>
|
||||
+ <scm>
|
||||
+ <connection>scm:git:git:/github.com/dmlc/xgboost.git</connection>
|
||||
+ <developerConnection>scm:git:ssh://github.com/dmlc/xgboost.git</developerConnection>
|
||||
+ <url>https://github.com/dmlc/xgboost</url>
|
||||
+ </scm>
|
||||
+ <properties>
|
||||
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
+ <maven.compiler.source>1.8</maven.compiler.source>
|
||||
+ <maven.compiler.target>1.8</maven.compiler.target>
|
||||
+ <flink.version>1.17.1</flink.version>
|
||||
+ <junit.version>4.13.2</junit.version>
|
||||
+ <spark.version>3.4.0</spark.version>
|
||||
+ <spark.version.gpu>3.3.2</spark.version.gpu>
|
||||
+ <scala.version>2.12.18</scala.version>
|
||||
+ <scala.binary.version>2.12</scala.binary.version>
|
||||
+ <hadoop.version>3.3.5</hadoop.version>
|
||||
+ <maven.wagon.http.retryHandler.count>5</maven.wagon.http.retryHandler.count>
|
||||
+ <log.capi.invocation>OFF</log.capi.invocation>
|
||||
+ <use.cuda>OFF</use.cuda>
|
||||
+ <cudf.version>23.08.0</cudf.version>
|
||||
+ <spark.rapids.version>23.08.0</spark.rapids.version>
|
||||
+ <cudf.classifier>cuda11</cudf.classifier>
|
||||
+ <scalatest.version>3.2.16</scalatest.version>
|
||||
+ <scala-collection-compat.version>2.10.0</scala-collection-compat.version>
|
||||
+ </properties>
|
||||
+ <repositories>
|
||||
+ <repository>
|
||||
+ <id>central_maven</id>
|
||||
+ <name>central maven</name>
|
||||
+ <url>https://repo1.maven.org/maven2</url>
|
||||
+ </repository>
|
||||
+ </repositories>
|
||||
+ <modules>
|
||||
+ </modules>
|
||||
+
|
||||
+ <profiles>
|
||||
+ <profile>
|
||||
+ <!-- default active profile excluding gpu related test suites -->
|
||||
+ <id>default</id>
|
||||
+ <activation>
|
||||
+ <activeByDefault>true</activeByDefault>
|
||||
+ </activation>
|
||||
+ <modules>
|
||||
+ <module>xgboost4j</module>
|
||||
+ <module>xgboost4j-example</module>
|
||||
+ <module>xgboost4j-spark</module>
|
||||
+ <module>xgboost4j-flink</module>
|
||||
+ </modules>
|
||||
+ </profile>
|
||||
+
|
||||
+ <profile>
|
||||
+ <id>scala-2.13</id>
|
||||
+ <properties>
|
||||
+ <scala.binary.version>2.13</scala.binary.version>
|
||||
+ <scala.version>2.13.11</scala.version>
|
||||
+ </properties>
|
||||
+ </profile>
|
||||
+
|
||||
+ <!-- gpu profile with both cpu and gpu test suites -->
|
||||
+ <profile>
|
||||
+ <id>gpu</id>
|
||||
+ <activation>
|
||||
+ <property>
|
||||
+ <name>use.cuda</name>
|
||||
+ <value>ON</value>
|
||||
+ </property>
|
||||
+ </activation>
|
||||
+ <properties>
|
||||
+ <use.cuda>ON</use.cuda>
|
||||
+ </properties>
|
||||
+ <modules>
|
||||
+ <module>xgboost4j-gpu</module>
|
||||
+ <module>xgboost4j-spark-gpu</module>
|
||||
+ </modules>
|
||||
+ </profile>
|
||||
+
|
||||
+ <profile>
|
||||
+ <id>release</id>
|
||||
+ <modules>
|
||||
+ <module>xgboost4j</module>
|
||||
+ <module>xgboost4j-example</module>
|
||||
+ <module>xgboost4j-spark</module>
|
||||
+ <module>xgboost4j-flink</module>
|
||||
+ <module>xgboost4j-gpu</module>
|
||||
+ <module>xgboost4j-spark-gpu</module>
|
||||
+ </modules>
|
||||
+ <build>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-jar-plugin</artifactId>
|
||||
+ <version>3.3.0</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>empty-javadoc-jar</id>
|
||||
+ <phase>package</phase>
|
||||
+ <goals>
|
||||
+ <goal>jar</goal>
|
||||
+ </goals>
|
||||
+ <configuration>
|
||||
+ <classifier>javadoc</classifier>
|
||||
+ <classesDirectory>${basedir}/javadoc</classesDirectory>
|
||||
+ </configuration>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-release-plugin</artifactId>
|
||||
+ <version>3.0.1</version>
|
||||
+ <configuration>
|
||||
+ <autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
+ <useReleaseProfile>false</useReleaseProfile>
|
||||
+ <releaseProfiles>release</releaseProfiles>
|
||||
+ <goals>deploy</goals>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-gpg-plugin</artifactId>
|
||||
+ <version>3.1.0</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>sign-artifacts</id>
|
||||
+ <phase>verify</phase>
|
||||
+ <goals>
|
||||
+ <goal>sign</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-source-plugin</artifactId>
|
||||
+ <version>3.3.0</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>attach-sources</id>
|
||||
+ <goals>
|
||||
+ <goal>jar-no-fork</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.sonatype.plugins</groupId>
|
||||
+ <artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
+ <version>1.6.13</version>
|
||||
+ <extensions>true</extensions>
|
||||
+ <configuration>
|
||||
+ <serverId>ossrh</serverId>
|
||||
+ <nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
+ <autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-surefire-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <skipTests>true</skipTests>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </build>
|
||||
+ </profile>
|
||||
+ <profile>
|
||||
+ <id>assembly</id>
|
||||
+ <build>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-assembly-plugin</artifactId>
|
||||
+ <version>3.6.0</version>
|
||||
+ <configuration>
|
||||
+ <descriptorRefs>
|
||||
+ <descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
+ </descriptorRefs>
|
||||
+ <skipAssembly>true</skipAssembly>
|
||||
+ </configuration>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>make-assembly</id>
|
||||
+ <phase>package</phase>
|
||||
+ <goals>
|
||||
+ <goal>single</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </build>
|
||||
+ </profile>
|
||||
+ <profile>
|
||||
+ <id>release-to-github</id>
|
||||
+ <distributionManagement>
|
||||
+ <repository>
|
||||
+ <id>github.repo</id>
|
||||
+ <name>Temporary Staging Repository</name>
|
||||
+ <url>file://${project.build.directory}/mvn-repo</url>
|
||||
+ </repository>
|
||||
+ </distributionManagement>
|
||||
+ <properties>
|
||||
+ <github.global.server>github</github.global.server>
|
||||
+ </properties>
|
||||
+ <modules>
|
||||
+ <module>xgboost4j</module>
|
||||
+ <module>xgboost4j-example</module>
|
||||
+ <module>xgboost4j-spark</module>
|
||||
+ <module>xgboost4j-flink</module>
|
||||
+ <module>xgboost4j-gpu</module>
|
||||
+ <module>xgboost4j-spark-gpu</module>
|
||||
+ </modules>
|
||||
+ <build>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>com.github.github</groupId>
|
||||
+ <artifactId>site-maven-plugin</artifactId>
|
||||
+ <version>0.12</version>
|
||||
+ <configuration>
|
||||
+ <message>Maven artifacts for ${project.version}</message>
|
||||
+ <noJekyll>true</noJekyll>
|
||||
+ <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
|
||||
+ <branch>refs/heads/maven-repo</branch>
|
||||
+ <excludes>
|
||||
+ <exclude>*-with-dependencies.jar</exclude>
|
||||
+ </excludes>
|
||||
+ <repositoryName>xgboost</repositoryName>
|
||||
+ <repositoryOwner>CodingCat</repositoryOwner>
|
||||
+ <merge>true</merge>
|
||||
+ </configuration>
|
||||
+ <executions>
|
||||
+ <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
|
||||
+ <execution>
|
||||
+ <goals>
|
||||
+ <goal>site</goal>
|
||||
+ </goals>
|
||||
+ <phase>deploy</phase>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-deploy-plugin</artifactId>
|
||||
+ <version>3.1.1</version>
|
||||
+ <configuration>
|
||||
+ <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-surefire-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <skipTests>true</skipTests>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </build>
|
||||
+ </profile>
|
||||
+ <profile>
|
||||
+ <id>release-to-s3</id>
|
||||
+ <distributionManagement>
|
||||
+ <snapshotRepository>
|
||||
+ <id>maven-s3-snapshot-repo</id>
|
||||
+ <url>s3://xgboost-maven-repo/snapshot</url>
|
||||
+ </snapshotRepository>
|
||||
+ <repository>
|
||||
+ <id>maven-s3-release-repo</id>
|
||||
+ <url>s3://xgboost-maven-repo/release</url>
|
||||
+ </repository>
|
||||
+ </distributionManagement>
|
||||
+ <repositories>
|
||||
+ <repository>
|
||||
+ <id>maven-s3-snapshot-repo</id>
|
||||
+ <url>https://s3.amazonaws.com/xgboost-maven-repo/snapshot</url>
|
||||
+ </repository>
|
||||
+ <repository>
|
||||
+ <id>maven-s3-release-repo</id>
|
||||
+ <url>https://s3.amazonaws.com/xgboost-maven-repo/release</url>
|
||||
+ </repository>
|
||||
+ </repositories>
|
||||
+ <build>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-surefire-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <skipTests>true</skipTests>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </build>
|
||||
+ </profile>
|
||||
+ </profiles>
|
||||
+ <distributionManagement>
|
||||
+ <snapshotRepository>
|
||||
+ <id>ossrh</id>
|
||||
+ <url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
+ </snapshotRepository>
|
||||
+ </distributionManagement>
|
||||
+ <build>
|
||||
+ <resources>
|
||||
+ <resource>
|
||||
+ <directory>src/main/resources</directory>
|
||||
+ <filtering>true</filtering>
|
||||
+ </resource>
|
||||
+ </resources>
|
||||
+
|
||||
+ <pluginManagement>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.scalatest</groupId>
|
||||
+ <artifactId>scalatest-maven-plugin</artifactId>
|
||||
+ <version>2.2.0</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>test</id>
|
||||
+ <goals>
|
||||
+ <goal>test</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </pluginManagement>
|
||||
+
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.scalastyle</groupId>
|
||||
+ <artifactId>scalastyle-maven-plugin</artifactId>
|
||||
+ <version>1.0.0</version>
|
||||
+ <configuration>
|
||||
+ <verbose>false</verbose>
|
||||
+ <failOnViolation>true</failOnViolation>
|
||||
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
+ <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
|
||||
+ <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
|
||||
+ <configLocation>scalastyle-config.xml</configLocation>
|
||||
+ <outputEncoding>UTF-8</outputEncoding>
|
||||
+ </configuration>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>checkstyle</id>
|
||||
+ <phase>validate</phase>
|
||||
+ <goals>
|
||||
+ <goal>check</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-site-plugin</artifactId>
|
||||
+ <version>3.12.1</version>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-checkstyle-plugin</artifactId>
|
||||
+ <version>3.3.0</version>
|
||||
+ <configuration>
|
||||
+ <configLocation>checkstyle.xml</configLocation>
|
||||
+ <failOnViolation>true</failOnViolation>
|
||||
+ </configuration>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>checkstyle</id>
|
||||
+ <phase>validate</phase>
|
||||
+ <goals>
|
||||
+ <goal>check</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>net.alchim31.maven</groupId>
|
||||
+ <artifactId>scala-maven-plugin</artifactId>
|
||||
+ <version>4.8.1</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>compile</id>
|
||||
+ <goals>
|
||||
+ <goal>compile</goal>
|
||||
+ </goals>
|
||||
+ <phase>compile</phase>
|
||||
+ </execution>
|
||||
+ <execution>
|
||||
+ <id>test-compile</id>
|
||||
+ <goals>
|
||||
+ <goal>testCompile</goal>
|
||||
+ </goals>
|
||||
+ <phase>test-compile</phase>
|
||||
+ </execution>
|
||||
+ <execution>
|
||||
+ <phase>process-resources</phase>
|
||||
+ <goals>
|
||||
+ <goal>compile</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ <execution>
|
||||
+ <id>scala-compile-first</id>
|
||||
+ <phase>process-resources</phase>
|
||||
+ <goals>
|
||||
+ <goal>compile</goal>
|
||||
+ <goal>add-source</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-surefire-plugin</artifactId>
|
||||
+ <version>3.1.2</version>
|
||||
+ <configuration>
|
||||
+ <skipTests>false</skipTests>
|
||||
+ <useSystemClassLoader>false</useSystemClassLoader>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.scalatest</groupId>
|
||||
+ <artifactId>scalatest-maven-plugin</artifactId>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ <extensions>
|
||||
+ <extension>
|
||||
+ <groupId>com.github.seahen</groupId>
|
||||
+ <artifactId>maven-s3-wagon</artifactId>
|
||||
+ <version>1.3.3</version>
|
||||
+ </extension>
|
||||
+ </extensions>
|
||||
+ </build>
|
||||
+ <reporting>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
+ <version>3.4.5</version>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>net.alchim31.maven</groupId>
|
||||
+ <artifactId>scala-maven-plugin</artifactId>
|
||||
+ <version>4.8.1</version>
|
||||
+ <configuration>
|
||||
+ <jvmArgs>
|
||||
+ <jvmArg>-Xms64m</jvmArg>
|
||||
+ <jvmArg>-Xmx1024m</jvmArg>
|
||||
+ </jvmArgs>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </reporting>
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>com.esotericsoftware</groupId>
|
||||
+ <artifactId>kryo</artifactId>
|
||||
+ <version>5.5.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>commons-logging</groupId>
|
||||
+ <artifactId>commons-logging</artifactId>
|
||||
+ <version>1.2</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scalatest</groupId>
|
||||
+ <artifactId>scalatest_${scala.binary.version}</artifactId>
|
||||
+ <version>${scalatest.version}</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scalactic</groupId>
|
||||
+ <artifactId>scalactic_${scala.binary.version}</artifactId>
|
||||
+ <version>${scalatest.version}</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ </dependencies>
|
||||
+</project>
|
||||
diff --git a/test/data/install_pom/xgboost/xgboost4j/pom.xml b/test/data/install_pom/xgboost/xgboost4j/pom.xml
|
||||
new file mode 100644
|
||||
index 00000000..8d4f2c05
|
||||
--- /dev/null
|
||||
+++ b/test/data/install_pom/xgboost/xgboost4j/pom.xml
|
||||
@@ -0,0 +1,125 @@
|
||||
+<?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>ml.dmlc</groupId>
|
||||
+ <artifactId>xgboost-jvm</artifactId>
|
||||
+ <version>2.0.0</version>
|
||||
+ </parent>
|
||||
+ <name>xgboost4j</name>
|
||||
+ <artifactId>xgboost4j_${scala.binary.version}</artifactId>
|
||||
+ <version>2.0.0</version>
|
||||
+ <packaging>jar</packaging>
|
||||
+
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scala-lang</groupId>
|
||||
+ <artifactId>scala-compiler</artifactId>
|
||||
+ <version>${scala.version}</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scala-lang</groupId>
|
||||
+ <artifactId>scala-library</artifactId>
|
||||
+ <version>${scala.version}</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scala-lang.modules</groupId>
|
||||
+ <artifactId>scala-collection-compat_${scala.binary.version}</artifactId>
|
||||
+ <version>${scala-collection-compat.version}</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.hadoop</groupId>
|
||||
+ <artifactId>hadoop-hdfs</artifactId>
|
||||
+ <version>${hadoop.version}</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.hadoop</groupId>
|
||||
+ <artifactId>hadoop-common</artifactId>
|
||||
+ <version>${hadoop.version}</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>junit</groupId>
|
||||
+ <artifactId>junit</artifactId>
|
||||
+ <version>${junit.version}</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.scalatest</groupId>
|
||||
+ <artifactId>scalatest_${scala.binary.version}</artifactId>
|
||||
+ <version>${scalatest.version}</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ </dependencies>
|
||||
+
|
||||
+ <build>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-javadoc-plugin</artifactId>
|
||||
+ <version>3.5.0</version>
|
||||
+ <configuration>
|
||||
+ <show>protected</show>
|
||||
+ <nohelp>true</nohelp>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-assembly-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <skipAssembly>false</skipAssembly>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <artifactId>exec-maven-plugin</artifactId>
|
||||
+ <groupId>org.codehaus.mojo</groupId>
|
||||
+ <version>3.1.0</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <id>native</id>
|
||||
+ <phase>generate-sources</phase>
|
||||
+ <goals>
|
||||
+ <goal>exec</goal>
|
||||
+ </goals>
|
||||
+ <configuration>
|
||||
+ <executable>python</executable>
|
||||
+ <arguments>
|
||||
+ <argument>create_jni.py</argument>
|
||||
+ <argument>--log-capi-invocation</argument>
|
||||
+ <argument>${log.capi.invocation}</argument>
|
||||
+ </arguments>
|
||||
+ <workingDirectory>${user.dir}</workingDirectory>
|
||||
+ </configuration>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-jar-plugin</artifactId>
|
||||
+ <version>3.3.0</version>
|
||||
+ <executions>
|
||||
+ <execution>
|
||||
+ <goals>
|
||||
+ <goal>test-jar</goal>
|
||||
+ </goals>
|
||||
+ </execution>
|
||||
+ </executions>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-resources-plugin</artifactId>
|
||||
+ <version>3.3.1</version>
|
||||
+ <configuration>
|
||||
+ <nonFilteredFileExtensions>
|
||||
+ <nonFilteredFileExtension>dll</nonFilteredFileExtension>
|
||||
+ <nonFilteredFileExtension>dylib</nonFilteredFileExtension>
|
||||
+ <nonFilteredFileExtension>so</nonFilteredFileExtension>
|
||||
+ </nonFilteredFileExtensions>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </build>
|
||||
+</project>
|
||||
diff --git a/test/install_pom_test.py b/test/install_pom_test.py
|
||||
index c6acc644..db79c001 100644
|
||||
--- a/test/install_pom_test.py
|
||||
+++ b/test/install_pom_test.py
|
||||
@@ -131,6 +131,13 @@ class TestInstallPom(unittest.TestCase):
|
||||
result)
|
||||
self.assertEqual(report, '', report)
|
||||
|
||||
+ @install_pom(os.path.join('xgboost', 'xgboost4j', 'pom.xml'))
|
||||
+ def test_artifactid_expansion(self, stdout, stderr, return_value, result):
|
||||
+ self.assertEqual(return_value, 0, stderr)
|
||||
+ report = self.check_result(inspect.currentframe().f_code.co_name,
|
||||
+ result)
|
||||
+ self.assertEqual(report, '', report)
|
||||
+
|
||||
@install_pom('a_binary_file.pom')
|
||||
def test_not_pom(self, stdout, stderr, return_value, result):
|
||||
self.assertNotEqual(return_value, 0)
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,268 +0,0 @@
|
||||
From 3a32ce8695f891d8051cccd5273758d3cd9ce54c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Wed, 4 Oct 2023 08:32:33 +0200
|
||||
Subject: [PATCH 7/7] Test that we don't bomb on <relativePath/>
|
||||
|
||||
---
|
||||
test/data/install_pom/empty_relpath.pom | 182 ++++++++++++++++++
|
||||
.../install_pom/test_empty_relpath-want.xml | 39 ++++
|
||||
test/install_pom_test.py | 7 +
|
||||
3 files changed, 228 insertions(+)
|
||||
create mode 100644 test/data/install_pom/empty_relpath.pom
|
||||
create mode 100644 test/data/install_pom/test_empty_relpath-want.xml
|
||||
|
||||
diff --git a/test/data/install_pom/empty_relpath.pom b/test/data/install_pom/empty_relpath.pom
|
||||
new file mode 100644
|
||||
index 00000000..785b9710
|
||||
--- /dev/null
|
||||
+++ b/test/data/install_pom/empty_relpath.pom
|
||||
@@ -0,0 +1,182 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<!--
|
||||
+ Licensed to the Apache Software Foundation (ASF) under one
|
||||
+ or more contributor license agreements. See the NOTICE file
|
||||
+ distributed with this work for additional information
|
||||
+ regarding copyright ownership. The ASF licenses this file
|
||||
+ to you under the Apache License, Version 2.0 (the
|
||||
+ "License"); you may not use this file except in compliance
|
||||
+ with the License. You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing,
|
||||
+ software distributed under the License is distributed on an
|
||||
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
+ KIND, either express or implied. See the License for the
|
||||
+ specific language governing permissions and limitations
|
||||
+ under the License.
|
||||
+-->
|
||||
+<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.apache.maven.shared</groupId>
|
||||
+ <artifactId>maven-shared-components</artifactId>
|
||||
+ <version>39</version>
|
||||
+ <relativePath />
|
||||
+ </parent>
|
||||
+
|
||||
+ <artifactId>maven-filtering</artifactId>
|
||||
+ <version>3.3.1</version>
|
||||
+
|
||||
+ <name>Apache Maven Filtering</name>
|
||||
+ <description>A component to assist in filtering of resource files with properties from a Maven project.</description>
|
||||
+
|
||||
+ <contributors>
|
||||
+ <contributor>
|
||||
+ <name>Graham Leggett</name>
|
||||
+ </contributor>
|
||||
+ </contributors>
|
||||
+
|
||||
+ <scm>
|
||||
+ <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-filtering.git</connection>
|
||||
+ <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-filtering.git</developerConnection>
|
||||
+ <tag>maven-filtering-3.3.1</tag>
|
||||
+ <url>https://github.com/apache/maven-filtering/tree/${project.scm.tag}</url>
|
||||
+ </scm>
|
||||
+ <issueManagement>
|
||||
+ <system>JIRA</system>
|
||||
+ <url>https://issues.apache.org/jira/issues/?jql=project%20%3D%20MSHARED%20AND%20component%20%3D%20maven-filtering</url>
|
||||
+ </issueManagement>
|
||||
+ <ciManagement>
|
||||
+ <system>Jenkins</system>
|
||||
+ <url>https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-filtering/</url>
|
||||
+ </ciManagement>
|
||||
+ <distributionManagement>
|
||||
+ <site>
|
||||
+ <id>apache.website</id>
|
||||
+ <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
|
||||
+ </site>
|
||||
+ </distributionManagement>
|
||||
+
|
||||
+ <properties>
|
||||
+ <javaVersion>8</javaVersion>
|
||||
+ <mavenVersion>3.2.5</mavenVersion>
|
||||
+ <slf4jVersion>1.7.36</slf4jVersion>
|
||||
+ <plexusBuildApiVersion>0.0.7</plexusBuildApiVersion>
|
||||
+ <project.build.outputTimestamp>2023-03-21T10:53:39Z</project.build.outputTimestamp>
|
||||
+ </properties>
|
||||
+
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>javax.inject</groupId>
|
||||
+ <artifactId>javax.inject</artifactId>
|
||||
+ <version>1</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.slf4j</groupId>
|
||||
+ <artifactId>slf4j-api</artifactId>
|
||||
+ <version>${slf4jVersion}</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
+ <artifactId>plexus-build-api</artifactId>
|
||||
+ <version>${plexusBuildApiVersion}</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.maven</groupId>
|
||||
+ <artifactId>maven-core</artifactId>
|
||||
+ <version>${mavenVersion}</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.maven</groupId>
|
||||
+ <artifactId>maven-model</artifactId>
|
||||
+ <version>${mavenVersion}</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.maven</groupId>
|
||||
+ <artifactId>maven-settings</artifactId>
|
||||
+ <version>${mavenVersion}</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.codehaus.plexus</groupId>
|
||||
+ <artifactId>plexus-utils</artifactId>
|
||||
+ <version>3.5.1</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.codehaus.plexus</groupId>
|
||||
+ <artifactId>plexus-interpolation</artifactId>
|
||||
+ <version>1.26</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>commons-io</groupId>
|
||||
+ <artifactId>commons-io</artifactId>
|
||||
+ <version>2.11.0</version>
|
||||
+ </dependency>
|
||||
+
|
||||
+ <dependency>
|
||||
+ <groupId>org.mockito</groupId>
|
||||
+ <artifactId>mockito-core</artifactId>
|
||||
+ <version>4.7.0</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>junit</groupId>
|
||||
+ <artifactId>junit</artifactId>
|
||||
+ <version>4.13.2</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.hamcrest</groupId>
|
||||
+ <artifactId>hamcrest-core</artifactId>
|
||||
+ <version>2.2</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.slf4j</groupId>
|
||||
+ <artifactId>slf4j-simple</artifactId>
|
||||
+ <version>${slf4jVersion}</version>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
+ <artifactId>plexus-build-api</artifactId>
|
||||
+ <version>${plexusBuildApiVersion}</version>
|
||||
+ <classifier>tests</classifier>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.eclipse.sisu</groupId>
|
||||
+ <artifactId>org.eclipse.sisu.plexus</artifactId>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.eclipse.sisu</groupId>
|
||||
+ <artifactId>org.eclipse.sisu.inject</artifactId>
|
||||
+ <scope>test</scope>
|
||||
+ </dependency>
|
||||
+
|
||||
+ </dependencies>
|
||||
+
|
||||
+ <build>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.rat</groupId>
|
||||
+ <artifactId>apache-rat-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <excludes combine.children="append">
|
||||
+ <exclude>src/test/units-files/**</exclude>
|
||||
+ </excludes>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.eclipse.sisu</groupId>
|
||||
+ <artifactId>sisu-maven-plugin</artifactId>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </build>
|
||||
+</project>
|
||||
diff --git a/test/data/install_pom/test_empty_relpath-want.xml b/test/data/install_pom/test_empty_relpath-want.xml
|
||||
new file mode 100644
|
||||
index 00000000..03bd1115
|
||||
--- /dev/null
|
||||
+++ b/test/data/install_pom/test_empty_relpath-want.xml
|
||||
@@ -0,0 +1,39 @@
|
||||
+<?xml version='1.0' encoding='UTF-8'?>
|
||||
+<project xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
+ <modelVersion>4.0.0</modelVersion>
|
||||
+ <groupId>org.apache.maven.shared</groupId>
|
||||
+ <artifactId>maven-filtering</artifactId>
|
||||
+ <version>3.3.1</version>
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>javax.inject</groupId>
|
||||
+ <artifactId>javax.inject</artifactId>
|
||||
+ <version>1</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.slf4j</groupId>
|
||||
+ <artifactId>slf4j-api</artifactId>
|
||||
+ <version>1.7.36</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.sonatype.plexus</groupId>
|
||||
+ <artifactId>plexus-build-api</artifactId>
|
||||
+ <version>0.0.7</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.codehaus.plexus</groupId>
|
||||
+ <artifactId>plexus-utils</artifactId>
|
||||
+ <version>3.5.1</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.codehaus.plexus</groupId>
|
||||
+ <artifactId>plexus-interpolation</artifactId>
|
||||
+ <version>1.26</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>commons-io</groupId>
|
||||
+ <artifactId>commons-io</artifactId>
|
||||
+ <version>2.11.0</version>
|
||||
+ </dependency>
|
||||
+ </dependencies>
|
||||
+</project>
|
||||
\ No newline at end of file
|
||||
diff --git a/test/install_pom_test.py b/test/install_pom_test.py
|
||||
index db79c001..a39f3aa4 100644
|
||||
--- a/test/install_pom_test.py
|
||||
+++ b/test/install_pom_test.py
|
||||
@@ -103,6 +103,13 @@ class TestInstallPom(unittest.TestCase):
|
||||
result)
|
||||
self.assertEqual(report, '', report)
|
||||
|
||||
+ @install_pom('empty_relpath.pom')
|
||||
+ def test_empty_relpath(self, stdout, stderr, return_value, result):
|
||||
+ self.assertEqual(return_value, 0, stderr)
|
||||
+ report = self.check_result(inspect.currentframe().f_code.co_name,
|
||||
+ result)
|
||||
+ self.assertEqual(report, '', report)
|
||||
+
|
||||
@install_pom(os.path.join('xmvn', 'xmvn-tools', 'xmvn-install', 'pom.xml'))
|
||||
def test_parent_chain(self, stdout, stderr, return_value, result):
|
||||
self.assertEqual(return_value, 0, stderr)
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,39 +0,0 @@
|
||||
From 2ffdd71d859af3254732e30013bfddb2497c8a41 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Tue, 16 Jul 2024 06:56:39 +0200
|
||||
Subject: [PATCH 8/8] Reproducible builds: constant timestamp for
|
||||
pom.properties
|
||||
|
||||
---
|
||||
java-utils/maven_depmap.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
|
||||
index 4bfb877d..693cf5e3 100644
|
||||
--- a/java-utils/maven_depmap.py
|
||||
+++ b/java-utils/maven_depmap.py
|
||||
@@ -43,7 +43,7 @@ import sys
|
||||
|
||||
from os.path import basename, dirname
|
||||
import zipfile
|
||||
-from time import gmtime, strftime
|
||||
+import time
|
||||
from copy import deepcopy
|
||||
|
||||
from javapackages.maven.pom import POM
|
||||
@@ -172,7 +172,11 @@ def append_if_missing(archive_name, file_name, file_contents):
|
||||
archive = zipfile.ZipFile(archive_name, 'a')
|
||||
try:
|
||||
if file_name not in archive.namelist():
|
||||
- archive.writestr(file_name, file_contents)
|
||||
+ file_time = min(4354819199,
|
||||
+ max(315532800,
|
||||
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
|
||||
+ file_zipinfo = zipfile.ZipInfo(file_name, date_time=time.gmtime(file_time))
|
||||
+ archive.writestr(file_zipinfo, file_contents)
|
||||
finally:
|
||||
archive.close()
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
BIN
6.2.0.tar.gz
(Stored with Git LFS)
BIN
6.2.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c0083d0b436e542d440691244358483d37a2fa80e2801ec1a383a5406e28c170
|
||||
size 190957
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:08c5663e1f69c3d26f105dff181837b2be306ffd1ed1653fdbf3a63b60ab6274
|
||||
size 190905
|
BIN
6.3.4.tar.gz
(Stored with Git LFS)
BIN
6.3.4.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,47 +0,0 @@
|
||||
--- javapackages-6.3.2/javapackages-tools.spec 2024-10-08 08:19:44.208034468 +0200
|
||||
+++ javapackages-6.3.2/javapackages-tools.spec 2024-10-08 08:21:27.532053244 +0200
|
||||
@@ -22,7 +22,6 @@
|
||||
Source21: toolchains-openjdk21.xml
|
||||
|
||||
BuildRequires: coreutils
|
||||
-BuildRequires: which
|
||||
BuildRequires: make
|
||||
BuildRequires: rubygem-asciidoctor
|
||||
BuildRequires: %{python_prefix}-devel
|
||||
@@ -33,7 +32,6 @@
|
||||
Requires: javapackages-filesystem = %{version}-%{release}
|
||||
Requires: coreutils
|
||||
Requires: findutils
|
||||
-Requires: which
|
||||
|
||||
Provides: jpackage-utils = %{version}-%{release}
|
||||
|
||||
--- javapackages-6.3.2/java-utils/java-functions 2024-10-08 08:19:44.211367825 +0200
|
||||
+++ javapackages-6.3.2/java-utils/java-functions 2024-10-08 08:21:27.535386599 +0200
|
||||
@@ -169,7 +169,7 @@
|
||||
done
|
||||
fi
|
||||
|
||||
- JAVACMD=$(which java 2>/dev/null || :)
|
||||
+ JAVACMD=$(type -p java 2>/dev/null || :)
|
||||
if [ -x "${JAVACMD}" ]; then
|
||||
_log "Using JAVACMD from PATH: $JAVACMD"
|
||||
if [ -n "${JAVACMD_OPTS}" ]; then
|
||||
@@ -179,6 +179,8 @@
|
||||
JAVACMD="@{javadir}-utils/java-wrapper"
|
||||
fi
|
||||
return 0
|
||||
+ else
|
||||
+ unset JAVACMD
|
||||
fi
|
||||
|
||||
_err "Failed to set JAVACMD"
|
||||
@@ -315,7 +317,7 @@
|
||||
{
|
||||
local IFS=:
|
||||
local artifact="${1}"
|
||||
- local cmd=$(which xmvn-resolve 2>/dev/null || :)
|
||||
+ local cmd=$(type -p xmvn-resolve 2>/dev/null || :)
|
||||
|
||||
# If artifact contains semicolon then assume it specifies Maven
|
||||
# artifact coordinates.
|
@@ -1,18 +0,0 @@
|
||||
--- a/macros.d/macros.jpackage
|
||||
+++ b/macros.d/macros.jpackage
|
||||
@@ -10,11 +10,11 @@
|
||||
#==============================================================================
|
||||
# ---- default Java commands
|
||||
|
||||
-%ant %{?jpb_env} JAVA_HOME=%{java_home} ant
|
||||
-%jar %{java_home}/bin/jar
|
||||
+%ant %{?jpb_env} ant
|
||||
+%jar jar
|
||||
%java %(. @{javadir}-utils/java-functions; set_javacmd; echo $JAVACMD)
|
||||
-%javac %{java_home}/bin/javac
|
||||
-%javadoc %{java_home}/bin/javadoc
|
||||
+%javac javac
|
||||
+%javadoc javadoc
|
||||
|
||||
|
||||
#
|
@@ -1,18 +0,0 @@
|
||||
Index: javapackages-6.3.2/macros.d/macros.jpackage
|
||||
===================================================================
|
||||
--- javapackages-6.3.2.orig/macros.d/macros.jpackage
|
||||
+++ javapackages-6.3.2/macros.d/macros.jpackage
|
||||
@@ -35,10 +35,10 @@ cat > %{buildroot}%{_bindir}/%5 << EOF \
|
||||
#\
|
||||
# %{name} script\
|
||||
# JPackage Project <http://www.jpackage.org/>\
|
||||
-\
|
||||
+%{?java_home:\
|
||||
# Set default JAVA_HOME\
|
||||
-export JAVA_HOME="\\${JAVA_HOME:-%{?java_home}}"\
|
||||
-\
|
||||
+export JAVA_HOME="\\${JAVA_HOME:-%{java_home}}"\
|
||||
+}\
|
||||
# Source functions library\
|
||||
. @{javadir}-utils/java-functions\
|
||||
\
|
Reference in New Issue
Block a user