You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eugene Koifman <ek...@hortonworks.com> on 2014/07/14 19:53:32 UTC
maven shade/artifact naming help
Hi,
I have an existing multi-module project. A module A (i.e. artifactId=A)
uses shade plugin to create an uber jar. The shade plug in config doesn't
retain the original (slim) jar so the only artifact produced/published from
this module is A.jar which is the uber jar.
Now I need to produce a 'slim' jar (lets call it A-core.jar) which only has
the classes from module A. Since this was set up several releases ago I
have to keep A.jar as a fat jar to preserve backwards compatibility.
(I can easily make shade produce A.jar as the thin jar and A-uber.jar (or
any other name) as the fat jar, but this is not acceptable.)
Is there some way to make shade plug in do that?
--
Thank youm,
Eugene
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: maven shade/artifact naming help
Posted by Eugene Koifman <ek...@hortonworks.com>.
Thank you. I did make it work with maven-jar-plugin.
While you are right that this is not the right design, I have legacy uses
to deal with and can't do the right thing
On Mon, Jul 14, 2014 at 12:36 PM, Karl Heinz Marbaise <kh...@gmx.de>
wrote:
> Hi Eugene,
>
>
> First i don't see the need to continue the wrong way...So you should
> change it...
>
> If you really need to go the wrong way i would suggest to use the
> maven-jar-plugin with a special configuration to create the other jar...
>
> But i can't recommend to continue the wrong way...
>
> By using the maven-shade-plugin you can't change that wrong way which you
> have decided to go a time a go...
>
> If the way you have already gone is not acceptable......
>
> Kind regards
> Karl-Heinz Marbaise
>
>
> On 7/14/14 8:55 PM, Eugene Koifman wrote:
>
>> Thank you for the reply but it doesn't answer my question.
>>
>> "The shade plug in config doesn't
>> retain the original (slim) jar so the only artifact produced/published
>> from
>> this module is A.jar which is the uber jar." - this is a statement about
>> the current pom in the project, not the capabilities of the shade plug in.
>>
>> Adding "shadedArtifactAttached" will create the slim jar called A.jar and
>> an uber jar called A-shaded.jar. Unfortunately, what is needed is an uber
>> jar called A.jar and a slim jar called anything.
>>
>>
>> On Mon, Jul 14, 2014 at 11:48 AM, Karl Heinz Marbaise <kh...@gmx.de>
>> wrote:
>>
>> Hi Eugene,
>>>
>>>
>>> Hi,
>>>>
>>>
>>> I have an existing multi-module project. A module A (i.e. artifactId=A)
>>>> uses shade plugin to create an uber jar. The shade plug in config
>>>> doesn't
>>>> retain the original (slim) jar so the only artifact produced/published
>>>> from
>>>> this module is A.jar which is the uber jar.
>>>>
>>>>
>>> Which is not true, cause you can configure the maven-shade-plugin to
>>> produce both artifacts via:
>>>
>>> <shadedArtifactAttached>true</shadedArtifactAttached>
>>>
>>> http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html
>>>
>>>
>>>
>>> Now I need to produce a 'slim' jar (lets call it A-core.jar) which only
>>>> has
>>>> the classes from module A. Since this was set up several releases ago
>>>> I
>>>> have to keep A.jar as a fat jar to preserve backwards compatibility.
>>>>
>>>> (I can easily make shade produce A.jar as the thin jar and A-uber.jar
>>>> (or
>>>> any other name) as the fat jar, but this is not acceptable.)
>>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Thanks,
Eugene
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: maven shade/artifact naming help
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Eugene,
First i don't see the need to continue the wrong way...So you should
change it...
If you really need to go the wrong way i would suggest to use the
maven-jar-plugin with a special configuration to create the other jar...
But i can't recommend to continue the wrong way...
By using the maven-shade-plugin you can't change that wrong way which
you have decided to go a time a go...
If the way you have already gone is not acceptable......
Kind regards
Karl-Heinz Marbaise
On 7/14/14 8:55 PM, Eugene Koifman wrote:
> Thank you for the reply but it doesn't answer my question.
>
> "The shade plug in config doesn't
> retain the original (slim) jar so the only artifact produced/published from
> this module is A.jar which is the uber jar." - this is a statement about
> the current pom in the project, not the capabilities of the shade plug in.
>
> Adding "shadedArtifactAttached" will create the slim jar called A.jar and
> an uber jar called A-shaded.jar. Unfortunately, what is needed is an uber
> jar called A.jar and a slim jar called anything.
>
>
> On Mon, Jul 14, 2014 at 11:48 AM, Karl Heinz Marbaise <kh...@gmx.de>
> wrote:
>
>> Hi Eugene,
>>
>>
>>> Hi,
>>
>>> I have an existing multi-module project. A module A (i.e. artifactId=A)
>>> uses shade plugin to create an uber jar. The shade plug in config doesn't
>>> retain the original (slim) jar so the only artifact produced/published
>>> from
>>> this module is A.jar which is the uber jar.
>>>
>>
>> Which is not true, cause you can configure the maven-shade-plugin to
>> produce both artifacts via:
>>
>> <shadedArtifactAttached>true</shadedArtifactAttached>
>>
>> http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html
>>
>>
>>
>>> Now I need to produce a 'slim' jar (lets call it A-core.jar) which only
>>> has
>>> the classes from module A. Since this was set up several releases ago I
>>> have to keep A.jar as a fat jar to preserve backwards compatibility.
>>>
>>> (I can easily make shade produce A.jar as the thin jar and A-uber.jar (or
>>> any other name) as the fat jar, but this is not acceptable.)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven shade/artifact naming help
Posted by Eugene Koifman <ek...@hortonworks.com>.
Thank you for the reply but it doesn't answer my question.
"The shade plug in config doesn't
retain the original (slim) jar so the only artifact produced/published from
this module is A.jar which is the uber jar." - this is a statement about
the current pom in the project, not the capabilities of the shade plug in.
Adding "shadedArtifactAttached" will create the slim jar called A.jar and
an uber jar called A-shaded.jar. Unfortunately, what is needed is an uber
jar called A.jar and a slim jar called anything.
On Mon, Jul 14, 2014 at 11:48 AM, Karl Heinz Marbaise <kh...@gmx.de>
wrote:
> Hi Eugene,
>
>
> > Hi,
>
>> I have an existing multi-module project. A module A (i.e. artifactId=A)
>> uses shade plugin to create an uber jar. The shade plug in config doesn't
>> retain the original (slim) jar so the only artifact produced/published
>> from
>> this module is A.jar which is the uber jar.
>>
>
> Which is not true, cause you can configure the maven-shade-plugin to
> produce both artifacts via:
>
> <shadedArtifactAttached>true</shadedArtifactAttached>
>
> http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html
>
>
>
>> Now I need to produce a 'slim' jar (lets call it A-core.jar) which only
>> has
>> the classes from module A. Since this was set up several releases ago I
>> have to keep A.jar as a fat jar to preserve backwards compatibility.
>>
>> (I can easily make shade produce A.jar as the thin jar and A-uber.jar (or
>> any other name) as the fat jar, but this is not acceptable.)
>>
>> Is there some way to make shade plug in do that?
>>
>>
> Kind regards
> Karl-Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Thanks,
Eugene
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: maven shade/artifact naming help
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Eugene,
> Hi,
> I have an existing multi-module project. A module A (i.e. artifactId=A)
> uses shade plugin to create an uber jar. The shade plug in config doesn't
> retain the original (slim) jar so the only artifact produced/published from
> this module is A.jar which is the uber jar.
Which is not true, cause you can configure the maven-shade-plugin to
produce both artifacts via:
<shadedArtifactAttached>true</shadedArtifactAttached>
http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html
>
> Now I need to produce a 'slim' jar (lets call it A-core.jar) which only has
> the classes from module A. Since this was set up several releases ago I
> have to keep A.jar as a fat jar to preserve backwards compatibility.
>
> (I can easily make shade produce A.jar as the thin jar and A-uber.jar (or
> any other name) as the fat jar, but this is not acceptable.)
>
> Is there some way to make shade plug in do that?
>
Kind regards
Karl-Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org