Is there any possibility to reduce the size of maven distribution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any possibility to reduce the size of maven distribution

Kasun Siyambalapitiya
Hi all,

I am currently working on a project which packs `maven` distribution in
itself, so that the programme is capable of performing a `maven` build if
the running system is having `Java` pre installed. Since the `maven`
distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
resultant output of the program becomes bulky. Is there any way to reduce
the size of the `maven` distribution by keeping only the libs which
required for performing the maven build.

Thanks

--
*Regards,*

*Kasun Siyambalapitiya*
*Software Engineer*
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
Tel : 0715523466
E mail : [hidden email]
Blog: https://medium.com/@kasunsiyambalapitiya
<https://wso2.com/signature>
Reply | Threaded
Open this post in threaded view
|

RE: Is there any possibility to reduce the size of maven distribution

Samuli Saarinen
Hi,

Could you use maven wrapper [1]? It obviously needs to download Maven from the interwebs when performing the build though.

[1] https://github.com/takari/maven-wrapper

br,
Samuli

> -----Original Message-----
> From: Kasun Siyambalapitiya [mailto:[hidden email]]
> Sent: 10. marraskuutata 2017 7:30
> To: [hidden email]
> Subject: Is there any possibility to reduce the size of maven distribution
>
> Hi all,
>
> I am currently working on a project which packs `maven` distribution in
> itself, so that the programme is capable of performing a `maven` build if
> the running system is having `Java` pre installed. Since the `maven`
> distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
> resultant output of the program becomes bulky. Is there any way to reduce
> the size of the `maven` distribution by keeping only the libs which
> required for performing the maven build.
>
> Thanks
>
> --
> *Regards,*
>
> *Kasun Siyambalapitiya*
> *Software Engineer*
> WSO2 Inc. - http://wso2.com/
> lean . enterprise . middleware
> Tel : 0715523466
> E mail : [hidden email]
> Blog: https://medium.com/@kasunsiyambalapitiya
> <https://wso2.com/signature>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Is there any possibility to reduce the size of maven distribution

Kasun Siyambalapitiya
Hi Samuli,

Thank you for the quick response. But what I want is to reduce the size of
a given `maven` distribution (if possible) without losing the ability of
performing a successful build so that overall size of my application can be
reduced. (`maven` distribution is around 9MB)

Once again thank your for quickly responding :)

On Fri, Nov 10, 2017 at 12:07 PM, Samuli Saarinen <
[hidden email]> wrote:

> Hi,
>
> Could you use maven wrapper [1]? It obviously needs to download Maven from
> the interwebs when performing the build though.
>
> [1] https://github.com/takari/maven-wrapper
>
> br,
> Samuli
>
> > -----Original Message-----
> > From: Kasun Siyambalapitiya [mailto:[hidden email]]
> > Sent: 10. marraskuutata 2017 7:30
> > To: [hidden email]
> > Subject: Is there any possibility to reduce the size of maven
> distribution
> >
> > Hi all,
> >
> > I am currently working on a project which packs `maven` distribution in
> > itself, so that the programme is capable of performing a `maven` build if
> > the running system is having `Java` pre installed. Since the `maven`
> > distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
> > resultant output of the program becomes bulky. Is there any way to reduce
> > the size of the `maven` distribution by keeping only the libs which
> > required for performing the maven build.
> >
> > Thanks
> >
> > --
> > *Regards,*
> >
> > *Kasun Siyambalapitiya*
> > *Software Engineer*
> > WSO2 Inc. - http://wso2.com/
> > lean . enterprise . middleware
> > Tel : 0715523466
> > E mail : [hidden email]
> > Blog: https://medium.com/@kasunsiyambalapitiya
> > <https://wso2.com/signature>
>



--
*Regards,*

*Kasun Siyambalapitiya*
*Software Engineer*
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
Tel : 0715523466
E mail : [hidden email]
Blog: https://medium.com/@kasunsiyambalapitiya
<https://wso2.com/signature>
Reply | Threaded
Open this post in threaded view
|

Re: Is there any possibility to reduce the size of maven distribution

Anders Hammar
In reply to this post by Kasun Siyambalapitiya
I doubt there is very much you can remove. The Maven installation just
includes the basic features to perform the core features of a build, then
additional plugins are downloaded as needed to do specific tasks during the
build steps. I think that you could reduce the size by removing the color
logging support (jansi).

Please keep in mind that Maven will (typically) download A LOT of artifacts
during the build. So the 9MB of Maven core is not your main concern if you
want to keep the total size down.

/Anders

On Fri, Nov 10, 2017 at 6:30 AM, Kasun Siyambalapitiya <[hidden email]>
wrote:

> Hi all,
>
> I am currently working on a project which packs `maven` distribution in
> itself, so that the programme is capable of performing a `maven` build if
> the running system is having `Java` pre installed. Since the `maven`
> distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
> resultant output of the program becomes bulky. Is there any way to reduce
> the size of the `maven` distribution by keeping only the libs which
> required for performing the maven build.
>
> Thanks
>
> --
> *Regards,*
>
> *Kasun Siyambalapitiya*
> *Software Engineer*
> WSO2 Inc. - http://wso2.com/
> lean . enterprise . middleware
> Tel : 0715523466
> E mail : [hidden email]
> Blog: https://medium.com/@kasunsiyambalapitiya
> <https://wso2.com/signature>
>
Reply | Threaded
Open this post in threaded view
|

Re: Is there any possibility to reduce the size of maven distribution

Kasun Siyambalapitiya
Hi Anders,

Thank you for the quick response, I'll keep it as it is then :)

On Fri, Nov 10, 2017 at 2:03 PM, Anders Hammar <[hidden email]> wrote:

> I doubt there is very much you can remove. The Maven installation just
> includes the basic features to perform the core features of a build, then
> additional plugins are downloaded as needed to do specific tasks during the
> build steps. I think that you could reduce the size by removing the color
> logging support (jansi).
>
> Please keep in mind that Maven will (typically) download A LOT of artifacts
> during the build. So the 9MB of Maven core is not your main concern if you
> want to keep the total size down.
>
> /Anders
>
> On Fri, Nov 10, 2017 at 6:30 AM, Kasun Siyambalapitiya <[hidden email]>
> wrote:
>
> > Hi all,
> >
> > I am currently working on a project which packs `maven` distribution in
> > itself, so that the programme is capable of performing a `maven` build if
> > the running system is having `Java` pre installed. Since the `maven`
> > distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
> > resultant output of the program becomes bulky. Is there any way to reduce
> > the size of the `maven` distribution by keeping only the libs which
> > required for performing the maven build.
> >
> > Thanks
> >
> > --
> > *Regards,*
> >
> > *Kasun Siyambalapitiya*
> > *Software Engineer*
> > WSO2 Inc. - http://wso2.com/
> > lean . enterprise . middleware
> > Tel : 0715523466
> > E mail : [hidden email]
> > Blog: https://medium.com/@kasunsiyambalapitiya
> > <https://wso2.com/signature>
> >
>



--
*Regards,*

*Kasun Siyambalapitiya*
*Software Engineer*
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
Tel : 0715523466
E mail : [hidden email]
Blog: https://medium.com/@kasunsiyambalapitiya
<https://wso2.com/signature>
Reply | Threaded
Open this post in threaded view
|

RE: Is there any possibility to reduce the size of maven distribution

Samuli Saarinen
In reply to this post by Kasun Siyambalapitiya
Hi,

You can do a successful build with mvnw too. It just downloads the maven distribution (the 9MB) also before Maven downloads "half the internet" when building.
So if you are not running the actual build in offline mode it's just 9MB more to download before running the build which gets also cached for future use.

br,
Samuli

