Maven
  1. Maven
  2. MNG-257

issues to resolve on the packaging vs type mismatch

    Details

    • Number of attachments :
      0

      Description

      ok, so we have packaging which specifies how the artifact will be packaged, and there is only one of those per POM. type is used in a dependency, and will always get the same POM, but might get a different artifact from the repository (eg, the javadocs, sources, ejb-client, tld, or a certain type of distribution).

      For released versions this is fine, but there can be problems when it comes to snapshots.

      The version assigned is per POM, rather than per file - so unless they are all deployed together, this will be a problem where getting the latest vesrion may find something missing. This was originally the intention (eg for ejb-clients), but some things will not be published every time.

      Possibly we could have one metadata file per artifact, but this doesn't feel as nice to me.

      We should definitely have:

      • any deployment of a distribution, etc MUST deploy main artifact too and they can all share a version

      Currently we have:

      • any later deployment of just a JAR doesn't deploy things like distributions as they are not attached to it

      The dependencies on distributions for that snapshot will break - which seems fair, as they wouldn't actually be the same as the JAR anyway. You wouldn't want to get old sources, so if you are going to commit to deploying sources - deploy them every time! If not, then maybe it is reasonable not to ever make them available for snapshots.

      I think this is all reasonable. Is this ok?

      Are there any other issues besides this with the mismatch?

        Activity

        Hide
        Brett Porter added a comment -

        this plus the addition of the source plugin would be a nice to have for alpha-2, must have for alpha-3

        Show
        Brett Porter added a comment - this plus the addition of the source plugin would be a nice to have for alpha-2, must have for alpha-3
        Hide
        Brett Porter added a comment -

        other things to note:

        • the repository tool takes the classifier into account, so creates a dummy pom for these, which it shouldn't
        • the main pom may not be correct for the purposes of transitive deps on a secondary artifact: eg assemblies already bundle the dependencies. How to specify which are deps for the primary, and which are deps of others?
        Show
        Brett Porter added a comment - other things to note: the repository tool takes the classifier into account, so creates a dummy pom for these, which it shouldn't the main pom may not be correct for the purposes of transitive deps on a secondary artifact: eg assemblies already bundle the dependencies. How to specify which are deps for the primary, and which are deps of others?

          People

          • Assignee:
            Brett Porter
            Reporter:
            Brett Porter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: