Please make PlantUML gracefully handle generated image files when they are read-only

0 votes
asked Oct 17, 2013 in Wanted features by anonymous
PlantUML should have an option to overwrite read-only files when new images are generated.

Many version control systems leave files in a read-only state. PlantUML should be able to overwrite these files if desired.

Suggestion: PlantUML should check if any of the image files being generated exist and are read-only. If they are, it should prompt the user before overwriting with something like the following:

The file "Image.jpg" is read-only. Do you want to overwrite it?
Yes / No / Overwrite All / Overwrite None

1 Answer

0 votes
answered Oct 18, 2013 by plantuml (295,000 points)

Hello,

We have added a flag -overwrite in the command line. You can use the following beta
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

java -jar plantuml.jar -overwrite -verbose foo1.txt

We have also added a flag in the ant task:

<target name="main">
    <plantuml dir="./src" overwrite="true" />
</target>


Is it ok for you ?
 

commented Oct 18, 2013 by anonymous
Thank you for your prompt response. This solution does simplify my usage of PlantUML.

However, without the "-overwrite" command-line option, PlantUML is still not handling read-only files gracefully. In both the command prompt and the GUI interface, there is no indication or warning that the read-only UML images were not generated. It just appears that PlantUML does not work.
commented Oct 18, 2013 by plantuml (295,000 points)
Ok, you can try this new version:
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Without the flag "-overwrite", the command line displays an error message. In the GUI, images are simply not displayed. This not perfect : an error message would probably be better.
...