entando/entando-archetype-portal-generic — Issue #9: custom TLDs not found in classpath by jetty
Author: entando
Created: 2012-02-22 21:39:00+00:00
State: open

Jetty (jetty:run) seems unable to find custom TLDs added to a project in the canonical src/main/tld ===> target/classes/META-INF paths.

BTW, it seems able to find them if placed in src/main/webapp/WEB-INF

The first and suggested workaround is to always prefer building your custom features in the form of a plugin.

During the development of a project, under certain circumstances, another effective workaround could come from adding in the pom.xml the following snippet to the maven-resources-plugin:

copy-resources-tld

validate

copy-resources

src/main/webapp/WEB-INF
UTF-8

src/main/tld

**/*.tld

false

and the following plugin configuration as well, to ensure that the workaround is excluded when the WAR is being packaged:

org.apache.maven.plugins
maven-war-plugin
2.1.1

WEB-INF/**.tld

This second workaround needs some testing (on tomcat, for example) before being included in the archetype for a stable release.