Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0-beta-1
-
None
-
cygwin 5.1 on xp professional sp2
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
- is duplicated by
-
MNG-941 Deletion of ~/.m2 directory prevents (re)creation of plugin-registry.xml file with java.io.FileNotFoundException
- Closed