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

settings.xml <localRepository/> : OOD problem

    XMLWordPrintableJSON

    Details

      Description

      with the -e option set I get the attached stack trace and more.

      you dont need to be running under cygwin to reproduce. Just put windows paths in the example, and not unix paths.

      under cywin, reproduce the problem as follows:

      edit settlings.xml to include the <localRepository>/tmp/repo</localRepository>

      from the "getting started" link, use the following command:

      m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

      m2 will create the directory tree :

      /tmp/repo/org/apache/maven/plugins

      but not complete it or any of the other dirtrees needed to run the archetype plugin.

      then the command attempts to find the localRepository using %USERPROFILE% and not the <localRepository/> value.

      To me this shows that <localRepository/> feature has not been implemented via OOD but procedurally, and that the implementation as is fails to create the correct directory tree in the first place.

      I see it as an OOD issue because there obviously is not a one-stop shopping solution to find <localRepository/> value. in one phase of the command execution, it attempted to deposit plugngs in to the correct cache location. In another phase of the m2 command execution, it skips trying to find the plugins using the <localRepository/> value.

      === partial stack trace ==-
      Caused by: java.io.FileNotFoundException: C:\Documents and Settings\mak\.m2\plugin-registry.xml (The system cannot find the path specified)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at java.io.FileWriter.<init>(FileWriter.java:73)
      at org.apache.maven.plugin.version.DefaultPluginVersionManager.writeUser
      Registry(DefaultPluginVersionManager.java:573)
      ... 19 mor

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brettporter Brett Porter
                Reporter:
                txusul bob makowski
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.25h Time Not Required
                  0.25h