have you had a look at the unpackTypes configuration option of m-ear-p?

On 8 July 2010 16:28, asookazian <asookaz...@gmail.com> wrote:

>
>
> Martin Höller wrote:
> >
> > Am Mittwoch, 7. Juli 2010 18:46:34 schrieb asookazian:
> >> There is some limited coverage of creating a custom lifecycle here:
> >>
> http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-cu
> >>stom-lifecycle.html
> >>
> >> but it also covers forking and parallel lifecycles, I'm not sure I'm
> >> really
> >> interested in that.  I want to change the package lifecycle so that it
> >> uses
> >> war:explode goal rather than war:war goal.
> >
> > What about just configuring the war:explode goal in your pom.xml? war:war
> > would still be executed, but is this a problem?
> >
> > hth,
> > - martin
> >
> >
> >
>
> I just realized something very basic after reading first chapter of Maven
> 2:
> Effective Implementation.  "The web application archive is produced in the
> target directory, which is Maven's default working directory.  There you
> will find both the target/simple-webapp subdirectory that contains the
> exploded, or unpacked, web application contents ready to be packaged, and
> the target/simple-webapp.war file that contains those files after the
> packaging process."
>
> So perhaps if the unpack goal of the jboss-maven-plugin was modified to use
> the already exploded WAR in the exploded EAR, then we would be good.  At
> least as far as JBoss users are concerned...
>
> public void unpack( File zipFile, File targetDir )
>        throws IOException
>    {
>        FileInputStream in = new FileInputStream( zipFile );
>        ZipInputStream zipIn = new ZipInputStream( in );
>
>        File dir = targetDir.getCanonicalFile();
>        dir.mkdirs();
>        ZipEntry entry;
>        while ( ( entry = zipIn.getNextEntry() ) != null )
>        {
>            if ( entry.isDirectory() )
>            {
>                continue;
>            }
>            String file = targetDir + "/" + entry.getName();
>
>            new File( file ).getParentFile().getCanonicalFile().mkdirs();
>
>            FileOutputStream out = new FileOutputStream( file );
>            streamcopy( zipIn, out );
>            out.close();
>        }
>        zipIn.close();
>    }
>
>
> http://svn.codehaus.org/mojo/tags/jboss-maven-plugin-1.4.1/src/main/java/org/codehaus/mojo/jboss/HardDeployMojo.java
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Creating-a-Custom-Lifecycle-tp1044781p1045103.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to