Skip to content

Commit

Permalink
[SRVLOGIC-211] add script to remove modules that should not be in the…
Browse files Browse the repository at this point in the history
… productized build
  • Loading branch information
rgdoliveira committed Jan 22, 2024
1 parent 8e232ca commit 2c00e33
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions productized/modules
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pom.xml;kogito-maven-plugin,springboot
addons/common/pom.xml;events,monitoring,explainability,human-task-prediction,mail,tracing,task-management,marshallers
addons/common/persistence/pom.xml;infinispan,filesystem,mongodb,postgresql,rocksdb
api/pom.xml;kogito-api-incubation-common,kogito-api-incubation-common-objectmapper,kogito-api-incubation-application,kogito-api-incubation-processes,kogito-api-incubation-processes-services,kogito-api-incubation-predictions,kogito-api-incubation-predictions-services,kogito-api-incubation-decisions,kogito-api-incubation-decisions-services,kogito-api-incubation-rules,kogito-api-incubation-rules-services
drools/pom.xml;kogito-pmml-api-dependencies,kogito-efesto-drl,kogito-pmml-dependencies,kogito-pmml-openapi,kogito-pmml,kogito-scenario-simulation
kogito-codegen-modules/pom.xml;kogito-codegen-rules,kogito-codegen-decisions,kogito-codegen-predictions,kogito-codegen-integration-tests,kogito-codegen-sample
kogito-serverless-workflow/pom.xml;kogito-serverless-workflow-executor,kogito-serverless-workflow-executor-tests
quarkus/addons/pom.xml;explainability,mail,monitoring,process-svg,task-notification,tracing-decision,task-management,marshallers,process-definitions
quarkus/addons/events/pom.xml;decisions,predictions,rules,mongodb
quarkus/addons/jobs/pom.xml;messaging,knative-eventing
quarkus/addons/persistence/pom.xml;infinispan,kafka,filesystem,mongodb,postgresql,rocksdb
quarkus/extensions/pom.xml;kogito-quarkus-extension,kogito-quarkus-incubation-common,kogito-quarkus-processes-extension,kogito-quarkus-rules-extension,kogito-quarkus-decisions-extension,kogito-quarkus-predictions-extension
quarkus/extensions/kogito-quarkus-extension/pom.xml;kogito-quarkus-integration-test,kogito-quarkus-integration-test-maven-devmode
quarkus/integration-tests/pom.xml;integration-tests-quarkus-rules,integration-tests-quarkus-legacy-rules,integration-tests-quarkus-decisions,integration-tests-quarkus-resteasy-classic,integration-tests-quarkus-resteasy-reactive,integration-tests-kogito-plugin,integration-tests-quarkus-norest,integration-tests-quarkus-processes,integration-tests-quarkus-processes-reactive,integration-tests-quarkus-processes-persistence,integration-tests-quarkus-source-files,integration-tests-quarkus-gradle
28 changes: 28 additions & 0 deletions productized/remove_modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
#
# This script expects a configuration file separated by semicolon, where the first part is the pom and the second the modules to be removed from that pom
# It can be invoked from project root folder using: $ ./productized/remove_modules.sh ./productized/modules

# fast fail
set -e
set -o pipefail

if [ $# -lt 1 ];
then
echo "$0: Missing arguments"
exit
fi

config_file="${1}"
for line in `cat "$config_file"`
do
pom=$(echo $line | cut -d ';' -f1)
modules=$(echo $line | cut -d ';' -f2)

modules_list=$(echo $modules | tr "," "\n")
for module in ${modules_list}
do
echo "Removing module ${module} from ${pom}"
sed -i "/<module>${module}<\/module/d" ${pom}
done
done

0 comments on commit 2c00e33

Please sign in to comment.