I see everyone ranting on about producing a fully exploded ear.... AFAIK,
maven already supports doing that (with the caviat that the unexploded war
will have to be produced for each war module [because you need to be able to
store it in the local/remote repo's]  If you don't produce a war file as
part of your build then you will have to build the exploded war _every
build_.  By exploding the .war file into the .ear you have the choice of
only building the .ear module and using the .war from your local repo]

In any case, to have an exploded .ear, you either just have to specify the
<unpack>true</unpack> option for each of the modules in your ear in the
m-ear-p configuration section, or you configure the <unpackTypes> option,
e.g.

<project>
  [...]
  <build>
    [...]
    <plugins>
      [...]
      <plugin>
        <artifactId>maven-ear-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
          <unpackTypes>jar,rar,war</unpackTypes>
        </configuration>
      </plugin>
      [...]
    </plugins>
    [...]
  </build>
  [...]
</project>

- Stephen

On 7 July 2010 21:56, Wayne Fay <wayne...@gmail.com> wrote:

> > Well after some extensive experimentation with creating a custom
> lifecycle,
> > it appears as though using war:explode in components.xml with
> > <packaging>war</packaging> in the POM may not be possible.
>
> As I understand it, this is correct because Maven already has a
> pre-defined lifecycle for projects of type war. You could potentially
> produce a fully-customized build of Maven that did not contain the
> pre-defined war packaging lifecycle, but I wouldn't want to be
> involved in supporting it and mandating your developers to use it
> instead of the usual Maven distribution etc.
>
> > When I use <packaging>exploded</packaging>, it works ok.  But I don't
> think
> > this is feasible to use for a WAR project and not sure how to do this for
> a
> > EAR project (which contains one or more WARs).
>
> You would probably need to produce both exploded-war and exploded-ear
> packaging types and corresponding custom lifecycles.
>
> You may also find this webpage to be helpful, if you haven't already
> been reading it:
>
> http://www.sonatype.com/people/2009/08/create-a-customized-build-process-in-maven/
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to