Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-3

war:war launched from parent doesn't find module web.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None
    • None

    Description

      foo
      +-- pom.xml
      +-- foo-contact
      +-- pom.xml
      +-- contact
      +-- WebContent
      +-- WEB-INF
      +-- web.xml

      In foo-contact pom.xml :
      <build> <plugins> <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
      <warSourceDirectory>contact/WebContent</warSourceDirectory>
      </configuration>
      </plugin> </plugins></build>

      war:war launched from foo-contact is OK.

      war:war launched from foo produces :
      org.apache.maven.plugin.MojoExecutionException: Error assembling WAR
      at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:224)
      ...
      Caused by: org.codehaus.plexus.archiver.ArchiverException: Deployment descriptor: /devel/maven/src/RIC/trunk/ric-contact/target/contact/WEB-INF/web.xml does not exist.
      at org.codehaus.plexus.archiver.war.WarArchiver.setWebxml(WarArchiver.java:70)
      ...

      Adding <webXml>contact/WebContent/WEB-INF/web.xml</webXml> produces the same message.

      Adding <webXml>${basedir}/contact/WebContent/WEB-INF/web.xml</webXml> solves the issue.

      I guess out two things here :

      • when you launch war:war from parent, webXml does not default to ${warSourceDirectory}/WEB-INF/web.xml
      • webXml isn't implicitly prefixed with ${basedir}/

      See also http://marc.theaimsgroup.com/?l=turbine-maven-user&m=111623705811553&w=2 for a previous report of this issue.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              le.du.yann@gmail.com Yann Le Du
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: