Assoba template engine parent pom


Лицензия

Лицензия

Группа

Группа

fr.assoba.open
Идентификатор

Идентификатор

template-parent
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

Assoba template engine parent pom
Assoba template engine parent pom
Ссылка на сайт

Ссылка на сайт

https://github.com/neuneu2k/assoba-template
Система контроля версий

Система контроля версий

https://github.com/neuneu2k/assoba-template

Скачать template-parent

Имя Файла Размер
template-parent-1.0.pom 4 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/fr.assoba.open/template-parent/ -->
<dependency>
    <groupId>fr.assoba.open</groupId>
    <artifactId>template-parent</artifactId>
    <version>1.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/fr.assoba.open/template-parent/
implementation 'fr.assoba.open:template-parent:1.0'
// https://jarcasting.com/artifacts/fr.assoba.open/template-parent/
implementation ("fr.assoba.open:template-parent:1.0")
'fr.assoba.open:template-parent:pom:1.0'
<dependency org="fr.assoba.open" name="template-parent" rev="1.0">
  <artifact name="template-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='fr.assoba.open', module='template-parent', version='1.0')
)
libraryDependencies += "fr.assoba.open" % "template-parent" % "1.0"
[fr.assoba.open/template-parent "1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • assoba-template-api
  • template-maven-plugin
  • template-test

assoba-template

Introduction

Just another fork of the play2 template library, aka twirl

Why the play2 template system instead of Scalate

One word: IDE's, both eclipse and IDEA support the play2 template syntax and provide static typing helpers.

While HAML derived languages are great for HTML templating, they are not designed for generic text templating, wich means that the only Scalate competitor is SSP. The Play2 syntax is both more simple (to write, not to parse :D) and more typesafe than the SSP one.

Why fork ?

Both Play2 and Twirl are designed to be used from SBT, bringing the sbt dependency on scala 2.9.x, for scala 2.10 developpements, this means quite a lot of cruft in the maven plugin.

This fork also includes some design choices on template name detection and template "format" detection that are more germane to generic templating and not only HTML templating.

How to use it ?

Include the following tiny runtime dependency in the project that will use templates.

<dependency>
        <groupId>fr.assoba.open</groupId>
        <artifactId>assoba-template-api</artifactId>
        <version>1.0</version>
</dependency>

Add the following plugin to the build>plugins section in your pom

<plugin>
    <groupId>fr.assoba.open</groupId>
    <artifactId>template-maven-plugin</artifactId>
    <version>1.0</version>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Put your templates beside your scala code in src/main/scala,

templates should be named [CLASSNAME].stl for generic templates and [CLASSNAME].html.stl for html templates (with play2 escaping rules)

Template syntax documented in the play2 documentation

Both m2eclipse and IDEA should detect the generated-sources automatically

Credits

All credits are to go to the Play developers who devised the template language and provided its implementation!

Версии библиотеки

Версия
1.0