Maven Support

Contents

Why do Maven project names and other details show up in my pages?

Tapestry and maven both use the same syntax for dynamic portions of files: the ${...} syntax. When Maven is copying resources from src/main/resources, and when filtering is enabled (which is not the default), then any expansions in Tapestry templates that match against Maven project properties are substituted. If you look at the deployed application you'll see that ${name} is gone, replaced with your project's name!

The solution is to update your pom.xml and ignore any .tml files when copying and filtering:

pom.xml (partial)
  <resource>
    <directory>src/main/resources</directory>
    <excludes>
      <exclude>**/*.tml</exclude>
    </excludes>
    <filtering>true</filtering>
  </resource>

  <resource>
    <directory>src/main/resources</directory>
    <includes>
      <include>**/*.tml</include>
    </includes>
    <filtering>false</filtering>
  </resource>

  • No labels