From e01a1b9277394a6199d7587d48a4fe855a24ac63 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 11 Sep 2025 03:30:33 +0000 Subject: automatic import of UNT --- UNT.spec | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/UNT.spec b/UNT.spec index 35aa555..be7bcd4 100644 --- a/UNT.spec +++ b/UNT.spec @@ -9,48 +9,28 @@ Source1: maven-resources-plugin-2.6.jar BuildRequires: maven BuildArch: noarch +%{!?maven_mirror_url: %global maven_mirror_url https://cmc.rnd.huawei.com/mirror/index/cmcmirrors?fromCMC=true} + %description UDF native tool can convert java code to native code, 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' - - - 4.0.0 - org.apache.maven.plugins - maven-resources-plugin - 2.6 - maven-plugin - Apache Maven Resources Plugin - -EOF -cat > %{_builddir}/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/maven-metadata-local.xml << 'EOF' - - - org.apache.maven.plugins - maven-resources-plugin - - 2.6 - 2.6 - - 2.6 - - 20230101000000 - - -EOF + %build -# 使用自定义设置文件运行 Maven 构建 -cat > %{_builddir}/settings.xml << 'EOF' +cat > %{_builddir}/settings.xml << EOF - %{_builddir}/.m2/repository + + + custom-mirror + * + Custom Maven Repository Mirror + %{maven_mirror_url} + + 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 -- cgit v1.2.3