Package org.tentackle.maven.plugin.jlink
Interface TemplateModelFactory
-
- All Known Implementing Classes:
DefaultTemplateModelFactory
public interface TemplateModelFactoryFactory for the freemarker template model.May be replaced via @
Serviceannotation from within an application-specific plugin dependency. For example, to add template variables from other sources.Example:
@Service(TemplateModelFactory.class) public class SpecialTemplateModelFactory implements TemplateModelFactory { @Override public TemplateModel create(AbstractJlinkMojo mojo, JlinkResolver.Result result) throws MojoExecutionException { ... } }Add as plugin dependency:<plugin> <groupId>org.tentackle</groupId> <artifactId>tentackle-jlink-maven-plugin</artifactId> <dependencies> <dependency> <groupId>com.example</groupId> <artifactId>special-creator</artifactId> <version>1.0</version> </dependency> </dependencies> <configuration> ... </configuration> </plugin>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description org.tentackle.maven.TemplateModelcreate(AbstractJLinkMojo mojo, JLinkResolver.Result result)Creates the template model.static TemplateModelFactorygetInstance()The singleton.
-
-
-
Method Detail
-
getInstance
static TemplateModelFactory getInstance()
The singleton.- Returns:
- the singleton
-
create
org.tentackle.maven.TemplateModel create(AbstractJLinkMojo mojo, JLinkResolver.Result result) throws org.apache.maven.plugin.MojoExecutionException
Creates the template model.- Parameters:
mojo- the mojoresult- the resolver result- Returns:
- the model
- Throws:
org.apache.maven.plugin.MojoExecutionException- if model creation failed
-
-