Smooks v2.0.0-M2 Release Notes

Release Date: 2020-11-25 // over 3 years ago
  • 🚀 Release Notes

    🆕 New Features

    SAX NG filter (experimental):

    • Supersedes the SAX and DOM filters
    • Brings with it a new visitor API which unifies the SAX and DOM visitor APIs
    • Cartridges migrated to SAX NG
    • Supports XSLT and StringTemplate resources unlike the legacy SAX filter

    - Easily extensible with interceptors

    Visitor mementos: a convenient way for stashing and un-stashing a visitor's state during its execution lifecycle.

    🆕 New Smooks XSD schema (xmlns="https://www.smooks.org/xsd/smooks-2.0.xsd"):

    • Uniform XML namespace declarations
    • Dropped default-selector-namespace and selector-namespace XML attributes in favour of declaring namespaces within the standard xmlns attribute from the smooks-resource-list element

    - Removed default-selector attribute from smooks-resource-list element: selectors need to be set explicitly

    org.smooks.container.ExecutionContext#getWriter(): a new method for writing to an output stream in an abstract way regardless of which filter is active.

    Miscellaneous Changes

    • ⚡️ Updated dependencies:
      • commons-net:commons-net to version 3.7.2
      • org.mvel:mvel2 to version 2.4.10.Final
      • com.thoughtworks.xstream:xstream to version 1.4.14

    💥 Breaking Changes

    ⬇️ Dropped Smooks-specific annotations in favour of JSR annotations:

    • Farewell @ConfigParam, @Config, @AppContext, and @StreamResultWriter. Welcome @Inject

    - Farewell @Initialize and @Uninitialize. Welcome @PostConstruct and @PreDestroy

    ⬇️ Dropped org.smooks.container.ExecutionContext#isDefaultSerializationOn() method: replace with org.smooks.delivery.ContentDeliveryConfig#isDefaultSerializationOn().

    📇 Renamed org.smooks.container.ExecutionContext#getContext() to org.smooks.container.ExecutionContext#getApplicationContext().

    📇 Renamed classes:

    • org.smooks.cdr.SmooksResourceConfiguration to org.smooks.cdr.ResourceConfig
      • Renamed getSelectorSteps() to getSelectorPath(): a org.smooks.cdr.xpath.SelectorPath is returned instead of a String array
      • Moved getSelector() to org.smooks.cdr.xpath.SelectorPath
    • org.smooks.cdr.SmooksResourceConfigurationList to org.smooks.cdr.ResourceConfigList
    • org.smooks.delivery.dom.serialize.SerializationUnit to org.smooks.delivery.dom.serialize.DOMSerializerVisitor

    You can follow the examples for reference to migrate your application.

    Binaries

    Apache Maven

    \<dependency\> \<groupId\>org.smooks\</groupId\> \<artifactId\>smooks-core\</artifactId\> \<version\>2.0.0-M2\</version\> \</dependency\>
    

Previous changes from v2.0.0-M1

  • 🆕 New Features

    • 🚀 Independent release cycles for all cartridges and one Maven BOM (bill of materials) to track them all
    • License change:
    • ⚡️ Numerous dependency updates
    • Maven coordinates change:
      • We are now publishing Smooks artifacts under Maven group IDs prefixed with "org.smooks".

    🛠 Fixed issues

    • 📚 #87: Documentation - URL's pointing wrong
    • #98: What happened to segref?
    • 👍 #108: Is there repetition separator support
    • #123: FreeMarker dependency outdated
    • 📜 #126: EDI parsing does not handle segment groups with an optional first segments
    • 📜 #127: EDI parser does not support fields with cardinality larger than 1
    • #128: milyn.org is dead
    • #135: SAX content handler that generates edifact messages
    • 🚚 #148: xml version removed from edimappingconfig.xml when using maven java plugin
    • #162 EJC generates v1.5 edimap file from v1.6
    • #255: the attr of minOccurs became "realOccurs" in the EDI mapping