You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alexander Zobkov (JIRA)" <ji...@codehaus.org> on 2012/11/14 19:24:13 UTC
[jira] (ARCHETYPE-421) archetype:crawl goal does not fail when it
cannot write catalog file
Alexander Zobkov created ARCHETYPE-421:
------------------------------------------
Summary: archetype:crawl goal does not fail when it cannot write catalog file
Key: ARCHETYPE-421
URL: https://jira.codehaus.org/browse/ARCHETYPE-421
Project: Maven Archetype
Issue Type: Bug
Components: Archetypes
Affects Versions: 2.2
Environment: RHEL 5.8, JDK 1.6 update 26, Maven 3.0.3
Reporter: Alexander Zobkov
Priority: Minor
Attachments: crawl-mojo-filenotfound-exception.txt, crawl-mojo-ioexception.txt
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] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira