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

Silence unnecessary legacy local repository warning

    Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 3.2.5, 3.3.3, 3.5.0
    • Fix Version/s: None
    • Component/s: Command Line
    • Labels:
      None

      Description

      Having been burned on several occasions by the new local repository behaviour, which in effect scopes artifacts by their origin (when first stored in the local repository), I was delighted by the introduction of the -llr command line option in 3.0.3. I now use this behaviour for all builds to avoid the build instability caused by remote repository migration. This avoids the need to start each build with:

      find ~/.m2/repository -name "_*.repositories" -exec rm -f {} \;
      

      Given that users of -llr have made an informed choice to do so, please remove the (in my view unnecessary) warning that it generates:

      [WARNING] Disabling enhanced local repository: using legacy is strongly discouraged to ensure build reproducibility.
      

      Kind regards,
      Ben.

        Issue Links

          Activity

          Hide
          bencaradocdavies Ben Caradoc-Davies added a comment -

          MNG-5185 and MNG-5181 are in the Issue Links section above. The core problem is that the new repository behaviour is stateful: it remembers the repository of origin of an artifact. I know this is by design; the consequences of this decision are noted in this issue and in the two linked issues. It is not the end of the world, but any solution that requires direct modification of a Maven repository using find and rm is an indication that something is wrong with the Maven implementation.

          Show
          bencaradocdavies Ben Caradoc-Davies added a comment - MNG-5185 and MNG-5181 are in the Issue Links section above. The core problem is that the new repository behaviour is stateful: it remembers the repository of origin of an artifact. I know this is by design; the consequences of this decision are noted in this issue and in the two linked issues. It is not the end of the world, but any solution that requires direct modification of a Maven repository using find and rm is an indication that something is wrong with the Maven implementation.
          Hide
          rfscholte Robert Scholte added a comment -

          Agreeing with Arnaud. Legacy repository is not reliable and should be removed in the end. Would be good to link to the issues which describe where the current repository fails. Those should be fix instead of discussing the loglevel of this message.

          Show
          rfscholte Robert Scholte added a comment - Agreeing with Arnaud. Legacy repository is not reliable and should be removed in the end. Would be good to link to the issues which describe where the current repository fails. Those should be fix instead of discussing the loglevel of this message.
          Hide
          aheritier Arnaud HERITIER added a comment -

          From my POV the legacy mode should be deprecated one day and removed thus the info / warning / notice ?

          The new repository behaviour causes local snapshot builds to be ignored and breaks remote repository migrations.

          There are issues open about these problems ? (I agree, I don't really like it also myself and have various behaviors which were "borderline")

          Show
          aheritier Arnaud HERITIER added a comment - From my POV the legacy mode should be deprecated one day and removed thus the info / warning / notice ? The new repository behaviour causes local snapshot builds to be ignored and breaks remote repository migrations. There are issues open about these problems ? (I agree, I don't really like it also myself and have various behaviors which were "borderline")
          Hide
          bencaradocdavies Ben Caradoc-Davies added a comment - - edited

          On 3.5.0 I see this:

          [INFO] Disabling enhanced local repository: using legacy is strongly discouraged to ensure build reproducibility.
          

          This is still a warning, even though the log level has been reduced. What I really wanted was the removal of this unnecessary complaint. Downgrading to INFO does not achieve this. Can we downgrade further to DEBUG? Or get rid of it entirely?

          The new repository behaviour causes local snapshot builds to be ignored and breaks remote repository migrations.

          Show
          bencaradocdavies Ben Caradoc-Davies added a comment - - edited On 3.5.0 I see this: [INFO] Disabling enhanced local repository: using legacy is strongly discouraged to ensure build reproducibility. This is still a warning, even though the log level has been reduced. What I really wanted was the removal of this unnecessary complaint. Downgrading to INFO does not achieve this. Can we downgrade further to DEBUG ? Or get rid of it entirely? The new repository behaviour causes local snapshot builds to be ignored and breaks remote repository migrations.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-3.x #1515 (See https://builds.apache.org/job/maven-3.x/1515/)
          MNG-5883 Silence unnecessary legacy local repository warning (schulte: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=1e2a80eced0f01c182458a2c7e7919634fa632f6)

          • (edit) maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-3.x #1515 (See https://builds.apache.org/job/maven-3.x/1515/ ) MNG-5883 Silence unnecessary legacy local repository warning (schulte: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=1e2a80eced0f01c182458a2c7e7919634fa632f6 ) (edit) maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
          Hide
          stephenc Stephen Connolly added a comment -

          Maven 3.4.0 has been dropped. See this thread for more details.

          This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.

          Show
          stephenc Stephen Connolly added a comment - Maven 3.4.0 has been dropped. See this thread for more details. This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.
          Hide
          bencaradocdavies Ben Caradoc-Davies added a comment -

          Thanks very much. I will be sure to test when 3.4.0 is released.

          Show
          bencaradocdavies Ben Caradoc-Davies added a comment - Thanks very much. I will be sure to test when 3.4.0 is released.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in maven-3.x #1196 (See https://builds.apache.org/job/maven-3.x/1196/)
          MNG-5883 Silence unnecessary legacy local repository warning (schulte: rev a814be56387b34d4665a080498441c351aae973f)

          • maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in maven-3.x #1196 (See https://builds.apache.org/job/maven-3.x/1196/ ) MNG-5883 Silence unnecessary legacy local repository warning (schulte: rev a814be56387b34d4665a080498441c351aae973f) maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java

            People

            • Assignee:
              schulte77 Christian Schulte
              Reporter:
              bencaradocdavies Ben Caradoc-Davies
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Development