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

tomcat7:run-war fails because it expects META-INF\context.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-1
    • 2.1
    • tomcat7
    • None

    Description

      run-war and run-war-only goals fail on tomcat7 plugin, looking for the file =META-INF\context.xml=

      How to reproduce:

      • Use the archetype to create a project
        mvn archetype:generate -DarchetypeGroupId=org.apache.tomcat.maven -DarchetypeArtifactId=tomcat-maven-archetype -DarchetypeVersion=2.0-beta-1
      • Build it
      • cd basic-webapp
      • mvn org.apache.tomcat.maven:tomcat6-maven-plugin:run-war
        => works fine
      • mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run
        => works fine
      • mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run-war
        -> kaboom
        [INFO] --- tomcat7-maven-plugin:2.0-beta-1:run-war (default-cli) @ basic-webapp ---
        [INFO] Running war on http://localhost:9090/
        [INFO] Using existing Tomcat server configuration at C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\tomcat
        févr. 16, 2012 6:56:24 PM org.apache.coyote.AbstractProtocol init
        Infos: Initializing ProtocolHandler ["http-bio-9090"]
        févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardService startInternal
        Infos: Starting service Tomcat
        févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardEngine startInternal
        Infos: Starting Servlet Engine: Apache Tomcat/7.0.25
        févr. 16, 2012 6:56:24 PM org.apache.catalina.startup.ContextConfig processContextConfig
        Grave: Missing context.xml: file:/C:/Users/SAMUEL~1.LAN/AppData/Local/Temp/com.antelink.toto/basic-webapp/target/basic-webapp-1.0-SNAPSHOT/META-INF/context.xml
        java.io.FileNotFoundException: C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\basic-webapp-1.0-SNAPSHOT\META-INF\context.xml (Le fichier spécifié est introuvable)
                at java.io.FileInputStream.open(Native Method)
                at java.io.FileInputStream.<init>(FileInputStream.java:138)
                at java.io.FileInputStream.<init>(FileInputStream.java:97)
                at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
                at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
                at java.net.URL.openStream(URL.java:1035)
                at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:565)
                at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:546)
                at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:784)
                at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:318)
                at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
                at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        

      Attachments

        1. web_service_tutorial.zip
          15 kB
          Glen Mazza
        2. MTOMCAT119.patch
          4 kB
          Glen Mazza

        Activity

          People

            olamy Olivier Lamy
            samuel_langlois Antelink
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: