AAVSO / VStar

VStar is a visualisation and analysis tool for variable star data brought to you by AAVSO
https://www.aavso.org/vstar
GNU Affero General Public License v3.0
9 stars 3 forks source link

ant clean target fails on Windows #360

Closed dbenn closed 1 year ago

dbenn commented 1 year ago

@mpyat2 said in #354 re: a change on June 1 2023:

...in which the 'rm' call was included in the 'clean' target of the build.xml. It seems I have never executed 'ant clean' since then and have not noticed it. Today I executed 'ant clean', which gave me a (non-critical) error:

C:\Personal\Projects\VStarGIT\VStar>ant clean
Buildfile: C:\Personal\Projects\VStarGIT\VStar\build.xml

clean:
     [exec] Execute failed: java.io.IOException: Cannot run program "rm" (in directory "C:\Personal\Projects\VStarGIT\VStar"): CreateProcess error=2

BUILD SUCCESSFUL
Total time: 5 seconds

'rm' does not exist in Windows. There is an almost equivalent to rm -rf command rd /s /q Well, nothing fatal, some violation of perfection only.

dbenn commented 1 year ago

The section of build.xml is:

    <!-- succeeeds where including VStar.app fileset or dirset above does not -->
    <exec failifexecutionfails="no" failonerror="no" executable="rm">
        <arg value="-rf" />
        <arg value="VStar.app" />
    </exec>

In principle it should not be necessary and I'm surprised that failifexecutionfails="no" doesn't have the desired effect. I could try putting VStar.app back in as a fileset again.