You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kristian Rink <li...@zimmer428.net> on 2010/05/12 09:22:40 UTC
war:exploded or alternatives?
Folks;
in some cases, we're deploying webapps built as .war files manually to
some application server, but in some structure, I'd like to, after
install:install has finished, automatically unpack them to some given
webapps folder for a local jetty installation for the sake of zipping /
deploying the jetty+webapps as a whole.
At the moment, I am using a configuration like that...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>/home/kr/kontext/runtime/appservers/jetty/webapps/jettyweb</webappDirectory>
</configuration>
</plugin>
[...]
... to get the job done, which works, but basically has the "flaw" that
it generally and in any case creates a folder in jetty/webapps/ before
building a .war file - which is not what I want as not each of our
developers has a local jetty installation (in the same place) available.
So to ask:
- How to tweak the configuration to have the webapp directory copied out
from $PROJECT/target/ to some specialized folder after the war has been
built?
- How to modify things to make this happen only if I run a given goal
for that project (war:explode?) rather than happening automatically
along with install:install?
TIA and all the best,
Kristian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: war:exploded or alternatives?
Posted by Kristian Rink <li...@zimmer428.net>.
Am 12.05.2010 09:53, schrieb Stephen Connolly:
> add an execution bound to the phase you want and put the configuration of
> that execution in the execution.
Well, that's what I thought too, and I figured out that calling
war:exploded actually does what I need, with one minor annoyance (which
is what initially made me think): Having this configuration...
[...]
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-war-plugin</artifactId>
>> <configuration>
>>
>>
>> <webappDirectory>/home/kr/kontext/runtime/appservers/jetty/webapps/jettyweb</webappDirectory>
>> </configuration>
>> </plugin>
>> [...]
>>
[...]
in pom.xml, maven does what I intend to do, but in this case, no matter
whether using war:exploded or war:war, the webapp _always_ is built in
the specified <webappDirectory>. What I want it to do, however, is to
build the webapp (and eventually the .war file) in
${project.home}/target/ as it does by default and _then_, using
war:exploded, unpack the war file to some specified folder outside
${project.home}. So far I failed, however, at configuring
maven-war-plugin for right this behaviour in case of war:exploded being
explicitely called... :/
K.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: war:exploded or alternatives?
Posted by Stephen Connolly <st...@gmail.com>.
add an execution bound to the phase you want and put the configuration of
that execution in the execution.
On 12 May 2010 08:22, Kristian Rink <li...@zimmer428.net> wrote:
> Folks;
>
> in some cases, we're deploying webapps built as .war files manually to some
> application server, but in some structure, I'd like to, after
> install:install has finished, automatically unpack them to some given
> webapps folder for a local jetty installation for the sake of zipping /
> deploying the jetty+webapps as a whole.
>
> At the moment, I am using a configuration like that...
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
>
>
> <webappDirectory>/home/kr/kontext/runtime/appservers/jetty/webapps/jettyweb</webappDirectory>
> </configuration>
> </plugin>
> [...]
>
> ... to get the job done, which works, but basically has the "flaw" that it
> generally and in any case creates a folder in jetty/webapps/ before building
> a .war file - which is not what I want as not each of our developers has a
> local jetty installation (in the same place) available. So to ask:
>
> - How to tweak the configuration to have the webapp directory copied out
> from $PROJECT/target/ to some specialized folder after the war has been
> built?
>
> - How to modify things to make this happen only if I run a given goal for
> that project (war:explode?) rather than happening automatically along with
> install:install?
>
> TIA and all the best,
> Kristian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>