Maven & Ant

From Smooks

Jump to: navigation, search

Contents

Requirements

All Smooks components are available from the maven2 repository on ibiblio.


If your building Smooks from source using Maven, please use:


Any version of Ant can be used :)


Artifact IDs

The groupId for all Smooks components is "org.milyn".

The artifactId for each of the Smooks components are as follows:

  • Smooks Core: "milyn-smooks-core"
  • Smooks Cartridges:
    • Calc: "milyn-smooks-calc"
    • CSV: "milyn-smooks-csv"
    • Fixed length reader: "milyn-smooks-fixed-length" (version 1.3 or higher)
    • EDI: "milyn-smooks-edi"
    • Javabean: "milyn-smooks-javabean"
    • JSON: "milyn-smooks-json"
    • YAML: "milyn-smooks-yaml" (version 1.4 or higher)
    • Routing: "milyn-smooks-routing"
    • Templating: "milyn-smooks-templating"
    • CSS: "milyn-smooks-css"
    • Servlet: "milyn-smooks-servlet"
    • Persistence: "milyn-smooks-persistence"
    • Validation: "milyn-smooks-validation"
  • Commons: "milyn-commons" (all components depend on Commons, so no need to specify a dependency on this module if you are already dependent on one of the others)
  • EdiSax: "milyn-edisax"
  • Magger: "milyn-magger"
  • Tinak: "milyn-tinak
  • Scribe core: "milyn-scribe-core"
  • Scribe adapters:
    • Hibernate: "milyn-scribe-hibernate"
    • Ibatis: "milyn-scribe-ibatis"
    • JPA: "milyn-scribe-jpa"


Note: All cartridges depend on Smooks Core (i.e. "milyn-smooks-core"). Therefore, if your project depends on one of the cartridges, there's no need to specify the dependency on Smooks Core.

<dependency>
<groupId>org.milyn</groupId>
<artifactId>milyn-smooks-javabean</artifactId>
<version>1.3.1</version>
</dependency>

See the POMs in the Examples as examples of Maven based applications that depend on different Smooks Cartridges.

Getting SNAPSHOTs

Smooks SNAPSHOTs are available from "http://snapshots.repository.codehaus.org".

  • Maven: If you're using Maven, please list the Codehaus SNAPSHOT repository address (below) in your project POM.
  • Ant: If you're using Ant, please see the following section.
<repositories>
.....
<repository>
<id>codehaus.m2.snapshots</id>
<url>http://snapshots.repository.codehaus.org</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>

Ant

If you're using Ant in your project, you can pull the Smooks binaries from the Maven repository using the "getsmooks-build.xml" Ant script:

  1. Make sure Ant is installed and your environment properly configured.
  2. Download getsmooks-build.xml to a local directory.
  3. Check the "smooks.version" script property and make sure it is set to the appropriate version (e.g. "1.3").
  4. In the download directory, run "ant -f getsmooks-build.xml".

The jar files will be dropped in the "./smooks-<timestamp>" folder, from where you can easily copy them to the appropriate location.