CAY-2280 update upgrade.txt, replace commons-logging in docs and assembly files
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/ef5e5d84 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/ef5e5d84 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/ef5e5d84 Branch: refs/heads/master Commit: ef5e5d84f97db58badbac975ce7a3c617ed10dfe Parents: a35a460 Author: Maxim Petrusevich <maks1...@gmail.com> Authored: Thu Apr 13 11:04:31 2017 +0300 Committer: Maxim Petrusevich <maks1...@gmail.com> Committed: Thu Apr 13 11:04:31 2017 +0300 ---------------------------------------------------------------------- .../resources/assemblies/assembly-generic.xml | 2 +- .../main/resources/assemblies/assembly-mac.xml | 2 +- .../resources/assemblies/assembly-windows.xml | 2 +- build-tools/cayenne-test-utilities/pom.xml | 4 --- cayenne-ant/pom.xml | 5 ---- cayenne-client/pom.xml | 5 ---- .../apache/cayenne/remote/BaseConnection.java | 2 +- cayenne-dbcp2/pom.xml | 5 ++++ cayenne-dbsync/pom.xml | 5 ++++ cayenne-postcommit/pom.xml | 5 ++++ cayenne-server/pom.xml | 5 ++++ .../cayenne/log/CommonsJdbcEventLogger.java | 2 +- docs/doc/pom.xml | 5 ---- docs/doc/src/main/resources/UPGRADE.txt | 17 ++++++++++++ .../src/docbkx/customizing-cayenne-runtime.xml | 2 +- .../src/docbkx/including-cayenne-in-project.xml | 2 +- eventbridges/cayenne-jgroups/pom.xml | 5 ++++ eventbridges/cayenne-jms/pom.xml | 5 ++++ eventbridges/cayenne-xmpp/pom.xml | 5 ++++ maven-plugins/cayenne-maven-plugin/pom.xml | 5 ++++ modeler/cayenne-wocompat/pom.xml | 6 +++++ pom.xml | 27 -------------------- 22 files changed, 70 insertions(+), 53 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/assembly/src/main/resources/assemblies/assembly-generic.xml ---------------------------------------------------------------------- diff --git a/assembly/src/main/resources/assemblies/assembly-generic.xml b/assembly/src/main/resources/assemblies/assembly-generic.xml index 9417d84..f5342aa 100644 --- a/assembly/src/main/resources/assemblies/assembly-generic.xml +++ b/assembly/src/main/resources/assemblies/assembly-generic.xml @@ -102,7 +102,7 @@ <!-- Include only a minimal set of dependencies to run cayenne-server and ant tasks --> <includes> <include>commons-collections:commons-collections</include> - <include>commons-logging:commons-logging</include> + <include>slf4-api:slf4j-api</include> <include>commons-lang:commons-lang</include> <include>org.apache.velocity:velocity</include> <include>foundrylogic.vpp:vpp</include> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/assembly/src/main/resources/assemblies/assembly-mac.xml ---------------------------------------------------------------------- diff --git a/assembly/src/main/resources/assemblies/assembly-mac.xml b/assembly/src/main/resources/assemblies/assembly-mac.xml index 206aca2..361bea7 100644 --- a/assembly/src/main/resources/assemblies/assembly-mac.xml +++ b/assembly/src/main/resources/assemblies/assembly-mac.xml @@ -102,7 +102,7 @@ <!-- Include only a minimal set of dependencies to run cayenne-server and ant tasks --> <includes> <include>commons-collections:commons-collections</include> - <include>commons-logging:commons-logging</include> + <include>slf4j-api:slf4j-api</include> <include>commons-lang:commons-lang</include> <include>org.apache.velocity:velocity</include> <include>foundrylogic.vpp:vpp</include> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/assembly/src/main/resources/assemblies/assembly-windows.xml ---------------------------------------------------------------------- diff --git a/assembly/src/main/resources/assemblies/assembly-windows.xml b/assembly/src/main/resources/assemblies/assembly-windows.xml index d12b463..7d1d470 100644 --- a/assembly/src/main/resources/assemblies/assembly-windows.xml +++ b/assembly/src/main/resources/assemblies/assembly-windows.xml @@ -102,7 +102,7 @@ <!-- Include only a minimal set of dependencies to run cayenne-server and ant tasks --> <includes> <include>commons-collections:commons-collections</include> - <include>commons-logging:commons-logging</include> + <include>slf4j-api:slf-api</include> <include>commons-lang:commons-lang</include> <include>org.apache.velocity:velocity</include> <include>foundrylogic.vpp:vpp</include> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/build-tools/cayenne-test-utilities/pom.xml ---------------------------------------------------------------------- diff --git a/build-tools/cayenne-test-utilities/pom.xml b/build-tools/cayenne-test-utilities/pom.xml index baa98eb..8641e64 100644 --- a/build-tools/cayenne-test-utilities/pom.xml +++ b/build-tools/cayenne-test-utilities/pom.xml @@ -42,9 +42,5 @@ <artifactId>junit</artifactId> <scope>compile</scope> </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-ant/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-ant/pom.xml b/cayenne-ant/pom.xml index b6788d1..343f857 100644 --- a/cayenne-ant/pom.xml +++ b/cayenne-ant/pom.xml @@ -47,11 +47,6 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <scope>compile</scope> - </dependency> - <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> <scope>compile</scope> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-client/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-client/pom.xml b/cayenne-client/pom.xml index fbc2915..1fe9107 100644 --- a/cayenne-client/pom.xml +++ b/cayenne-client/pom.xml @@ -45,11 +45,6 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <scope>compile</scope> - </dependency> - <dependency> <groupId>com.caucho</groupId> <artifactId>hessian</artifactId> <scope>compile</scope> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-client/src/main/java/org/apache/cayenne/remote/BaseConnection.java ---------------------------------------------------------------------- diff --git a/cayenne-client/src/main/java/org/apache/cayenne/remote/BaseConnection.java b/cayenne-client/src/main/java/org/apache/cayenne/remote/BaseConnection.java index f8e3498..b26a5a7 100644 --- a/cayenne-client/src/main/java/org/apache/cayenne/remote/BaseConnection.java +++ b/cayenne-client/src/main/java/org/apache/cayenne/remote/BaseConnection.java @@ -25,7 +25,7 @@ import org.slf4j.LoggerFactory; /** * A common base class for concrete ClientConnection implementations. Provides message - * logging functionality via commons-logging. + * logging functionality via slf4j logging. * * @since 1.2 */ http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-dbcp2/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-dbcp2/pom.xml b/cayenne-dbcp2/pom.xml index 85855ee..7a5b031 100644 --- a/cayenne-dbcp2/pom.xml +++ b/cayenne-dbcp2/pom.xml @@ -51,6 +51,11 @@ <version>${project.version}</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build> <plugins> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-dbsync/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-dbsync/pom.xml b/cayenne-dbsync/pom.xml index 0838fa3..560a92d 100644 --- a/cayenne-dbsync/pom.xml +++ b/cayenne-dbsync/pom.xml @@ -75,6 +75,11 @@ <type>test-jar</type> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-postcommit/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/pom.xml b/cayenne-postcommit/pom.xml index 318a252..0dddd03 100644 --- a/cayenne-postcommit/pom.xml +++ b/cayenne-postcommit/pom.xml @@ -47,6 +47,11 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.apache.cayenne.build-tools</groupId> <artifactId>cayenne-test-utilities</artifactId> <version>${project.version}</version> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-server/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-server/pom.xml b/cayenne-server/pom.xml index 792f727..9d05911 100644 --- a/cayenne-server/pom.xml +++ b/cayenne-server/pom.xml @@ -119,6 +119,11 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>xmlunit</groupId> <artifactId>xmlunit</artifactId> <version>1.5</version> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/cayenne-server/src/main/java/org/apache/cayenne/log/CommonsJdbcEventLogger.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/log/CommonsJdbcEventLogger.java b/cayenne-server/src/main/java/org/apache/cayenne/log/CommonsJdbcEventLogger.java index 7c52bd5..17c5f4a 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/log/CommonsJdbcEventLogger.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/log/CommonsJdbcEventLogger.java @@ -38,7 +38,7 @@ import java.util.Iterator; import java.util.List; /** - * A {@link JdbcEventLogger} built on top of commons-logging. + * A {@link JdbcEventLogger} built on top of slf4j-api logger. * * @since 3.1 */ http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/docs/doc/pom.xml ---------------------------------------------------------------------- diff --git a/docs/doc/pom.xml b/docs/doc/pom.xml index 00e84d4..6235672 100644 --- a/docs/doc/pom.xml +++ b/docs/doc/pom.xml @@ -53,11 +53,6 @@ </dependency> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - - <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </dependency> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/docs/doc/src/main/resources/UPGRADE.txt ---------------------------------------------------------------------- diff --git a/docs/doc/src/main/resources/UPGRADE.txt b/docs/doc/src/main/resources/UPGRADE.txt index f3c538b..997285a 100644 --- a/docs/doc/src/main/resources/UPGRADE.txt +++ b/docs/doc/src/main/resources/UPGRADE.txt @@ -7,6 +7,23 @@ IMPORTANT: be sure to read all notes for the intermediate releases between your UPGRADING TO 4.0.M6 +* Per CAY-2280 org.apache.commons.logging.Log logger was replaced to org.slf4j.Logger logger. + + To change the logger to SLF4J need: + - Replace logger dependencies in pom.xml files from commons-logging to slf4j-api (if pom.xml contains slf4j-api + in test scope - replace test scope to compile scope); + - In classes that import org.apache.commons.logging.Log, replace org.apache.commons.logging.Log to + org.slf4j.Logger (and org.apache.commons.logging.LogFactory to org.slf4j.LoggerFactory if exist); + - Replace all fields type of Log to Logger (and LogFactory to LoggerFactory if exist, and methods call from + LogFactory.getLog(...) to LoggerFactory.getLogger(...) if exist); + - Change interface in custom loggers (MavenLogger, AntLogger, ModelerLogger(if exist)) from Log to Logger, and + override standart methods; + - Delete commons-logging.properties file. + + For go to a SLF4J without changing the source code need: + - Add to pom.xml files jcl-over-slf4j dependency; + - Exclude commons-logging dependencies from pom.xml. + * Per CAY-2278 The org.apache.cayenne.lifecycle.audit package (with the exception of AuditableChild annotation) and the org.apache.cayenne.lifecycle.changeset package where deprecated. Weighted graph sorter moved to cayenne-server into org.apache.cayenne.ashwood package. http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml ---------------------------------------------------------------------- diff --git a/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml b/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml index 0182e2c..a26629d 100644 --- a/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml +++ b/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml @@ -382,7 +382,7 @@ ServerRuntime runtime = ServerRuntime.builder() logging API for Cayenne internals. It provides facilities for logging queries, commits, transactions, etc. The default implementation is <code>org.apache.cayenne.log.CommonsJdbcEventLogger</code> that performs logging - via commons-logging library. Cayenne library includes another potentially useful + via slf4j-api library. Cayenne library includes another potentially useful logger - <code>org.apache.cayenne.log.FormattedCommonsJdbcEventLogger</code> that produces formatted multiline SQL output that can be easier to read.</para> </section> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml ---------------------------------------------------------------------- diff --git a/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml b/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml index 06ff0da..f811356 100644 --- a/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml +++ b/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml @@ -686,7 +686,7 @@ <include name="cayenne-server-*.jar" /> <include name="commons-collections-*.jar" /> <include name="commons-lang-*.jar" /> - <include name="commons-logging-*.jar" /> + <include name="slf4j-api-*.jar" /> <include name="velocity-*.jar" /> <include name="vpp-2.2.1.jar" /> </fileset> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/eventbridges/cayenne-jgroups/pom.xml ---------------------------------------------------------------------- diff --git a/eventbridges/cayenne-jgroups/pom.xml b/eventbridges/cayenne-jgroups/pom.xml index 8ba3fcb..e21ba03 100644 --- a/eventbridges/cayenne-jgroups/pom.xml +++ b/eventbridges/cayenne-jgroups/pom.xml @@ -39,6 +39,11 @@ <version>2.2.7</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/eventbridges/cayenne-jms/pom.xml ---------------------------------------------------------------------- diff --git a/eventbridges/cayenne-jms/pom.xml b/eventbridges/cayenne-jms/pom.xml index 7b275fa..84ce88a 100644 --- a/eventbridges/cayenne-jms/pom.xml +++ b/eventbridges/cayenne-jms/pom.xml @@ -39,6 +39,11 @@ <version>1.1</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/eventbridges/cayenne-xmpp/pom.xml ---------------------------------------------------------------------- diff --git a/eventbridges/cayenne-xmpp/pom.xml b/eventbridges/cayenne-xmpp/pom.xml index c78e981..574ea59 100644 --- a/eventbridges/cayenne-xmpp/pom.xml +++ b/eventbridges/cayenne-xmpp/pom.xml @@ -45,6 +45,11 @@ <version>2.2.1</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/maven-plugins/cayenne-maven-plugin/pom.xml ---------------------------------------------------------------------- diff --git a/maven-plugins/cayenne-maven-plugin/pom.xml b/maven-plugins/cayenne-maven-plugin/pom.xml index 1578431..0142946 100644 --- a/maven-plugins/cayenne-maven-plugin/pom.xml +++ b/maven-plugins/cayenne-maven-plugin/pom.xml @@ -95,6 +95,11 @@ </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + </dependency> + + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/modeler/cayenne-wocompat/pom.xml ---------------------------------------------------------------------- diff --git a/modeler/cayenne-wocompat/pom.xml b/modeler/cayenne-wocompat/pom.xml index b596244..c5473ce 100644 --- a/modeler/cayenne-wocompat/pom.xml +++ b/modeler/cayenne-wocompat/pom.xml @@ -42,6 +42,12 @@ </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> + + <dependency> <groupId>org.apache.cayenne</groupId> <artifactId>cayenne-server</artifactId> <version>${project.version}</version> http://git-wip-us.apache.org/repos/asf/cayenne/blob/ef5e5d84/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 4f542c9..0c8da83 100644 --- a/pom.xml +++ b/pom.xml @@ -309,33 +309,6 @@ </dependency> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.1</version> - <exclusions> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - <exclusion> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-dbcp2</artifactId> <version>2.1</version>