Our project applies some overrides to existing classes in a large artifact.
I need to combine the changes because maven does not support specifying jar
load order.  Plus I need to so the same for the -sources.jar.

Yeah, we do build on Linux for CI builds but most developers are on Windows
so I can't use a platform specific solution.

Using maven-dependency-plugin to unpack and then something to rejar is very
slow as your tests show.

-Dave

On Wed, Sep 23, 2009 at 12:21 PM, Quintin Beukes <[email protected]>wrote:

> What is the reason for modifying the JAR? Do you pack it in one build,
> and then modify it in another? Or don't you build the first yourself?
>
> Quintin Beukes
>
>
>
> On Wed, Sep 23, 2009 at 8:20 PM, Quintin Beukes <[email protected]>
> wrote:
> > Just for interest sake, here are some benchmarks for unpacking a 93M
> > zip file. I did 3 unpack operations, first 2 onto a memory FS, and the
> > last onto a hard disk. The first was to ensure that the 2 that follow
> > will both have the read caches filled with the zip, so the last 2
> > unpacks has more fair/realistic results.
> >
> > Either way, the unpack to memory FS took:
> > real    0m5.681s
> > user    0m1.292s
> > sys     0m0.376s
> >
> > And the unpack to the hard disk took:
> > real    0m25.048s
> > user    0m1.528s
> > sys     0m0.700s
> >
> > Also, the ZIP was read from memory and the target disc was an unused
> > disc (it wasn't even mounted before the test), so the hard disk wasn't
> > kept busy with reads while unpacking the zip.
> >
> > The memory FS was almost 1/5th of the time of the HDD FS.
> >
> > Quintin Beukes
> >
> >
> >
> > On Wed, Sep 23, 2009 at 8:13 PM, Quintin Beukes <[email protected]>
> wrote:
> >> Are you building on Linux?
> >>
> >> If yes, you can try to use /dev/shm as a temporary directory for
> >> ANYTHING temporary. It is available by default on most modern distros.
> >> If not, you can easily mount it with:
> >> mount -t tmpfs tmpfs /path/to/mount/dir
> >>
> >> When unpacking here it's basically only a read operation from your
> >> hard disk, and when repacking it's basically only a write operation.
> >> It would be the same as a program that would unpack all files into
> >> it's personal memory and rebuild it from there.
> >>
> >> Quintin Beukes
> >>
> >>
> >>
> >> On Wed, Sep 23, 2009 at 6:25 PM, David Hoffer <[email protected]>
> wrote:
> >>> Looks good, I'll give it a try.  Thanks!
> >>>
> >>> On Wed, Sep 23, 2009 at 10:21 AM, Stephen Connolly <
> >>> [email protected]> wrote:
> >>>
> >>>> maybe truezip might give you the options you are after
> >>>>
> >>>> 2009/9/23 David Hoffer <[email protected]>:
> >>>> > As long as its faster that is just fine.  I'm finding that unpacking
> to
> >>>> disk
> >>>> > and then re-jarring takes too long.
> >>>> >
> >>>> > -Dave
> >>>> >
> >>>> > On Wed, Sep 23, 2009 at 10:00 AM, Stephen Connolly <
> >>>> > [email protected]> wrote:
> >>>> >
> >>>> >> FYI, because of how the zip file format works, you will always have
> to
> >>>> >> unpack and repack a jar file.
> >>>> >>
> >>>> >> Any tooling you find is simply doing the repacking in memory on the
> fly
> >>>> >>
> >>>> >> -Stephen
> >>>> >>
> >>>> >> 2009/9/23 David Hoffer <[email protected]>:
> >>>> >> > Is there a maven plugin that can update jars?  I need to modify
> both a
> >>>> >> jar
> >>>> >> > containing classes and one containing sources.
> >>>> >> >
> >>>> >> > Just wondering the best way to do this.  Unpacking and re-jarring
> >>>> takes
> >>>> >> too
> >>>> >> > long.
> >>>> >> >
> >>>> >> > -Dave
> >>>> >> >
> >>>> >>
> >>>> >>
> ---------------------------------------------------------------------
> >>>> >> To unsubscribe, e-mail: [email protected]
> >>>> >> For additional commands, e-mail: [email protected]
> >>>> >>
> >>>> >>
> >>>> >
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [email protected]
> >>>> For additional commands, e-mail: [email protected]
> >>>>
> >>>>
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to