Author: gk Date: Tue May 21 13:12:32 2019 New Revision: 1859639 URL: http://svn.apache.org/viewvc?rev=1859639&view=rev Log: Generator - update to velocity 2.0 - fix junit 5 - remove log4j.properties Templates - use native eol in sql resources Site - Update info
Removed: db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j.properties Modified: db/torque/torque4/trunk/torque-generator/pom.xml db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging-debugging.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/codegen/gettingStarted.xml db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-ext-schema-create.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-ext-schema-idtable-init.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-extext-schema-create.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-extext-schema-idtable-init.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-create.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-derby.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-hsqldb.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-idtable-init.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-mssql.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-mysql.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-oracle.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-postgresql.sql (props changed) db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql (props changed) Modified: db/torque/torque4/trunk/torque-generator/pom.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/pom.xml?rev=1859639&r1=1859638&r2=1859639&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/pom.xml (original) +++ db/torque/torque4/trunk/torque-generator/pom.xml Tue May 21 13:12:32 2019 @@ -38,6 +38,7 @@ </scm> <dependencies> + <!-- used in org.apache.torque.generator.merge.ThreeWayMerger --> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> @@ -80,13 +81,10 @@ </dependency> <dependency> <groupId>org.apache.velocity</groupId> - <artifactId>velocity</artifactId> - <version>1.7</version> - <!--groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> - <version>2.0</version--> + <version>2.0</version> </dependency> - <!-- 2.5.6: https://nvd.nist.gov/vuln/detail/CVE-2016-6497 -< Groovy LDAP API + <!-- 2.5.6: https://nvd.nist.gov/vuln/detail/CVE-2016-6497 Groovy LDAP API upgrading to at least 2.4.8 due to CVE-2015-3253 and http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6814 --> <dependency> <groupId>org.codehaus.groovy</groupId> Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java?rev=1859639&r1=1859638&r2=1859639&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/template/velocity/VelocityOutlet.java Tue May 21 13:12:32 2019 @@ -44,7 +44,6 @@ import org.apache.velocity.VelocityConte import org.apache.velocity.app.Velocity; import org.apache.velocity.context.Context; import org.apache.velocity.runtime.RuntimeConstants; -import org.apache.velocity.runtime.log.Log4JLogChute; import org.apache.velocity.util.StringUtils; /** @@ -216,29 +215,27 @@ public class VelocityOutlet extends Temp try { Properties properties = new Properties(); - properties.put( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, + /*properties.put( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, Log4JLogChute.class.getName()); // test - properties.put(RuntimeConstants.EVALUATE_CONTEXT_CLASS, "org.apache.velocity.VelocityContext"); -// properties.put( -// "runtime.conversion.handler", -// "none"); -// properties.put( -// RuntimeConstants.SPACE_GOBBLING, -// "bc"); -// properties.put( -// RuntimeConstants.CHECK_EMPTY_OBJECTS, -// "false"); + properties.put(RuntimeConstants.EVALUATE_CONTEXT_CLASS, "org.apache.velocity.VelocityContext");*/ /* - * may add props - * * runtime.conversion.handler = none * space.gobbling = bc * directive.if.emptycheck = false * * cf. http://velocity.apache.org/engine/2.0/upgrading.html */ + properties.put( + "runtime.conversion.handler", + "none"); + properties.put( + RuntimeConstants.SPACE_GOBBLING, + "bc"); + properties.put( + RuntimeConstants.CHECK_EMPTY_OBJECTS, + "false"); Velocity.init(properties); } catch (Exception e) Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java?rev=1859639&r1=1859638&r2=1859639&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java Tue May 21 13:12:32 2019 @@ -1,5 +1,6 @@ package org.apache.torque.generator.template.velocity; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -19,22 +20,22 @@ package org.apache.torque.generator.temp * under the License. */ -import static org.junit.Assert.assertEquals; - +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + public class VelocityTemplateFilterTest { private VelocityTemplateFilter velocityTemplateFilter; - @Before + @BeforeEach public void setUp() { velocityTemplateFilter = new VelocityTemplateFilter(); Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging-debugging.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging-debugging.xml?rev=1859639&r1=1859638&r2=1859639&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging-debugging.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging-debugging.xml Tue May 21 13:12:32 2019 @@ -72,7 +72,7 @@ <p> In principle, one can also overwrite the logging behaviour by overwriting the logging configuration file in the class path. - (the file used is org.apache.torque.generator.log4j.properties). + (the file used is org.apache.torque.generator.log4j2.xml). There are several (typically hacky) ways to do this, depending on your execution environment; one of them is simply exchanging the logging configuration file in the generator jar you use @@ -128,8 +128,8 @@ <ul> <li> A log4j adapter which reads and sets the current loglevel - by reading and changing the level of log4j's root logger - (<code>org.apache.torque.generator.configuration.controller.Log4jLoggingAdapter</code>). + by reading and changing the level of log4j2's root logger + (<code>org.apache.torque.generator.configuration.controller.Log4j2LoggingAdapter</code>). </li> <li> A dummy adapter which implements the LoggingAdapter interface @@ -141,7 +141,7 @@ The adapter can be changed at runtime by calling the static method <code>setLoggingAdapter(LoggingAdapter)</code> of the class <code>org.apache.torque.generator.configuration.controller.Loglevel</code>. - By default, the <code>Log4jLoggingAdapter</code> is used. + By default, the <code>Log4j2LoggingAdapter</code> is used. </p> </section> </body> Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/codegen/gettingStarted.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/codegen/gettingStarted.xml?rev=1859639&r1=1859638&r2=1859639&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/codegen/gettingStarted.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/codegen/gettingStarted.xml Tue May 21 13:12:32 2019 @@ -436,15 +436,15 @@ $torqueGen.mergepoint("methods")## <section name="Generating the source"> <p> There are currently two ways to run the generation process: Either the - generation can be integrated into a Maven 2 build process, + generation can be integrated into a Maven 3 build process, or a simple java program can be used. </p> - <subsection name="Using the Torque Maven 2 plugin"> + <subsection name="Using the Torque Maven plugin"> <p> - To hook the generation process into your Maven 2 build, you need to - install Maven 2. - If you are new to Maven 2, read + To hook the generation process into your Maven build, you need to + install Maven. + If you are new to Maven, read <a href="http://maven.apache.org/run-maven/index.html">the Maven documentation</a>. Then, add the following section to your pom.xml: </p> Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-ext-schema-create.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-ext-schema-idtable-init.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-extext-schema-create.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-extext-schema-idtable-init.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-create.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-derby.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-hsqldb.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-idtable-init.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-mssql.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-mysql.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-oracle.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/expected-schema-postgresql.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native Propchange: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style Tue May 21 13:12:32 2019 @@ -1 +1 @@ -LF +native --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org