You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ionut Bilica (Jira)" <ji...@apache.org> on 2022/02/10 11:05:00 UTC

[jira] [Created] (MNG-7411) Artifact with dependencies to not pass transitive dependencies forward

Ionut Bilica created MNG-7411:
---------------------------------

             Summary: Artifact with dependencies to not pass transitive dependencies forward 
                 Key: MNG-7411
                 URL: https://issues.apache.org/jira/browse/MNG-7411
             Project: Maven
          Issue Type: New Feature
          Components: Artifacts and Repositories
            Reporter: Ionut Bilica


Case:

ProjectA needs to package ProjectB inside in an assembly. So ProjectA declares ProjectB as a dependency.
ProjectB (type pom) produces a zip artifact, containing all needed dependencies inside.
My issue is that, when declaring ProjectB as dependency of ProjectA, ProjectA receives all transitive dependencies of ProjectB.
Is there a way to have ProjectB publish its zip artifact with a pom which has no dependencies? 

I'm not after quick fixes (optional, exclude, provided, etc. they are not meant for this use case). I want to learn the proper way maven was intended to be used.
One project has dependencies (for compilation, for packaging), but the artifact it produces should not declare dependencies for being used by another project, because it has all it needs.

When a plugin attaches an artifact, it is attached to the same pom of the project producing it. What's the proper way to produce a "with dependencies" artifact which would not declare dependencies in the pom it installs in the maven repo, but has the dependencies in the pom which with it is built?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)