diff --git a/docker/Dockerfile b/docker/Dockerfile index 88f2eac..207828b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,6 +8,9 @@ MAINTAINER Derry Hamilton # Install up-to-date epel rpm repository RUN yum -y install epel-release +# Install java first, to get a sensible one. +RUN yum -y install java-1.8.0-openjdk-devel + # Install various packages to get compile environment RUN yum -y groupinstall 'Development Tools' diff --git a/install_extra/copying_defaults_log4j.properties b/install_extra/copying_defaults_log4j.properties deleted file mode 100644 index f83dfb2..0000000 --- a/install_extra/copying_defaults_log4j.properties +++ /dev/null @@ -1,28 +0,0 @@ -log4j.rootLogger=info, stdout, R, SYSLOG - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Threshold=info -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -# Pattern to output the caller's file name and line number. -#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %d - %m%n -log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} %x - %m%n - -log4j.appender.R=org.apache.log4j.RollingFileAppender -log4j.appender.R.File=/tmp/DefaultCopyingApp.log - -log4j.appender.R.MaxFileSize=100KB -# Keep one backup file -log4j.appender.R.MaxBackupIndex=1 - -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.layout.ConversionPattern=%p %t %c %d - %m%n - - -log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender -log4j.appender.SYSLOG.Threshold=info -log4j.appender.SYSLOG.syslogHost=localhost -log4j.appender.SYSLOG.Facility=LOCAL4 -log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout -log4j.appender.SYSLOG.layout.conversionPattern=%d{ISO8601} %-5p [%t] %c{2} %x - %m%n - diff --git a/install_extra/copying_defaults_log4j.xml b/install_extra/copying_defaults_log4j.xml new file mode 100644 index 0000000..adeb7a4 --- /dev/null +++ b/install_extra/copying_defaults_log4j.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/install_extra/run_copying_job b/install_extra/run_copying_job index 07972b2..bf51414 100755 --- a/install_extra/run_copying_job +++ b/install_extra/run_copying_job @@ -12,11 +12,11 @@ then exit 2 fi -LOG_PROPS=/etc/ujetl/copying_defaults_log4j.properties -if [ -e "/etc/ujetl/${JOBNAME}_log4j.properties" ] +LOG_PROPS=/etc/ujetl/copying_defaults_log4j.xml +if [ -e "/etc/ujetl/${JOBNAME}_log4j.xml" ] then - echo Using log config "/etc/ujetl/${JOBNAME}_log4j.properties" - LOG_PROPS="/etc/ujetl/${JOBNAME}_log4j.properties" + echo Using log config "/etc/ujetl/${JOBNAME}_log4j.xml" + LOG_PROPS="/etc/ujetl/${JOBNAME}_log4j.xml" else echo Using default logging. fi diff --git a/uJETL.spec b/uJETL.spec index a885963..f9491e7 100644 --- a/uJETL.spec +++ b/uJETL.spec @@ -25,9 +25,9 @@ true mkdir -p $RPM_BUILD_ROOT/usr/share/ujetl/lib $RPM_BUILD_ROOT/etc/ujetl $RPM_BUILD_ROOT/usr/bin cp target/CopyingApp-*-jar-with-dependencies.jar $RPM_BUILD_ROOT/usr/share/ujetl/lib/CopyingApp.jar cp install_extra/run_copying_job $RPM_BUILD_ROOT/usr/bin -cp install_extra/copying_defaults_log4j.properties $RPM_BUILD_ROOT/etc/ujetl +cp install_extra/copying_defaults_log4j.xml $RPM_BUILD_ROOT/etc/ujetl %files /usr/share/ujetl/lib/CopyingApp.jar /usr/bin/run_copying_job -/etc/ujetl/copying_defaults_log4j.properties +/etc/ujetl/copying_defaults_log4j.xml