From dd453f4185c8e7e9608605a35abd4ac4eaadba76 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 9 Mar 2015 15:57:48 -0700 Subject: [PATCH] Include slf4j and log4j in jgit command line This enables the command line to log. Include log4j configuration to log warnings and errors to stderr. Exclude the dependencies which log4j 1.2.15 should have marked optional. See http://unitstep.net/blog/2009/05/18/resolving-log4j-1215-dependency-problems-in-maven-using-exclusions/ for details Change-Id: Ie730db4007fb7614fd7d130cd0858b1ac550066a Signed-off-by: Matthias Sohn --- org.eclipse.jgit.pgm/pom.xml | 18 ++++++++++++++++++ .../resources/log4j.properties | 6 ++++++ pom.xml | 18 ++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 org.eclipse.jgit.pgm/resources/log4j.properties diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index 2bc11e8b9..52cd0a3f2 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -93,6 +93,24 @@ org.eclipse.jgit.ui ${project.version} + + + org.slf4j + slf4j-api + ${slf4j-version} + + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + log4j + log4j + ${log4j-version} + diff --git a/org.eclipse.jgit.pgm/resources/log4j.properties b/org.eclipse.jgit.pgm/resources/log4j.properties new file mode 100644 index 000000000..4a2e48011 --- /dev/null +++ b/org.eclipse.jgit.pgm/resources/log4j.properties @@ -0,0 +1,6 @@ +log4j.rootLogger=WARNING, stderr + +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/pom.xml b/pom.xml index 78af6fe44..4b8ac43eb 100644 --- a/pom.xml +++ b/pom.xml @@ -561,6 +561,24 @@ log4j log4j ${log4j-version} + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + +