Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: 2.0-beta-1
    • Fix Version/s: moreinfo
    • Component/s: tomcat7
    • Labels:
    • Environment:

      Description

      Just today on November 3rd, i tried out the tomcat7 maven plugin to try out the executable war.
      Following the configuration from the http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, here's the output of my tomcat7:exec-war-only -X :

      ... lot of lines removed ...

      org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, org.codehaus.plexus:plexus-io:jar:2.0.1:compile]
      [DEBUG] (f) project = MavenProject: kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ C:\Users\albert\workspace\BasicSetup\pom.xml
      [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT
      [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases
      url: https://maven.java.net/content/repositories/releases/
      layout: default
      snapshots: [enabled => true, update => daily]
      releases: [enabled => true, update => daily]
      , id: central
      url: http://repo1.maven.org/maven2
      layout: default
      snapshots: [enabled => false, update => daily]
      releases: [enabled => true, update => daily]
      ]
      [DEBUG] (f) serverXml = C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml
      [DEBUG] (f) tomcatConfigurationFilesDirectory = C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf
      [DEBUG] – end configuration –
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 0.827s
      [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011
      [INFO] Final Memory: 6M/15M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only (default-cli) on project BasicSetup: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only (default-cli) on project BasicSetup: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only failed.
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only failed.
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
      Caused by: java.lang.NullPointerException
      at java.io.FileInputStream.<init>(FileInputStream.java:134)
      at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractExecWarMojo.execute(AbstractExecWarMojo.java:287)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      ... 20 more
      [ERROR]
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

      The full message can be found at http://pastebin.com/yreULuvY

      And my pom :

      <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <artifactId>tomcat7-maven-plugin</artifactId>
      <version>2.0-SNAPSHOT</version>
      <executions>
      <execution>
      <id>tomcat7-run</id>
      <goals>
      <goal>exec-war-only</goal>
      </goals>
      <phase>package</phase>
      <configuration>
      <path>/</path>
      <tomcatConfigurationFilesDirectory>src/main/webapp/WEB-INF</tomcatConfigurationFilesDirectory>
      </configuration>
      </execution>
      </executions>
      </plugin>

      The full pom can be found at : http://pastebin.com/6y2nPVBK

      From my test, the package phase doesnt seem to trigger the exec-war-only goal in my "mvn package" execution.
      And in my "mvn tomcat7:exec-war-only", it doesnt seem to read my tomcatConfigurationFilesDirectory property.

      Perhaps im missing something ?

      Thanks !

        Activity

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            albert kam
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.05h
              0.05h
              Remaining:
              Remaining Estimate - 0.05h
              0.05h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development