From: Olivier Lamy Date: Sun, 9 Sep 2012 15:38:26 +0000 (+0000) Subject: [MRM-1660] use log4j2 X-Git-Tag: archiva-1.4-M3~278 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1377df45646f0de232d0abd52e64bd79eb364ecb;p=archiva.git [MRM-1660] use log4j2 git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1382518 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml index 935e2ef20..2662c2d54 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml @@ -92,7 +92,7 @@ ${archetypeVersion} ${basedir}/src/test/test-settings.xml - ${basedir}/target/local-repo + ${project.build.directory}/local-repo diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml index 81d1f64df..3659cb38e 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml @@ -35,6 +35,8 @@ ${archivaVersion} ${wagon.version} + ${slf4j.version} + ${log4j.version} @@ -72,14 +74,34 @@ org.slf4j slf4j-api - 1.6.4 + ${slf4jVersion} + - org.slf4j - slf4j-log4j12 - 1.6.4 - provided + org.apache.logging.log4j + log4j-core + ${log4jVersion} + runtime + + + org.apache.logging.log4j + log4j12-api + ${log4jVersion} + runtime + + org.apache.logging.log4j + slf4j-impl + ${log4jVersion} + runtime + + + org.apache.logging.log4j + log4j-jcl + ${log4jVersion} + runtime + + org.apache.archiva archiva-repository-admin-default diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml deleted file mode 100644 index 7780ac880..000000000 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..814779b2d --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml index dee96f39b..690cd4e0e 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml @@ -177,6 +177,12 @@ test + + org.apache.logging.log4j + slf4j-impl + test + + org.apache.archiva.redback redback-users-memory diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j.xml deleted file mode 100644 index 9b1a6585b..000000000 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..77854adb5 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j2-test.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j.xml deleted file mode 100644 index c9dfce930..000000000 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..740df697e --- /dev/null +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml index 77f970c04..a1a812d39 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml @@ -266,6 +266,12 @@ test + + org.apache.logging.log4j + slf4j-impl + test + + org.hsqldb hsqldb diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j.xml deleted file mode 100644 index 8451b6263..000000000 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..d5ab04706 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml index 8b114b1b7..ac2288a69 100644 --- a/archiva-modules/archiva-web/archiva-web-common/pom.xml +++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml @@ -139,6 +139,11 @@ log4j12-api test + + org.apache.logging.log4j + slf4j-impl + test + org.apache.archiva archiva-test-utils diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j.xml deleted file mode 100644 index aecb237a7..000000000 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..12d50dc36 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-webapp-js/pom.xml b/archiva-modules/archiva-web/archiva-webapp-js/pom.xml index 1e47e168f..49452e9b5 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-js/pom.xml @@ -641,6 +641,11 @@ org.apache.archiva.redback redback-integrations-security + + org.slf4j + jcl-over-slf4j + provided + commons-logging commons-logging diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j.xml deleted file mode 100644 index 4ab8ea41e..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j2.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j2.xml new file mode 100644 index 000000000..52a145d9e --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j2.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + %d [%t] %-5p %c %x - %m%n + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} %m%n + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..710a8cd33 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/test/resources/log4j2-test.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index e255b5fcc..6b2a8b8aa 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -317,11 +317,30 @@ + + org.slf4j + slf4j-ext + + + org.slf4j + jcl-over-slf4j + provided + org.apache.logging.log4j log4j12-api runtime + + org.apache.logging.log4j + log4j-core + runtime + + + org.apache.logging.log4j + slf4j-impl + runtime + httpunit httpunit @@ -486,6 +505,12 @@ org.apache.archiva.redback redback-struts2-integration + + + org.slf4j + jcl-over-slf4j + + org.apache.archiva.redback @@ -1310,28 +1335,6 @@ dev - - org.apache.maven.plugins - maven-antrun-plugin - - - override-log4j-with-console-output - process-resources - - run - - - - - - - - - - - org.apache.maven.plugins maven-dependency-plugin @@ -1468,10 +1471,12 @@ ${archivaAppServerBase} ${archivaAppServerBase} ${archivaAppServerBase}/logs - ${basedir}/target/auto-admin-creation.properties - + ${basedir}/src/test/tomcat/auto-admin-creation.properties ${project.build.directory} + + ${basedir}/src/test/tomcat + @@ -1498,10 +1503,12 @@ ${archivaAppServerBase} ${archivaAppServerBase} ${archivaAppServerBase}/logs - ${basedir}/target/auto-admin-creation.properties - + ${basedir}/src/test/tomcat/auto-admin-creation.properties ${project.build.directory} + + ${basedir}/src/test/tomcat + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml new file mode 100644 index 000000000..16e84a5a1 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + %d [%t] %-5p %c %x - %m%n + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} %m%n + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml deleted file mode 100644 index 8f948fbb5..000000000 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..8d23a38d5 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j2-test.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j.xml deleted file mode 100644 index 11476e0f5..000000000 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml new file mode 100644 index 000000000..8c01d10be --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml index 2747ef877..645e20f57 100644 --- a/archiva-modules/plugins/maven2-repository/pom.xml +++ b/archiva-modules/plugins/maven2-repository/pom.xml @@ -187,6 +187,11 @@ test + + org.apache.logging.log4j + log4j12-api + + diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml index ac07043de..383dcf330 100644 --- a/archiva-modules/plugins/metadata-store-jcr/pom.xml +++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml @@ -63,16 +63,16 @@ provided - - commons-logging - commons-logging - org.slf4j jcl-over-slf4j + + org.apache.logging.log4j + log4j-jcl + org.springframework spring-test diff --git a/archiva-modules/plugins/stage-repository-merge/pom.xml b/archiva-modules/plugins/stage-repository-merge/pom.xml index 8a8adb65f..ac0f2eb73 100644 --- a/archiva-modules/plugins/stage-repository-merge/pom.xml +++ b/archiva-modules/plugins/stage-repository-merge/pom.xml @@ -80,6 +80,11 @@ log4j12-api test + + org.apache.logging.log4j + slf4j-impl + test + org.apache.maven.wagon wagon-http diff --git a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j.xml b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j.xml deleted file mode 100644 index c07e3a4e7..000000000 --- a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000..1ce090b03 --- /dev/null +++ b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 8db3d5986..8e4b83905 100644 --- a/pom.xml +++ b/pom.xml @@ -1151,6 +1151,16 @@ slf4j-api ${slf4j.version} + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + + + org.slf4j + slf4j-ext + ${slf4j.version} + org.slf4j slf4j-jdk14 @@ -1553,9 +1563,10 @@ commons-logging:commons-logging-api log4j:log4j +