Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-8138

Maven internal state should not allow to become "broken"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Core
    • None

    Description

      It seems by certain goal combinations we can make Maven Project instance state end up in "wrong" state. Example:

      • create a packaging=pom project
      • invoke jar:jar deploy:deploy

      This will result in following:

      • MavenProject has packaging=pom
      • but, jar:jar will create (an empty) JAR and make it "main artifact" basically making JAR as main artifact with ".pom" extension (following what packaging artifact handler tells)
      • deploy will happily deploy the jar as pom (as it is the only one artifact in project, but backing file is empty JAR, no "replacement" happens here)

      Multiple issues here:

      • Maven should "protect" MavenProject instance IMHO
      • jar:jar should not (or core should not allow) to "break the state"
      • m-deploy-p should figure out this situation: we deal with two artifacts (POM and "main JAR") but due packaging they end up on same URL?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cstamas Tamas Cservenak
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: