Uploaded image for project: 'Apache Tomcat Maven Plugin'
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-302

Tomcat 8: Invalid resource paths added when scanning for TLDs

    XMLWordPrintableJSON

Details

    • Dependency upgrade
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.0
    • None
    • None

    Description

      Tomcat 8 now requires that all resource paths begin with "/".

      However, in org.apache.tomcat.maven.plugin.tomcat8.run.RunMojo, there is an anonymous class extending org.apache.tomcat.maven.plugin.tomcat8.run.AbstractRunMojo.MyDirContext.

      This overrides the method listWebAppPaths and the implementation will return file names, which do not begin with "/".

      This will result in an error if you place a tld file in your WEB-INF directory. Doing this will cause listWebAppPaths to return your tld file, which then causes an error as the path is not valid.

      One solution would be to alter this method so it appended the path relative to the classpath, to each file. This seems to be how the equivalent method in org.apache.catalina.webresources.DirResourceSet works.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            rupert@madden-abbott.com Rupert Madden-Abbott
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: