You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Cemo <ce...@gmail.com> on 2013/12/05 08:28:53 UTC

Releasing artifacts with and without debug info

Hi,

Jackson project is using this compiler parameters to reduce jar size.

          <debug>true</debug>
>           <debuglevel>lines,source</debuglevel>


However this is causing a lot pain to debug. Every single artifact has to
be compiled with necessary compiler flags again to be debugged. Before
suggesting something I wanted to be sure about that. Is there any practice
to distribute artifacts with and without debug info? The first thing which
came to my mind is *classifier. *Is this a good usage? What do you think?

Thanks

Re: Releasing artifacts with and without debug info

Posted by Stephen Connolly <st...@gmail.com>.
Or writing a plugin that strips debug info from a .jar and attaches the
stripped artifact with the nodebug classifier...

/me wonders if shade offers this functionality...

On Thursday, 5 December 2013, Robert Scholte wrote:

> Classifier would seem to be appropriate for this case... but I would be
>> interested to see what others say.
>>
>
> I agree on this approach. It will require extra execution blocks for at
> least the maven-compiler-plugin and maven-jar-plugin. You also have to
> decide if you want the maven-surefire-plugin to test both classfolders or
> just the main.
>
> Robert
>
> Op Thu, 05 Dec 2013 11:37:54 +0100 schreef Stephen Connolly <
> stephen.alan.connolly@gmail.com>:
>
>  Well first off I think it would be better to have the full debug info in
>> the main artifact.... as you can always use tooling to strip debug info as
>> a consumer
>>
>> the debug info will have no effect on the transitive dependencies, so from
>> that PoV having a -nodebug.jar makes sense
>>
>> Classifier would seem to be appropriate for this case... but I would be
>> interested to see what others say.
>>
>> The other thing to keep in mind is that Tatu is a very smart guy... there
>> is likely a good reason that he's just forgotten which was his primary
>> reason and the file size is just a secondary reason that is easier to
>> remember.
>>
>>
>>
>> On 5 December 2013 07:28, Cemo <ce...@gmail.com> wrote:
>>
>>  Hi,
>>>
>>> Jackson project is using this compiler parameters to reduce jar size.
>>>
>>>           <debug>true</debug>
>>> >           <debuglevel>lines,source</debuglevel>
>>>
>>>
>>> However this is causing a lot pain to debug. Every single artifact has to
>>> be compiled with necessary compiler flags again to be debugged. Before
>>> suggesting something I wanted to be sure about that. Is there any
>>> practice
>>> to distribute artifacts with and without debug info? The first thing
>>> which
>>> came to my mind is *classifier. *Is this a good usage? What do you think?
>>>
>>> Thanks
>>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Sent from my phone

Re: Releasing artifacts with and without debug info

Posted by Robert Scholte <rf...@apache.org>.
> Classifier would seem to be appropriate for this case... but I would be
> interested to see what others say.

I agree on this approach. It will require extra execution blocks for at  
least the maven-compiler-plugin and maven-jar-plugin. You also have to  
decide if you want the maven-surefire-plugin to test both classfolders or  
just the main.

Robert

Op Thu, 05 Dec 2013 11:37:54 +0100 schreef Stephen Connolly  
<st...@gmail.com>:

> Well first off I think it would be better to have the full debug info in
> the main artifact.... as you can always use tooling to strip debug info  
> as
> a consumer
>
> the debug info will have no effect on the transitive dependencies, so  
> from
> that PoV having a -nodebug.jar makes sense
>
> Classifier would seem to be appropriate for this case... but I would be
> interested to see what others say.
>
> The other thing to keep in mind is that Tatu is a very smart guy... there
> is likely a good reason that he's just forgotten which was his primary
> reason and the file size is just a secondary reason that is easier to
> remember.
>
>
>
> On 5 December 2013 07:28, Cemo <ce...@gmail.com> wrote:
>
>> Hi,
>>
>> Jackson project is using this compiler parameters to reduce jar size.
>>
>>           <debug>true</debug>
>> >           <debuglevel>lines,source</debuglevel>
>>
>>
>> However this is causing a lot pain to debug. Every single artifact has  
>> to
>> be compiled with necessary compiler flags again to be debugged. Before
>> suggesting something I wanted to be sure about that. Is there any  
>> practice
>> to distribute artifacts with and without debug info? The first thing  
>> which
>> came to my mind is *classifier. *Is this a good usage? What do you  
>> think?
>>
>> Thanks

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


Re: Releasing artifacts with and without debug info

Posted by Stephen Connolly <st...@gmail.com>.
Well first off I think it would be better to have the full debug info in
the main artifact.... as you can always use tooling to strip debug info as
a consumer

the debug info will have no effect on the transitive dependencies, so from
that PoV having a -nodebug.jar makes sense

Classifier would seem to be appropriate for this case... but I would be
interested to see what others say.

The other thing to keep in mind is that Tatu is a very smart guy... there
is likely a good reason that he's just forgotten which was his primary
reason and the file size is just a secondary reason that is easier to
remember.



On 5 December 2013 07:28, Cemo <ce...@gmail.com> wrote:

> Hi,
>
> Jackson project is using this compiler parameters to reduce jar size.
>
>           <debug>true</debug>
> >           <debuglevel>lines,source</debuglevel>
>
>
> However this is causing a lot pain to debug. Every single artifact has to
> be compiled with necessary compiler flags again to be debugged. Before
> suggesting something I wanted to be sure about that. Is there any practice
> to distribute artifacts with and without debug info? The first thing which
> came to my mind is *classifier. *Is this a good usage? What do you think?
>
> Thanks
>

RE: Releasing artifacts with and without debug info

Posted by Dimitar Gospodinov <ma...@hotmail.com>.
Hi,

We have similar situation on several of our projects - we need to generate fully debugable artifacts and also artifacts stripped from all debuging information, optimized and obfuscated.
To resolve this we use classifiers and profiles.
By default everything is built with full debug information, no optimizations and no obfuscations.
We use classifier "debug" in this case.

To generate fully optimized and obfuscated artifacts, we activate a profile (called release) and this generates artifacts classified as "release".

All unit and functional testing is done against the debug version and it is "skipped" in the release version. 

Best regards,

Dimitar


> From: cemalettin.koc@gmail.com
> Date: Thu, 5 Dec 2013 09:28:53 +0200
> Subject: Releasing artifacts with and without debug info
> To: users@maven.apache.org
> 
> Hi,
> 
> Jackson project is using this compiler parameters to reduce jar size.
> 
>           <debug>true</debug>
> >           <debuglevel>lines,source</debuglevel>
> 
> 
> However this is causing a lot pain to debug. Every single artifact has to
> be compiled with necessary compiler flags again to be debugged. Before
> suggesting something I wanted to be sure about that. Is there any practice
> to distribute artifacts with and without debug info? The first thing which
> came to my mind is *classifier. *Is this a good usage? What do you think?
> 
> Thanks