You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/09/29 11:27:13 UTC

[jira] Closed: (MNG-936) settings.xml : OOD problem

     [ http://jira.codehaus.org/browse/MNG-936?page=all ]
     
Brett Porter closed MNG-936:
----------------------------

    Resolution: Fixed

this was simply a missing mkdir on the writing of plugin-registry.xml.

what probably happened was that you edited cygwin's ~/.m2/settings.xml. That was ignored, as user.home is c:\documents and settings\mak

It tried to create user.home\.m2\plugin-registry.xml but .m2 didn't exist.

After that, it also used that for the repository.

> settings.xml <localRepository/> : OOD problem
> ---------------------------------------------
>
>          Key: MNG-936
>          URL: http://jira.codehaus.org/browse/MNG-936
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core, design
>     Versions: 2.0-beta-1
>  Environment: cygwin 5.1 on xp professional sp2
>     Reporter: bmak
>     Assignee: Brett Porter
>     Priority: Minor
>      Fix For: 2.0-beta-3

>
> Original Estimate: 30 minutes
>        Time Spent: 15 minutes
>         Remaining: 0 minutes
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org