summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-09-11 03:15:47 +0000
committerCoprDistGit <infra@openeuler.org>2025-09-11 03:15:47 +0000
commit1ad1b85b65c623331e1d93fb273b96e32f1cce5f (patch)
treeb9385b7243de60640c48abbd2cc1f3e872243060
parent8c07b80acadd5bd594b3919fc4814a1a4848ae14 (diff)
automatic import of UNT
-rw-r--r--UNT.spec39
1 files changed, 36 insertions, 3 deletions
diff --git a/UNT.spec b/UNT.spec
index a2d5d2a..35aa555 100644
--- a/UNT.spec
+++ b/UNT.spec
@@ -15,10 +15,43 @@ and then compile native code to native binary.
%prep
%setup -q -n %{name}
-
+mkdir -p %{_builddir}/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.6/
+cp %{SOURCE1} %{_builddir}/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar
+cat > %{_builddir}/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom << 'EOF'
+<?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>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <packaging>maven-plugin</packaging>
+ <name>Apache Maven Resources Plugin</name>
+</project>
+EOF
+cat > %{_builddir}/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/maven-metadata-local.xml << 'EOF'
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <versioning>
+ <latest>2.6</latest>
+ <release>2.6</release>
+ <versions>
+ <version>2.6</version>
+ </versions>
+ <lastUpdated>20230101000000</lastUpdated>
+ </versioning>
+</metadata>
+EOF
%build
-mvn install:install-file -Dfile=%{SOURCE1} -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.6 -Dpackage=jar
-mvn package -DskipTests
+# 使用自定义设置文件运行 Maven 构建
+cat > %{_builddir}/settings.xml << 'EOF'
+<settings>
+ <localRepository>%{_builddir}/.m2/repository</localRepository>
+</settings>
+EOF
+# mvn install:install-file -Dfile=%{SOURCE1} -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.6 -Dpackage=jar
+mvn -s %{_builddir}/settings.xml package -DskipTests
%install
mkdir -p %{buildroot}/opt/udf-trans-opt/