You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2010/07/21 12:17:00 UTC
Issue with Maven WAR plugin and overlay when using war:inplace
Hi all,
I have a web application that depends on another WAR (overlay). According to
m-war-p documentation [1], the current application is priority #1 and then come
dependent war. My understanding is that when there are two files with same path
in both current application and dependent war, this is the file in current
application that should ultimately be taken to produce the final war.
Example:
current application contains the file src/main/webapp/WEB-INF/web.xml
dependent war contain a nearly empty file dependentWar.war!WEB-INF/web.xml
When I run mvn war:inplace I can read in the log:
[INFO] --- maven-war-plugin:2.1-beta-1:inplace (default-cli) @ myWebApp ---
...
[INFO] Processing war project
[INFO] Processing overlay[ id com.mycompany:dependentWar]
...
[INFO] File[WEB-INF/web.xml] belonged to overlay[currentBuild] so it will be
overwritten.
As a result the src/main/webapp/WEB-INF/web.xml file was overwritten in the
current application by the file coming from the dependent WAR.
If I run mvn war:exploded the result is correct and the file in
target/myCurrentWebApp-XX-SNAPSHOT/WEB-INF/web.xml is the one coming from the
current web app.
Is it a known issue? Do you know if there is a workaround?
Regards,
Julien
[1] http://maven.apache.org/plugins/maven-war-plugin/overlays.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re : Issue with Maven WAR plugin and overlay when using war:inplace
Posted by Julien HENRY <he...@yahoo.fr>.
I have created an issue in JIRA with an attached it:
http://jira.codehaus.org/browse/MWAR-229
Regards,
Julien
----- Message d'origine ----
> De : Julien HENRY <he...@yahoo.fr>
> À : users@maven.apache.org
> Envoyé le : Mer 21 juillet 2010, 12h 17min 00s
> Objet : Issue with Maven WAR plugin and overlay when using war:inplace
>
> Hi all,
>
> I have a web application that depends on another WAR (overlay). According to
> m-war-p documentation [1], the current application is priority #1 and then
>come
>
> dependent war. My understanding is that when there are two files with same
>path
>
> in both current application and dependent war, this is the file in current
> application that should ultimately be taken to produce the final war.
>
> Example:
> current application contains the file src/main/webapp/WEB-INF/web.xml
>
> dependent war contain a nearly empty file dependentWar.war!WEB-INF/web.xml
>
> When I run mvn war:inplace I can read in the log:
>
> [INFO] --- maven-war-plugin:2.1-beta-1:inplace (default-cli) @ myWebApp ---
> ...
> [INFO] Processing war project
> [INFO] Processing overlay[ id com.mycompany:dependentWar]
> ...
> [INFO] File[WEB-INF/web.xml] belonged to overlay[currentBuild] so it will be
> overwritten.
>
> As a result the src/main/webapp/WEB-INF/web.xml file was overwritten in the
> current application by the file coming from the dependent WAR.
>
>
> If I run mvn war:exploded the result is correct and the file in
> target/myCurrentWebApp-XX-SNAPSHOT/WEB-INF/web.xml is the one coming from the
> current web app.
>
> Is it a known issue? Do you know if there is a workaround?
>
>
>
> Regards,
>
> Julien
>
>
> [1] http://maven.apache.org/plugins/maven-war-plugin/overlays.html
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re : Issue with Maven WAR plugin and overlay when using war:inplace
Posted by Julien HENRY <he...@yahoo.fr>.
I will try your suggestion but according to the documentation, my use case
should be the default one (without configuration). In addition, war:exploded
produces the correct result but war:inplace produces a different result so I
definitely think there is an issue.
Regards,
Julien
----- Message d'origine ----
> De : Kumar Ampani <am...@gmail.com>
> À : Maven Users List <us...@maven.apache.org>
> Envoyé le : Jeu 22 juillet 2010, 0h 11min 51s
> Objet : Re: Issue with Maven WAR plugin and overlay when using war:inplace
>
> Use overlay tags in war plugin configuration to control the order.
>
> On Wednesday, July 21, 2010, Julien HENRY <he...@yahoo.fr> wrote:
> > Hi all,
> >
> > I have a web application that depends on another WAR (overlay). According
to
> > m-war-p documentation [1], the current application is priority #1 and then
>come
> > dependent war. My understanding is that when there are two files with same
>path
> > in both current application and dependent war, this is the file in current
> > application that should ultimately be taken to produce the final war.
> >
> > Example:
> > current application contains the file src/main/webapp/WEB-INF/web.xml
> >
> > dependent war contain a nearly empty file dependentWar.war!WEB-INF/web.xml
> >
> > When I run mvn war:inplace I can read in the log:
> >
> > [INFO] --- maven-war-plugin:2.1-beta-1:inplace (default-cli) @ myWebApp ---
> > ...
> > [INFO] Processing war project
> > [INFO] Processing overlay[ id com.mycompany:dependentWar]
> > ...
> > [INFO] File[WEB-INF/web.xml] belonged to overlay[currentBuild] so it will
be
> > overwritten.
> >
> > As a result the src/main/webapp/WEB-INF/web.xml file was overwritten in the
> > current application by the file coming from the dependent WAR.
> >
> >
> > If I run mvn war:exploded the result is correct and the file in
> > target/myCurrentWebApp-XX-SNAPSHOT/WEB-INF/web.xml is the one coming from
>the
> > current web app.
> >
> > Is it a known issue? Do you know if there is a workaround?
> >
> >
> >
> > Regards,
> >
> > Julien
> >
> >
> > [1] http://maven.apache.org/plugins/maven-war-plugin/overlays.html
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Issue with Maven WAR plugin and overlay when using war:inplace
Posted by Kumar Ampani <am...@gmail.com>.
Use overlay tags in war plugin configuration to control the order.
On Wednesday, July 21, 2010, Julien HENRY <he...@yahoo.fr> wrote:
> Hi all,
>
> I have a web application that depends on another WAR (overlay). According to
> m-war-p documentation [1], the current application is priority #1 and then come
> dependent war. My understanding is that when there are two files with same path
> in both current application and dependent war, this is the file in current
> application that should ultimately be taken to produce the final war.
>
> Example:
> current application contains the file src/main/webapp/WEB-INF/web.xml
>
> dependent war contain a nearly empty file dependentWar.war!WEB-INF/web.xml
>
> When I run mvn war:inplace I can read in the log:
>
> [INFO] --- maven-war-plugin:2.1-beta-1:inplace (default-cli) @ myWebApp ---
> ...
> [INFO] Processing war project
> [INFO] Processing overlay[ id com.mycompany:dependentWar]
> ...
> [INFO] File[WEB-INF/web.xml] belonged to overlay[currentBuild] so it will be
> overwritten.
>
> As a result the src/main/webapp/WEB-INF/web.xml file was overwritten in the
> current application by the file coming from the dependent WAR.
>
>
> If I run mvn war:exploded the result is correct and the file in
> target/myCurrentWebApp-XX-SNAPSHOT/WEB-INF/web.xml is the one coming from the
> current web app.
>
> Is it a known issue? Do you know if there is a workaround?
>
>
>
> Regards,
>
> Julien
>
>
> [1] http://maven.apache.org/plugins/maven-war-plugin/overlays.html
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org