From f43254ed49032b60036b762d68b5bfa8f21688e4 Mon Sep 17 00:00:00 2001 From: Kshitiz-Mhto Date: Fri, 10 Feb 2023 23:28:50 +0545 Subject: [PATCH 1/5] resolved breaking of build process --- cli/pom.xml | 48 ++++++++++++++++++++++++++++- cli/src/main/assembly/my-script.sh | 22 +++++++++++++ cli/src/main/assembly/zip-linux.xml | 4 +-- 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100755 cli/src/main/assembly/my-script.sh diff --git a/cli/pom.xml b/cli/pom.xml index fe72229..50bc44a 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -17,6 +17,8 @@ io.quarkus.platform 2.6.0.CR1 2.22.1 + 1.6.0 + 1.8 @@ -127,11 +129,33 @@ + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + run-my-script + package + + exec + + + /bin/bash + + -c + src/main/assembly/my-script.sh + + + + + org.apache.maven.plugins maven-assembly-plugin + default-assembly package single @@ -140,11 +164,33 @@ false src/main/assembly/zip-linux.xml - + + + org.apache.maven.plugins + maven-antrun-plugin + ${maven-antrun-plugin.version} + + + fixing-descriptor-file + package + + run + + + + + + + + + + + + diff --git a/cli/src/main/assembly/my-script.sh b/cli/src/main/assembly/my-script.sh new file mode 100755 index 0000000..fca9cc9 --- /dev/null +++ b/cli/src/main/assembly/my-script.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +pom_file="./pom.xml" +project_build_finalName="$(grep -oP '(?<=).*(?=)' pom.xml | head -1)-$(grep -oP '(?<=).*(?=)' pom.xml | head -1)-runner" +file_to_check="./target/$project_build_finalName" +file_to_modify="./src/main/assembly/zip-linux.xml" + +# echo $(pwd) +if [ ! -f "$file_to_check" ] && [ ! -x "$file_to_check" ]; then + if grep -q "//;}' $file_to_modify + echo "rolling back the descriptor file to default." + exit 0 + else + echo "$file_to_check not found or not executable, modifying $file_to_modify" + sed -i -e '//,/<\/files>/{//s/^/\t/}' $file_to_modify + exit 0 + fi +else + echo "$file_to_check found executable, no changes made to $file_to_modify" + exit 0 +fi diff --git a/cli/src/main/assembly/zip-linux.xml b/cli/src/main/assembly/zip-linux.xml index fb5bb98..b8a8dd6 100644 --- a/cli/src/main/assembly/zip-linux.xml +++ b/cli/src/main/assembly/zip-linux.xml @@ -13,11 +13,11 @@ / - + ${project.build.directory}/${project.build.finalName}-runner /installer - starfix + starfix \ No newline at end of file From a9aa2fdd808483fc64976078543f7c5689da73f0 Mon Sep 17 00:00:00 2001 From: Kshitiz-Mhto Date: Fri, 10 Feb 2023 23:33:06 +0545 Subject: [PATCH 2/5] edited pom.xml --- cli/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/pom.xml b/cli/pom.xml index 50bc44a..4c26f18 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -164,7 +164,7 @@ false src/main/assembly/zip-linux.xml - + From 199009b3bd464e38d900dcdf34c77b4ea280629c Mon Sep 17 00:00:00 2001 From: Kshitiz-Mhto Date: Fri, 10 Feb 2023 23:37:43 +0545 Subject: [PATCH 3/5] spaces edited --- cli/src/main/assembly/zip-linux.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/main/assembly/zip-linux.xml b/cli/src/main/assembly/zip-linux.xml index b8a8dd6..fff53c4 100644 --- a/cli/src/main/assembly/zip-linux.xml +++ b/cli/src/main/assembly/zip-linux.xml @@ -13,7 +13,7 @@ / - + ${project.build.directory}/${project.build.finalName}-runner /installer From 646e12acbbdcd7051ca41f0fb5ba1169d0a5bef9 Mon Sep 17 00:00:00 2001 From: Kshitiz-Mhto Date: Tue, 21 Feb 2023 19:15:15 +0545 Subject: [PATCH 4/5] mvn assembly will only run iff native profile is set to true --- cli/pom.xml | 55 +++++++----------------------- cli/src/main/assembly/my-script.sh | 22 ------------ 2 files changed, 12 insertions(+), 65 deletions(-) delete mode 100755 cli/src/main/assembly/my-script.sh diff --git a/cli/pom.xml b/cli/pom.xml index 4c26f18..1aa038d 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -96,6 +96,10 @@ windows + + native + true + @@ -126,30 +130,13 @@ unix + + native + true + - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - - run-my-script - package - - exec - - - /bin/bash - - -c - src/main/assembly/my-script.sh - - - - - org.apache.maven.plugins maven-assembly-plugin @@ -169,28 +156,6 @@ - - org.apache.maven.plugins - maven-antrun-plugin - ${maven-antrun-plugin.version} - - - fixing-descriptor-file - package - - run - - - - - - - - - - - - @@ -200,6 +165,10 @@ mac + + native + true + diff --git a/cli/src/main/assembly/my-script.sh b/cli/src/main/assembly/my-script.sh deleted file mode 100755 index fca9cc9..0000000 --- a/cli/src/main/assembly/my-script.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -pom_file="./pom.xml" -project_build_finalName="$(grep -oP '(?<=).*(?=)' pom.xml | head -1)-$(grep -oP '(?<=).*(?=)' pom.xml | head -1)-runner" -file_to_check="./target/$project_build_finalName" -file_to_modify="./src/main/assembly/zip-linux.xml" - -# echo $(pwd) -if [ ! -f "$file_to_check" ] && [ ! -x "$file_to_check" ]; then - if grep -q "//;}' $file_to_modify - echo "rolling back the descriptor file to default." - exit 0 - else - echo "$file_to_check not found or not executable, modifying $file_to_modify" - sed -i -e '//,/<\/files>/{//s/^/\t/}' $file_to_modify - exit 0 - fi -else - echo "$file_to_check found executable, no changes made to $file_to_modify" - exit 0 -fi From 89691e9611a9339155a858a47491722aeefc0773 Mon Sep 17 00:00:00 2001 From: Kshitiz-Mhto Date: Tue, 21 Feb 2023 19:17:48 +0545 Subject: [PATCH 5/5] minor changes to pom.xml --- cli/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index 1aa038d..c55ea69 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -17,8 +17,6 @@ io.quarkus.platform 2.6.0.CR1 2.22.1 - 1.6.0 - 1.8 @@ -108,6 +106,7 @@ maven-assembly-plugin + default-assembly package single @@ -177,6 +176,7 @@ maven-assembly-plugin + default-assembly package single