Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Auto Closed
-
2.2
-
None
-
None
-
RHEL 5.8, JDK 1.6 update 26, Maven 3.0.3
Description
The archetype:crawl goal does not fail when it cannot write catalog file.
To reproduce the issue execute the following command:
mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:crawl -Dcatalog=/path/which/does/not/exist/archetype-catalog.xml
And you will see that the goal execution is considered by Maven as success in despite of java.io.FileNotFoundException thrown from inside of CrawlRepositoryMojo. Additionally the issues can be reproduced in case of zero free disk space where you are trying to write catalog file.
[INFO] Scanning /home/zobkov/.m2/repository/asm/asm/2.2.3/asm-2.2.3.jar
[INFO] Scanning /home/zobkov/.m2/repository/asm/asm/2.2/asm-2.2.jar
[WARNING] Catalog can not be writen to /path/which/does/not/exist/archetype-catalog.xml
java.io.FileNotFoundException: /path/which/does/not/exist/archetype-catalog.xml (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.900s
[INFO] Finished at: Wed Nov 14 21:16:00 MSK 2012
[INFO] Final Memory: 7M/184M
[INFO] ------------------------------------------------------------------------