Skip to content

Releases: casid/jte

1.11.3

22 Aug 14:45
Compare
Choose a tag to compare
  • #112 fix compilation with nested Kotlin string templates

1.11.2

13 Aug 13:38
Compare
Choose a tag to compare
  • #92 DirectoryCodeResolver follows symlinks
  • #105 Show calling template and line number in compile error for non-existing tag parameters
  • #95 Add debug template line information for parameters used in renderMap()
  • #94 Provide better exception message if template engine is initialized with ContentType.Plain instead of ContentType.Html
  • #93 jte-kotlin: bump Kotlin version to 1.5.20
  • #111 Resolve conflict with alpine.js syntax in OWASP policy, improve the quality of PreventOutputInTagsAndAttributes error messages
  • Ensure instanceof pattern matching works with Java 14+
  • gradle-plugin: Bump gradle version to 7.1.1 for Java 16 support

jsp-converter

  • #96 Fix import of array types in converted JSP tags
  • #96 Fix import of generic types in converted JSP tags
  • #101 Fix conversion of string concatenation in JSP EL expression
  • #102 Support conversion of JSP files containing AstListData
  • #103 JSP bridging tags with body are closed correctly when replacing usages after conversion
  • #106 String AST nodes stay properly escaped when converting JSP to jte
  • #108 Improve JSP comment and control expression collapse during conversion
  • #104 Parameters of converted JSP tags are put on seperate lines

1.11.1

06 Jul 20:58
Compare
Choose a tag to compare
  • #86 Ensure UTF-8 encoding is used for compiling Java templates
  • #87 Maven Plugin: Add property keepGeneratedSourceFiles to CompilerMojo (defaults to false)
  • #89 Maven Plugin: Pass maven-compiler-plugin specified Java version to jte compiler

1.11.0

17 Jun 18:13
Compare
Choose a tag to compare
  • Stacktraces of TemplateException are rewritten, so that in case of rendering errors all template line numbers are provided
  • Boolean attributes are passed to HtmlInterceptor
  • #78 up-to-date check now works with classpath, fixes Gradle plugin getting stuck on gradle clean

1.10.0

08 May 08:32
Compare
Choose a tag to compare

Features

Fixes

  • #77 Prevent Kotlin compiler to leak file handles
  • #75 Better generics handling in Kotlin templates
  • #80 Improvements for trimControlStructures

1.9.0

12 Mar 10:03
Compare
Choose a tag to compare
  • #67 DirectoryCodeResolver no longer does file watching. This removes a problematic com.sun.nio dependency and was likely not used by 99% of jte users. In case you need the file watching on your project, please add the jte-watcher dependency as described here.
  • #61 You may now configure the class path used by the compiler via TemplateEngine::setClassPath
  • #65 modification times are only stored for existing files in DirectoryCodeResolver
  • Empty values for localization keys now result in null Content, since it makes no sense to render them.
  • #68 fixed Gradle path setup in examples

1.8.0

28 Feb 17:04
Compare
Choose a tag to compare

This release adds the optional jte-kotlin module.

It can compile .kte template files, which use Kotlin instead of Java as expression language. See #57 for more background information.

This is how the example.jte file from the front page looks like as example.kte:

@import org.example.Page

@param page:Page

<head>
    @if(page.description != null)
        <meta name="description" content="${page.description}">
    @endif
    <title>${page.title}</title>
</head>
<body>
    <h1>${page.title}</h1>
    <p>Welcome to my example page!</p>
</body>

To compile templates with Kotlin as expression language, you need to add the jte-kotlin module to your project:

<dependency>
    <groupId>gg.jte</groupId>
    <artifactId>jte-kotlin</artifactId>
    <version>1.8.0</version>
</dependency>

Since 1.8.0 both Maven and Gradle plugins can precompile jte and kte files. You can seamlessly call jte templates from kte templates and vice versa. This might be handy if you'd like to migrate the expression language of existing jte templates from Java to Kotlin.

The IntelliJ plugin is pretty far already to support kte files (https://github.com/casid/jte-intellij/tree/kotlin-support). There's still one issue with unresolved backwards references. If anyone has an idea why this doesn't work with Kotlin injections (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008349720-Kotlin-references-in-MultiHostInjector-are-not-working-correctly), I'm very happy about any hint :-) Regardless there's gonna be a first beta release of the IntelliJ plugin with Kotlin support next week!

Other bugfixes and improvements:

  • #63 package name of template classes can be specified
  • #63 better hot reload experience with generated template sources
  • #60 Gradle plugin no longer includes source sets which caused problems on some builds
  • #52 Fix hasTemplate method with DirectoryCodeResolver

1.7.0

19 Feb 17:16
Compare
Choose a tag to compare
  • Binary templates for maximum rendering throughput
  • Gradle Plugin to precompile/generate templates (thanks @iRebbok for contributing!)
  • #52 Add hasTemplate method to TemplateEngine
  • #51 generate/precompile returns list of generated/precompiled java files.

1.6.0

10 Feb 20:02
Compare
Choose a tag to compare
  • Support for Java 8

1.5.2

09 Feb 04:30
Compare
Choose a tag to compare
  • #50 fix parsing of attributes without parameters
  • Add automatic module names
  • Use latest version of org.owasp.encoder (1.2.3)