Details

    • Type: Dependency upgrade Dependency upgrade
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 2.1, 2.2
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven 3.1, Tomcat8.0RC1, Oracle JDK7u25

      Description

      Please provide initial version of Tomcat8 Maven Plugin.

      I tried the recommendations in http://tomcat.10.x6.nabble.com/Tomcat-8-Tomcat-Maven-Plugin-2-2-Tomcat8-Maven-Plugin-td4995858.html#none

      but the guideline http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin/adjust-embedded-tomcat-version.html

      does not work for Tomcat8 .

      The problem is in changed Tomcat 8 API, the maven throws folloving exception:
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:142)
      ... 20 more
      by: java.lang.NoSuchMethodError: org.apache.catalina.startup.Tomcat.setDefaultRealm(Lorg/apache/catalina/Realm;)V
      at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:999)
      at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:514)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
      ... 20 more

      The method setDefaultRealm is deprecated in Tomcat7 and was removed in Tomcat8 as described in documentation:
      http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/Tomcat.html#setDefaultRealm(org.apache.catalina.Realm)

        Activity

        Hide
        Marek Jagielski added a comment -

        Hi,
        In which version do you think to treat this issue or how do you plan to solve it (a new branch?)?
        The solution would largely help to test and integrate a new jsr-356 websocket implementation.
        Marek

        Show
        Marek Jagielski added a comment - Hi, In which version do you think to treat this issue or how do you plan to solve it (a new branch?)? The solution would largely help to test and integrate a new jsr-356 websocket implementation. Marek
        Hide
        Konstantin Kolinko added a comment -

        The problem is in changed Tomcat 8 API, the maven throws folloving exception:
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:142)
        ... 20 more
        by: java.lang.NoSuchMethodError: org.apache.catalina.startup.Tomcat.setDefaultRealm(Lorg/apache/catalina/Realm;)V
        at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:999)
        at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:514)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        ... 20 more

        The method setDefaultRealm is deprecated in Tomcat7 and was removed in Tomcat8 as described in documentation:

        The method setDefaultRealm was deprecated in r1230777 as part of the changes to fix bug 52443
        http://svn.apache.org/viewvc?view=revision&revision=1230777
        https://issues.apache.org/bugzilla/show_bug.cgi?id=52443

        The alternative to {{embeddedTomcat.setDefaultRealm( memoryRealm ) }} call that should work with both Tomcat 7 and 8 is {{embeddedTomcat.getEngine().setRealm( memoryRealm ) }}.

        (It is a bit of a waste that Tomcat.getEngine() creates a default realm implementation that will be immediately replaced here. It would be possible in avoid creating that object by reintroducing the "setDefaultRealm()" method in Tomcat 8).

        Show
        Konstantin Kolinko added a comment - The problem is in changed Tomcat 8 API, the maven throws folloving exception: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:142) ... 20 more by: java.lang.NoSuchMethodError: org.apache.catalina.startup.Tomcat.setDefaultRealm(Lorg/apache/catalina/Realm;)V at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:999) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:514) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) ... 20 more The method setDefaultRealm is deprecated in Tomcat7 and was removed in Tomcat8 as described in documentation: The method setDefaultRealm was deprecated in r1230777 as part of the changes to fix bug 52443 http://svn.apache.org/viewvc?view=revision&revision=1230777 https://issues.apache.org/bugzilla/show_bug.cgi?id=52443 The alternative to {{embeddedTomcat.setDefaultRealm( memoryRealm ) }} call that should work with both Tomcat 7 and 8 is {{embeddedTomcat.getEngine().setRealm( memoryRealm ) }}. (It is a bit of a waste that Tomcat.getEngine() creates a default realm implementation that will be immediately replaced here. It would be possible in avoid creating that object by reintroducing the "setDefaultRealm()" method in Tomcat 8).
        Hide
        Petar Tahchiev added a comment -

        Any news on this one? It's blocking me for more than 6 months now and I can't update to servlet specification 3.1

        Show
        Petar Tahchiev added a comment - Any news on this one? It's blocking me for more than 6 months now and I can't update to servlet specification 3.1

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Petr Novak
          • Votes:
            12 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

            • Created:
              Updated:

              Development