jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x WAR Plugin
  • MWAR-148

containerConfigXML option doesn`t include context.xml from external directory

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1-alpha-1
  • Fix Version/s: 2.1-alpha-2
  • Component/s: None
  • Labels:
    None

Description

My task is to include different context.xml to the META-INF directory of the resulting war file.
I provide default context.xml in the /src/main/webapp/META-INF and another in the /resources where "/" relates to the root of the project.
Example of directory structure and pom.xml in the attached context-bug.zip

POM snippet with maven-war-plugin configuration:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-war-plugin</artifactId>
   <configuration>
        <containerConfigXML>${basedir}/resources/context.xml</containerConfigXML>
   </configuration>
</plugin>

Debug output of the mvn war:war:

{normat}
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war' -->
[DEBUG] (s) archiveClasses = false
[DEBUG] (s) cacheFile = E:\Work\Downloader\downloader-web\target\war\work\webapp-cache.xml
[DEBUG] (s) classesDirectory = E:\Work\Downloader\downloader-web\target\classes
[DEBUG] (s) containerConfigXML = E:\Work\Downloader\downloader-web\resources\context.xml
[DEBUG] (s) filters = []
[DEBUG] (f) outputDirectory = E:\Work\Downloader\downloader-web\target
[DEBUG] (f) primaryArtifact = true
[DEBUG] (s) project = MavenProject: ru.kck.downloader:downloader-web:1.0 @ E:\Work\Downloader\downloader-web\pom.xml
[DEBUG] (s) useCache = true
[DEBUG] (f) warName = downloader-web
[DEBUG] (s) warSourceDirectory = E:\Work\Downloader\downloader-web\src\main\webapp
[DEBUG] (s) webappDirectory = E:\Work\Downloader\downloader-web\target\downloader-web
[DEBUG] (s) workDirectory = E:\Work\Downloader\downloader-web\target\war\work
[DEBUG] – end configuration –
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[downloader-web] in [E:\Work\Downloader\downloader-web\target\downloader-web]{normat}

And last note: /resources/context.xml copied to the META-INF of the target directory, but war file created without any context.xml in it`s own META-INF

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    context-bug.zip
    14/Mar/08 5:09 AM
    3 kB
    Dmytro Seredenko
    1. XML File
      context-bug/pom.xml 2 kB
    2. XML File
      context-bug/resources/context.xml 0.0 kB
    3. XML File
      context-bug/src/.../META-INF/context.xml 0.0 kB
    4. XML File
      context-bug/src/main/.../WEB-INF/web.xml 0.0 kB
    Download Zip
    Show
    Zip Archive
    context-bug.zip
    14/Mar/08 5:09 AM
    3 kB
    Dmytro Seredenko

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Dennis Lundberg added a comment - 11/Feb/09 10:47 AM

Thanks for the test project. I tested this with 2.1-alpha-1 and that version is broken like you reported. Upgrading to 2.1-alpha-2 solved the problem.

Show
Dennis Lundberg added a comment - 11/Feb/09 10:47 AM Thanks for the test project. I tested this with 2.1-alpha-1 and that version is broken like you reported. Upgrading to 2.1-alpha-2 solved the problem.

People

  • Assignee:
    Unassigned
    Reporter:
    Dmytro Seredenko
Vote (3)
Watch (4)

Dates

  • Created:
    14/Mar/08 5:09 AM
    Updated:
    11/Feb/09 10:47 AM
    Resolved:
    11/Feb/09 10:47 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.