You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ja...@barclayscapital.com on 2004/08/27 09:41:07 UTC

war:deploy

I've finally got round to moving my build over to using the xxx:deploy
goals.  This works a treat for jars, but I'm having an issue with wars.

The build can produce various different builds of the war, which contain
different config settings for the environment it will run in.  To
distinguish these builds I include the environment name by manipulating the
appropriate property:

	<postGoal name="war:init">
		<j:set
var="maven.war.final.name">fip-workflow-${maven.tcw.env}.war</j:set>

	</postGoal>

This all works for building the war and under my old build I just copied the
result to our repository using the <copy> tag.  However when I switch to
using war:deploy it gets the source filename correct, but the target uses
the default name, e.g. tcw-fip-workflow-webservice-2.0.0.war

Am I doing something wrong, or is this just a feature / limitation / bug of
the war / artifact plugin?

thanks

James


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: war:deploy

Posted by Brett Porter <br...@gmail.com>.
This is the artifact strategy for Maven is for a project to produce
one artifact per project.

I assume the way you are doing this, you need to re-run maven to build
the others?

The preferred Maven approach is to create small subprojects (possibly
just with a POM and different properties) that extend the original.
These can then be built to publish each different project, or all can
be done at once via the reactor.

To keep your existing approach, you will probably need to override the
war:deploy goal and use the artifact tags manually to deploy with the
new final name.

We should support using war.final.name to publish the artifact, so if
you want to raise an issue in JIRA, that'd be great.

Cheers,
Brett

On Fri, 27 Aug 2004 08:41:07 +0100, james.shute@barclayscapital.com
<ja...@barclayscapital.com> wrote:
> I've finally got round to moving my build over to using the xxx:deploy
> goals.  This works a treat for jars, but I'm having an issue with wars.
> 
> The build can produce various different builds of the war, which contain
> different config settings for the environment it will run in.  To
> distinguish these builds I include the environment name by manipulating the
> appropriate property:
> 
>        <postGoal name="war:init">
>                <j:set
> var="maven.war.final.name">fip-workflow-${maven.tcw.env}.war</j:set>
> 
>        </postGoal>
> 
> This all works for building the war and under my old build I just copied the
> result to our repository using the <copy> tag.  However when I switch to
> using war:deploy it gets the source filename correct, but the target uses
> the default name, e.g. tcw-fip-workflow-webservice-2.0.0.war
> 
> Am I doing something wrong, or is this just a feature / limitation / bug of
> the war / artifact plugin?
> 
> thanks
> 
> James
> 
> ------------------------------------------------------------------------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
> 
> Internet communications are not secure and therefore the Barclays
> Group does not accept legal responsibility for the contents of this
> message.  Although the Barclays Group operates anti-virus programmes,
> it does not accept responsibility for any damage whatsoever that is
> caused by viruses being passed.  Any views or opinions presented are
> solely those of the author and do not necessarily represent those of the
> Barclays Group.  Replies to this email may be monitored by the Barclays
> Group for operational or business reasons.
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> 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