You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dmytro Seredenko (JIRA)" <ji...@codehaus.org> on 2008/03/14 11:11:28 UTC

[jira] Created: (MWAR-148) containerConfigXML option doesn`t include context.xml from external directory

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

                 Key: MWAR-148
                 URL: http://jira.codehaus.org/browse/MWAR-148
             Project: Maven 2.x War Plugin
          Issue Type: Bug
    Affects Versions: 2.1-alpha-1
            Reporter: Dmytro Seredenko
         Attachments: context-bug.zip

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:
{code:xml}
<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-war-plugin</artifactId>
   <configuration>
        <containerConfigXML>${basedir}/resources/context.xml</containerConfigXML>
   </configuration>
</plugin>
{code}

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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MWAR-148) containerConfigXML option doesn`t include context.xml from external directory

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MWAR-148.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1-alpha-2

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.

> containerConfigXML option doesn`t include context.xml from external directory
> -----------------------------------------------------------------------------
>
>                 Key: MWAR-148
>                 URL: http://jira.codehaus.org/browse/MWAR-148
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>            Reporter: Dmytro Seredenko
>             Fix For: 2.1-alpha-2
>
>         Attachments: context-bug.zip
>
>
> 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:
> {code:xml}
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-war-plugin</artifactId>
>    <configuration>
>         <containerConfigXML>${basedir}/resources/context.xml</containerConfigXML>
>    </configuration>
> </plugin>
> {code}
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira