taglib:tldgenerate

Generates tld files from directories of jsp 2.0 tag files.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: generate-resources

Required Parameters

Name Type Description
outputDir File Output dir for tld files.
version String Version added to tld files, defaults to project version.

Optional Parameters

Name Type Description
tagDir File Directory containing tag files. Subdirectories are also processed.
taglibs List Detailed configuration for taglibs for tld generation. Starting with version 2.4 you can configure multiple taglibs with this attribute, and for each taglib you can add both tagfiles dir than classes with EL functions (note that EL function support is preliminary, the resulting tld does not include anything in the "description" attribute (that would require parsing javadocs from sources.
<taglibs>
<taglib>
<description>A test tld that contains functions</description>
<shortName>test</shortName>
<uri>testuri</uri>
<outputname>testtaglib</outputname>
<functionClasses>
<functionClass>org.apache.commons.lang.StringUtils</functionClass>
</functionClasses>
<tagdir>src/tagfiles</tagdir>
</taglib>
</taglibs>

Parameter Details

outputDir

Output dir for tld files.

  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.outputDirectory}/META-INF

tagDir

Directory containing tag files. Subdirectories are also processed.

  • Type: java.io.File
  • Required: No
  • Expression: src/main/resources/META-INF/tags/

taglibs

Detailed configuration for taglibs for tld generation. Starting with version 2.4 you can configure multiple taglibs with this attribute, and for each taglib you can add both tagfiles dir than classes with EL functions (note that EL function support is preliminary, the resulting tld does not include anything in the "description" attribute (that would require parsing javadocs from sources.

<taglibs>
<taglib>
<description>A test tld that contains functions</description>
<shortName>test</shortName>
<uri>testuri</uri>
<outputname>testtaglib</outputname>
<functionClasses>
<functionClass>org.apache.commons.lang.StringUtils</functionClass>
</functionClasses>
<tagdir>src/tagfiles</tagdir>
</taglib>
</taglibs>

  • Type: java.util.List
  • Required: No

version

Version added to tld files, defaults to project version.

  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.version}