> -----Original Message-----
> From: Kasun Siyambalapitiya [mailto:[hidden email]]
> Sent: 10. marraskuutata 2017 9:23
> To: Maven Users List <[hidden email]>
> Subject: Re: Is there any possibility to reduce the size of maven distribution
>
> Hi Samuli,
>
> Thank you for the quick response. But what I want is to reduce the size of
> a given `maven` distribution (if possible) without losing the ability of
> performing a successful build so that overall size of my application can be
> reduced. (`maven` distribution is around 9MB)
>
> Once again thank your for quickly responding :)
>
> On Fri, Nov 10, 2017 at 12:07 PM, Samuli Saarinen <
> [hidden email]> wrote:
>
> > Hi,
> >
> > Could you use maven wrapper [1]? It obviously needs to download Maven
> from
> > the interwebs when performing the build though.
> >
> > [1] https://github.com/takari/maven-wrapper
> >
> > br,
> > Samuli
> >
> > > -----Original Message-----
> > > From: Kasun Siyambalapitiya [mailto:[hidden email]]
> > > Sent: 10. marraskuutata 2017 7:30
> > > To: [hidden email]
> > > Subject: Is there any possibility to reduce the size of maven
> > distribution
> > >
> > > Hi all,
> > >
> > > I am currently working on a project which packs `maven` distribution in
> > > itself, so that the programme is capable of performing a `maven` build if
> > > the running system is having `Java` pre installed. Since the `maven`
> > > distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
> > > resultant output of the program becomes bulky. Is there any way to
> reduce
> > > the size of the `maven` distribution by keeping only the libs which
> > > required for performing the maven build.
> > >
> > > Thanks
> > >
> > > --
> > > *Regards,*
> > >
> > > *Kasun Siyambalapitiya*
> > > *Software Engineer*
> > > WSO2 Inc. - http://wso2.com/
> > > lean . enterprise . middleware
> > > Tel : 0715523466
> > > E mail : [hidden email]
> > > Blog: https://medium.com/@kasunsiyambalapitiya
> > > <https://wso2.com/signature>
> >
>
>
>
> --
> *Regards,*
>
> *Kasun Siyambalapitiya*
> *Software Engineer*
> WSO2 Inc. - http://wso2.com/
> lean . enterprise . middleware
> Tel : 0715523466
> E mail : [hidden email]
> Blog: https://medium.com/@kasunsiyambalapitiya
> <https://wso2.com/signature>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Is there any possibility to reduce the size of maven distribution

Dan Tran
In reply to this post by Kasun Siyambalapitiya
I believe you can shave off 1 to 2M by removing those already shaded by
wagon-http.

-D

On Fri, Nov 10, 2017 at 1:18 AM, Kasun Siyambalapitiya <[hidden email]>
wrote:

> Hi Anders,
>
> Thank you for the quick response, I'll keep it as it is then :)
>
> On Fri, Nov 10, 2017 at 2:03 PM, Anders Hammar <[hidden email]> wrote:
>
> > I doubt there is very much you can remove. The Maven installation just
> > includes the basic features to perform the core features of a build, then
> > additional plugins are downloaded as needed to do specific tasks during
> the
> > build steps. I think that you could reduce the size by removing the color
> > logging support (jansi).
> >
> > Please keep in mind that Maven will (typically) download A LOT of
> artifacts
> > during the build. So the 9MB of Maven core is not your main concern if
> you
> > want to keep the total size down.
> >
> > /Anders
> >
> > On Fri, Nov 10, 2017 at 6:30 AM, Kasun Siyambalapitiya <[hidden email]
> >
> > wrote:
> >
> > > Hi all,
> > >
> > > I am currently working on a project which packs `maven` distribution in
> > > itself, so that the programme is capable of performing a `maven` build
> if
> > > the running system is having `Java` pre installed. Since the `maven`
> > > distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the total
> > > resultant output of the program becomes bulky. Is there any way to
> reduce
> > > the size of the `maven` distribution by keeping only the libs which
> > > required for performing the maven build.
> > >
> > > Thanks
> > >
> > > --
> > > *Regards,*
> > >
> > > *Kasun Siyambalapitiya*
> > > *Software Engineer*
> > > WSO2 Inc. - http://wso2.com/
> > > lean . enterprise . middleware
> > > Tel : 0715523466
> > > E mail : [hidden email]
> > > Blog: https://medium.com/@kasunsiyambalapitiya
> > > <https://wso2.com/signature>
> > >
> >
>
>
>
> --
> *Regards,*
>
> *Kasun Siyambalapitiya*
> *Software Engineer*
> WSO2 Inc. - http://wso2.com/
> lean . enterprise . middleware
> Tel : 0715523466
> E mail : [hidden email]
> Blog: https://medium.com/@kasunsiyambalapitiya
> <https://wso2.com/signature>
>
Reply | Threaded
Open this post in threaded view
|

