You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by PJ Fanning <fa...@yahoo.com.INVALID> on 2022/09/04 17:05:46 UTC

maven-shade-plugin: excluding transitive dependencies from shade jar but having them appear in the pom.xml for the shade jar?

Hi everyone,
Apologies if this has been answered before but I searched around and couldn't find an answer.
For Apache Hadoop, I'm looking to shade Apache Avro jar, relocating the avro classes to a new package name.
This new jar would be published to Maven Central and used by Hadoop.
The aim is not to include Jackson and other classes from transitive dependencies of Avro but that the pom file for the new jar would include the transitive dependencies from Avro.

My PR is at https://github.com/apache/hadoop-thirdparty/pull/21

Neither the pom.xml nor the dependency-reduced-pom.xml have the transitive dependencies listed.

Would anyone be able to suggest how the dependencies excluded from the shade jar can be exposed as dependencies in the pom.xml?

Regards,
PJ

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


Re: maven-shade-plugin: excluding transitive dependencies from shade jar but having them appear in the pom.xml for the shade jar?

Posted by PJ Fanning <fa...@yahoo.com.INVALID>.
Thanks Delany. That was exactly what I was looking for.






On Sunday 4 September 2022 at 18:44:18 IST, Delany <de...@gmail.com> wrote: 





hi PJ. You can do like this:

<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
  <includes>
    <include>org.apache.avro:avro</include>
  </includes>
</artifactSet>

Kind regards,
Delany


On Sun, 4 Sept 2022 at 19:05, PJ Fanning <fa...@yahoo.com.invalid>
wrote:

> Hi everyone,
> Apologies if this has been answered before but I searched around and
> couldn't find an answer.
> For Apache Hadoop, I'm looking to shade Apache Avro jar, relocating the
> avro classes to a new package name.
> This new jar would be published to Maven Central and used by Hadoop.
> The aim is not to include Jackson and other classes from transitive
> dependencies of Avro but that the pom file for the new jar would include
> the transitive dependencies from Avro.
>
> My PR is at https://github.com/apache/hadoop-thirdparty/pull/21
>
> Neither the pom.xml nor the dependency-reduced-pom.xml have the transitive
> dependencies listed.
>
> Would anyone be able to suggest how the dependencies excluded from the
> shade jar can be exposed as dependencies in the pom.xml?
>
> Regards,
> PJ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: maven-shade-plugin: excluding transitive dependencies from shade jar but having them appear in the pom.xml for the shade jar?

Posted by Delany <de...@gmail.com>.
hi PJ. You can do like this:

<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
  <includes>
    <include>org.apache.avro:avro</include>
  </includes>
</artifactSet>

Kind regards,
Delany


On Sun, 4 Sept 2022 at 19:05, PJ Fanning <fa...@yahoo.com.invalid>
wrote:

> Hi everyone,
> Apologies if this has been answered before but I searched around and
> couldn't find an answer.
> For Apache Hadoop, I'm looking to shade Apache Avro jar, relocating the
> avro classes to a new package name.
> This new jar would be published to Maven Central and used by Hadoop.
> The aim is not to include Jackson and other classes from transitive
> dependencies of Avro but that the pom file for the new jar would include
> the transitive dependencies from Avro.
>
> My PR is at https://github.com/apache/hadoop-thirdparty/pull/21
>
> Neither the pom.xml nor the dependency-reduced-pom.xml have the transitive
> dependencies listed.
>
> Would anyone be able to suggest how the dependencies excluded from the
> shade jar can be exposed as dependencies in the pom.xml?
>
> Regards,
> PJ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>