Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-559

Warn if overriding the project's artifact's file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.12.0
    • None

    Description

      The use case is the following:

      • a module needs to consume (unpack) another module with resources
      • the consumed module thus specifies the jar goal to be run at compile time or before
      • the unpack fails because the artifact's file has been reset to ${basedir}/target/classes by the m-compiler-p

      Diagnosing this problem took quite some time and debugging to understand what was happening.
      A warning in m-compiler-p to (at least) warn the user that something weird is going on would be welcomed. The other option is to not override and warn or reject (because compiling after the artifact has been packaged is quite unexpected).

      I'm not sure why this would be responsibility of the m-compiler-p to actually set the artifact's file to ${basedir}/target/classes, as this could also be done by m-resource-p which also writes to that directory, or even earlier, when starting a given project build, by maven-core itself.

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              bmarwell Benjamin Marwell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: