Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-421

archetype:crawl goal does not fail when it cannot write catalog file

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Auto Closed
    • 2.2
    • None
    • Archetypes
    • 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] ------------------------------------------------------------------------

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            alexanderz Alexander Zobkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment