File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ RUN cd ./Core && mvn -o install -Dmaven.repo.local=$LOCAL_REPO
4242RUN mvn -o -Dopensextant.solr=./xponents-solr/solr7 \
4343 -Dmaven.repo.local=$LOCAL_REPO clean package dependency:copy-dependencies
4444
45+ # 1a. Log4J cleanup
46+ RUN for log4jdir in `find $LOCAL_REPO -type d | grep log4j | grep "2.11"`; do rm -rf $log4jdir; done
47+
48+
4549# 2. Copy built items and metadata from install to final runtime CLASSPATH ./lib
4650RUN cp ./target/*jar ./lib/
4751
Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ VERSION="3.5"
66script=` dirname $0 ; `
77basedir=` cd -P $script /..; echo $PWD `
88
9+
10+ run_sonar=0
911SONAR_URL=http://localhost:9000
1012if [ -n " $1 " ]; then
1113 SONAR_URL=$1
1214 if [ -n " $2 " ] ; then
1315 SONAR_TOKEN=$2
16+ # run sonar only if command line args are given
17+ run_sonar=1
1418 else
1519 echo " Usage: $0 SONAR_URL SONAR_TOKEN"
1620 echo
@@ -62,7 +66,7 @@ echo "++++++++++++++++ EXAMPLES ++++++++++++++++"
6266
6367
6468# Code scan using Sonarqube:
65- if [ -n " $SONAR_TOKEN " ]; then
69+ if [ $run_sonar -eq 1 ]; then
6670
6771 git init
6872 git add .gitignore pom.xml Core/pom.xml Core/src src script python
@@ -89,11 +93,6 @@ if [ -n "$SONAR_TOKEN" ]; then
8993fi
9094
9195
92- # Log4J cleanup
93- for log4jdir in ` find ./maven-repo -type d | grep log4j | grep " 2.11" ` ; do
94- echo " Remove $log4jdir "
95- rm -rf $log4jdir
96- done
9796
9897# One last time: go-offline
9998# -- Remove cache files from any Internet downloads
@@ -102,6 +101,12 @@ find ./$REPO -name "*.sha1" -exec rm {} \;
102101find ./$REPO -name " *.repositories" -exec rm {} \;
103102mvn dependency:go-offline -Dmaven.repo.local=$REPO
104103
104+ # Log4J cleanup
105+ for log4jdir in ` find ./maven-repo -type d | grep log4j | grep " 2.11" ` ; do
106+ echo " Remove $log4jdir "
107+ rm -rf $log4jdir
108+ done
109+
105110
106111# Docker
107112echo " ++++++++++++++++ DOCKER / Maven Offline ++++++++++++++++"
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ rm -r $REL/xponents-solr/retired
7474rm -r $REL /xponents-solr/script/__pycache__
7575rm -f $REL /xponents-solr/solr7-dist/licenses/log4j* 2.11*
7676
77- cp -r $basedir /dev.env $basedir /Examples/Docker/* $REL /
77+ cp -r $basedir /.gitignore $basedir / dev.env $basedir /Examples/Docker/* $REL /
7878rm -r $REL /Sonarqube
7979
8080# Distro has API docs in JAR files.
You can’t perform that action at this time.
0 commit comments