From 25a2051acf9b3095b33776bf4e269c7fd5dc678a Mon Sep 17 00:00:00 2001 From: Giovanni Meo Date: Mon, 11 Nov 2013 18:39:11 +0100 Subject: [PATCH] Reduce logged messages during build and concentrate only on the ones needed for debugging build errors - Create a maven artifact that contains a default settings for logback.xml so it can be reused as dependency to make sure some plugins don't generate too much verbose output - Use the artifact org.opendaylight.controller:commons.logback_settings as UT dependency so to make sure only in case of errors the follow UT spit messages: + netconf-impl + config-netconf-connector - Remove duplicated logback.xml where not needed - Remove logback.xml and space_and_tabs_checks.xml where no longer needed - Added logback.xml as a file on the integration tests using pax-exam, there a local file seems to be required (unfortunately). Make sure the pax-exam uses it for the tests where not using it. - Made sure the sanitytest in distribution only runs when integrationstests profile is selected - Fixed an issue in importing in eclipse zeromq module - Excluded all tests from mdsal unless the integrationtests profile is selected Signed-off-by: Giovanni Meo Change-Id: I9c12965bb3de5c8cba1039992cadbe27026bca2a --- .../services_implementation/pom.xml | 4 + opendaylight/commons/logback_settings/pom.xml | 17 +++ .../src/main/resources}/logback.xml | 0 opendaylight/commons/opendaylight/pom.xml | 58 +++++---- opendaylight/commons/parent/logback.xml | 12 -- .../commons/parent/space_and_tabs_checks.xml | 17 --- .../distribution/opendaylight/pom.xml | 114 ++++++++++-------- .../hosttracker/implementation/pom.xml | 4 + .../src/test/resources/logback.xml | 13 -- .../hosttracker_new/implementation/pom.xml | 4 + .../src/test/resources/logback.xml | 13 -- opendaylight/md-sal/pom.xml | 72 ++++------- .../test/sal/binding/it/AbstractTest.java | 4 + .../src/test/resources/logback.xml | 0 .../sample/toaster/it/ToasterTest.java | 4 + .../src/test/resources/logback.xml | 1 + .../netconf/config-netconf-connector/pom.xml | 4 + opendaylight/netconf/netconf-impl/pom.xml | 4 + opendaylight/netconf/netconf-it/pom.xml | 4 + .../statisticsmanager/implementation/pom.xml | 4 + .../switchmanager/implementation/pom.xml | 8 +- .../src/test/resources/logback.xml | 13 -- pom.xml | 1 + 23 files changed, 172 insertions(+), 203 deletions(-) create mode 100644 opendaylight/commons/logback_settings/pom.xml rename opendaylight/commons/{opendaylight => logback_settings/src/main/resources}/logback.xml (100%) delete mode 100644 opendaylight/commons/parent/logback.xml delete mode 100644 opendaylight/commons/parent/space_and_tabs_checks.xml delete mode 100644 opendaylight/hosttracker/implementation/src/test/resources/logback.xml delete mode 100644 opendaylight/hosttracker_new/implementation/src/test/resources/logback.xml rename opendaylight/{statisticsmanager/implementation => md-sal/sal-binding-it}/src/test/resources/logback.xml (100%) rename opendaylight/{clustering/services_implementation => md-sal/samples/toaster-it}/src/test/resources/logback.xml (99%) delete mode 100644 opendaylight/switchmanager/implementation/src/test/resources/logback.xml diff --git a/opendaylight/clustering/services_implementation/pom.xml b/opendaylight/clustering/services_implementation/pom.xml index e4bdc218db..ab75eb8dd1 100644 --- a/opendaylight/clustering/services_implementation/pom.xml +++ b/opendaylight/clustering/services_implementation/pom.xml @@ -157,5 +157,9 @@ junit junit + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/commons/logback_settings/pom.xml b/opendaylight/commons/logback_settings/pom.xml new file mode 100644 index 0000000000..c1ce36edae --- /dev/null +++ b/opendaylight/commons/logback_settings/pom.xml @@ -0,0 +1,17 @@ + + 4.0.0 + commons.logback_settings + 0.0.1-SNAPSHOT + + scm:git:ssh://git.opendaylight.org:29418/controller.git + scm:git:ssh://git.opendaylight.org:29418/controller.git + https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main + HEAD + + + org.opendaylight.controller + commons.parent + 1.0.1-SNAPSHOT + ../parent + + diff --git a/opendaylight/commons/opendaylight/logback.xml b/opendaylight/commons/logback_settings/src/main/resources/logback.xml similarity index 100% rename from opendaylight/commons/opendaylight/logback.xml rename to opendaylight/commons/logback_settings/src/main/resources/logback.xml diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index f86a0b7e78..2a818067ce 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -743,6 +743,12 @@ jolokia-osgi ${jolokia.version} + + org.opendaylight.controller + commons.logback_settings + 0.0.1-SNAPSHOT + test + @@ -945,37 +951,6 @@ - - org.codehaus.mojo - properties-maven-plugin - ${propertymavenplugin.version} - - - - set-system-properties - - - - - logback.configurationFile - ${project.parent.basedir}/logback.xml - - - - - - - - com.googlecode.maven-java-formatter-plugin - maven-java-formatter-plugin - 0.3.1 - - 1.6 - 1.6 - 1.6 - ${project.parent.basedir}/sun_coding_style.xml - - org.apache.maven.plugins maven-checkstyle-plugin @@ -1011,6 +986,12 @@ ${failsafe.version} ${testvm.argLine} + + + logback.configurationFile + logback.xml + + @@ -1033,6 +1014,14 @@ org.apache.maven.plugins maven-surefire-plugin ${surefire.version} + + + + logback.configurationFile + logback.xml + + + org.apache.maven.plugins @@ -1181,6 +1170,13 @@ + + + org.opendaylight.controller + commons.logback_settings + 0.0.1-SNAPSHOT + + org.apache.maven.plugins diff --git a/opendaylight/commons/parent/logback.xml b/opendaylight/commons/parent/logback.xml deleted file mode 100644 index 05e607573e..0000000000 --- a/opendaylight/commons/parent/logback.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - %date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n - - - - - - - diff --git a/opendaylight/commons/parent/space_and_tabs_checks.xml b/opendaylight/commons/parent/space_and_tabs_checks.xml deleted file mode 100644 index 49a5802444..0000000000 --- a/opendaylight/commons/parent/space_and_tabs_checks.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/opendaylight/distribution/opendaylight/pom.xml b/opendaylight/distribution/opendaylight/pom.xml index 1ebab9b03a..9120c840d8 100644 --- a/opendaylight/distribution/opendaylight/pom.xml +++ b/opendaylight/distribution/opendaylight/pom.xml @@ -358,6 +358,67 @@ + + integrationtests + + false + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy + package + + copy + + + + + + + org.opendaylight.controller + sanitytest + ${controller.version} + jar + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + sanity-test + package + + exec + + + + + ${java.home}/bin/java + + -cp + ./target/dependency/* + org.opendaylight.controller.distribution.Sanity + + + + ${java.home} + + + + + + + distribution.opendaylight @@ -1233,59 +1294,6 @@ - - - org.apache.maven.plugins - maven-dependency-plugin - 2.8 - - - copy - package - - copy - - - - - - - org.opendaylight.controller - sanitytest - ${controller.version} - jar - - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - sanity-test - package - - exec - - - - - ${java.home}/bin/java - - -cp - ./target/dependency/* - org.opendaylight.controller.distribution.Sanity - - - - ${java.home} - - - - diff --git a/opendaylight/hosttracker/implementation/pom.xml b/opendaylight/hosttracker/implementation/pom.xml index 241f926ae4..6faf2e9178 100644 --- a/opendaylight/hosttracker/implementation/pom.xml +++ b/opendaylight/hosttracker/implementation/pom.xml @@ -145,5 +145,9 @@ junit junit + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/hosttracker/implementation/src/test/resources/logback.xml b/opendaylight/hosttracker/implementation/src/test/resources/logback.xml deleted file mode 100644 index 5fa21fecfc..0000000000 --- a/opendaylight/hosttracker/implementation/src/test/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - diff --git a/opendaylight/hosttracker_new/implementation/pom.xml b/opendaylight/hosttracker_new/implementation/pom.xml index 99760a6834..0405d45b6e 100644 --- a/opendaylight/hosttracker_new/implementation/pom.xml +++ b/opendaylight/hosttracker_new/implementation/pom.xml @@ -126,5 +126,9 @@ junit junit + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/hosttracker_new/implementation/src/test/resources/logback.xml b/opendaylight/hosttracker_new/implementation/src/test/resources/logback.xml deleted file mode 100644 index 5fa21fecfc..0000000000 --- a/opendaylight/hosttracker_new/implementation/src/test/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index fd89da4dd0..1ff7f2dc30 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -49,7 +49,6 @@ compatibility sal-zeromq-connector - test @@ -62,6 +61,7 @@ sal-binding-it clustered-data-store/integrationtest + test @@ -248,34 +248,6 @@ - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.jacoco - jacoco-maven-plugin - [0.0,) - - prepare-agent - pre-test - post-test - - - - - - - - - - org.apache.maven.plugins maven-release-plugin @@ -346,40 +318,42 @@ - - org.opendaylight.yangtools - - - yang-maven-plugin - - - [0.5,) - + org.opendaylight.yangtools + yang-maven-plugin + [0,) + + generate-sources + + + + + + + + + net.alchim31.maven + scala-maven-plugin + [0,) - - generate-sources - + compile + testCompile - + org.jacoco - - jacoco-maven-plugin - - - [0.5.3.201107060350,) - + jacoco-maven-plugin + [0,) prepare-agent - + diff --git a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java index 4057d9d1bc..41b1e310a0 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java +++ b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java @@ -11,6 +11,7 @@ import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.options.DefaultCompositeOption; +import org.ops4j.pax.exam.util.PathUtils; import org.osgi.framework.BundleContext; @RunWith(PaxExam.class) @@ -48,6 +49,9 @@ public abstract class AbstractTest { public Option[] config() { return options(systemProperty("osgi.console").value("2401"), mavenBundle("org.slf4j", "slf4j-api") .versionAsInProject(), // + systemProperty("logback.configurationFile").value( + "file:" + PathUtils.getBaseDir() + + "/src/test/resources/logback.xml"), mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), // diff --git a/opendaylight/statisticsmanager/implementation/src/test/resources/logback.xml b/opendaylight/md-sal/sal-binding-it/src/test/resources/logback.xml similarity index 100% rename from opendaylight/statisticsmanager/implementation/src/test/resources/logback.xml rename to opendaylight/md-sal/sal-binding-it/src/test/resources/logback.xml diff --git a/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java b/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java index 7cd4fa52c6..02d8231edf 100644 --- a/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java +++ b/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java @@ -17,6 +17,7 @@ import static org.ops4j.pax.exam.CoreOptions.junitBundles; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.systemProperty; +import org.ops4j.pax.exam.util.PathUtils; @RunWith(PaxExam.class) public class ToasterTest { @@ -46,6 +47,9 @@ public class ToasterTest { @Configuration public Option[] config() { return options(systemProperty("osgi.console").value("2401"), + systemProperty("logback.configurationFile").value( + "file:" + PathUtils.getBaseDir() + + "/src/test/resources/logback.xml"), mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(), // mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), // diff --git a/opendaylight/clustering/services_implementation/src/test/resources/logback.xml b/opendaylight/md-sal/samples/toaster-it/src/test/resources/logback.xml similarity index 99% rename from opendaylight/clustering/services_implementation/src/test/resources/logback.xml rename to opendaylight/md-sal/samples/toaster-it/src/test/resources/logback.xml index 6d9dfda9a3..2d63ce5744 100644 --- a/opendaylight/clustering/services_implementation/src/test/resources/logback.xml +++ b/opendaylight/md-sal/samples/toaster-it/src/test/resources/logback.xml @@ -1,4 +1,5 @@ + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n diff --git a/opendaylight/netconf/config-netconf-connector/pom.xml b/opendaylight/netconf/config-netconf-connector/pom.xml index 74c08e379f..d855f15541 100755 --- a/opendaylight/netconf/config-netconf-connector/pom.xml +++ b/opendaylight/netconf/config-netconf-connector/pom.xml @@ -93,6 +93,10 @@ ${bgpcep.version} test + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/netconf/netconf-impl/pom.xml b/opendaylight/netconf/netconf-impl/pom.xml index 028e9b4bd4..33fa675a92 100644 --- a/opendaylight/netconf/netconf-impl/pom.xml +++ b/opendaylight/netconf/netconf-impl/pom.xml @@ -88,6 +88,10 @@ netconf-client test + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/netconf/netconf-it/pom.xml b/opendaylight/netconf/netconf-it/pom.xml index 8606421ab9..13b0a1e570 100644 --- a/opendaylight/netconf/netconf-it/pom.xml +++ b/opendaylight/netconf/netconf-it/pom.xml @@ -111,6 +111,10 @@ mockito-configuration test + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/statisticsmanager/implementation/pom.xml b/opendaylight/statisticsmanager/implementation/pom.xml index 7281b9a71f..54ba4865b2 100644 --- a/opendaylight/statisticsmanager/implementation/pom.xml +++ b/opendaylight/statisticsmanager/implementation/pom.xml @@ -126,5 +126,9 @@ junit junit + + org.opendaylight.controller + commons.logback_settings + diff --git a/opendaylight/switchmanager/implementation/pom.xml b/opendaylight/switchmanager/implementation/pom.xml index 1a787c7dc1..1e78ec7a3d 100644 --- a/opendaylight/switchmanager/implementation/pom.xml +++ b/opendaylight/switchmanager/implementation/pom.xml @@ -124,8 +124,12 @@ junit - equinoxSDK381 - org.apache.felix.gogo.runtime + equinoxSDK381 + org.apache.felix.gogo.runtime + + + org.opendaylight.controller + commons.logback_settings diff --git a/opendaylight/switchmanager/implementation/src/test/resources/logback.xml b/opendaylight/switchmanager/implementation/src/test/resources/logback.xml deleted file mode 100644 index 5fa21fecfc..0000000000 --- a/opendaylight/switchmanager/implementation/src/test/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - diff --git a/pom.xml b/pom.xml index b95cdfd62a..c603a9446e 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,7 @@ opendaylight/commons/checkstyle opendaylight/commons/opendaylight opendaylight/commons/parent + opendaylight/commons/logback_settings -- 2.36.6