Re: Is there any possibility to reduce the size of maven distribution

Kasun Siyambalapitiya
Hi Samuli,

Thanks for the reply. As with the response from Anders, I decided to keep
the distribution as it is since it having only the basic features required
for build.

Thank you once again :)

On Fri, Nov 10, 2017 at 2:57 PM, Dan Tran <[hidden email]> wrote:

> I believe you can shave off 1 to 2M by removing those already shaded by
> wagon-http.
>
> -D
>
> On Fri, Nov 10, 2017 at 1:18 AM, Kasun Siyambalapitiya <[hidden email]>
> wrote:
>
> > Hi Anders,
> >
> > Thank you for the quick response, I'll keep it as it is then :)
> >
> > On Fri, Nov 10, 2017 at 2:03 PM, Anders Hammar <[hidden email]>
> wrote:
> >
> > > I doubt there is very much you can remove. The Maven installation just
> > > includes the basic features to perform the core features of a build,
> then
> > > additional plugins are downloaded as needed to do specific tasks during
> > the
> > > build steps. I think that you could reduce the size by removing the
> color
> > > logging support (jansi).
> > >
> > > Please keep in mind that Maven will (typically) download A LOT of
> > artifacts
> > > during the build. So the 9MB of Maven core is not your main concern if
> > you
> > > want to keep the total size down.
> > >
> > > /Anders
> > >
> > > On Fri, Nov 10, 2017 at 6:30 AM, Kasun Siyambalapitiya <
> [hidden email]
> > >
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am currently working on a project which packs `maven` distribution
> in
> > > > itself, so that the programme is capable of performing a `maven`
> build
> > if
> > > > the running system is having `Java` pre installed. Since the `maven`
> > > > distribution (apache-maven-3.5.2-bin.zip) size is around 9MB the
> total
> > > > resultant output of the program becomes bulky. Is there any way to
> > reduce
> > > > the size of the `maven` distribution by keeping only the libs which
> > > > required for performing the maven build.
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > *Regards,*
> > > >
> > > > *Kasun Siyambalapitiya*
> > > > *Software Engineer*
> > > > WSO2 Inc. - http://wso2.com/
> > > > lean . enterprise . middleware
> > > > Tel : 0715523466
> > > > E mail : [hidden email]
> > > > Blog: https://medium.com/@kasunsiyambalapitiya
> > > > <https://wso2.com/signature>
> > > >
> > >
> >
> >
> >
> > --
> > *Regards,*
> >
> > *Kasun Siyambalapitiya*
> > *Software Engineer*
> > WSO2 Inc. - http://wso2.com/
> > lean . enterprise . middleware
> > Tel : 0715523466
> > E mail : [hidden email]
> > Blog: https://medium.com/@kasunsiyambalapitiya
> > <https://wso2.com/signature>
> >
>



--
*Regards,*

*Kasun Siyambalapitiya*
*Software Engineer*
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
Tel : 0715523466
E mail : [hidden email]
Blog: https://medium.com/@kasunsiyambalapitiya
<https://wso2.com/signature>