ant task to remove files from a jar

后端 未结 6 582
自闭症患者
自闭症患者 2020-12-13 13:45

How to write an ant task that removes files from a previously compiled JAR?

Let\'s say the files in my JAR are:

aaa/bbb/ccc/Class1
aaa/bbb/ccc/Class2         


        
6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 14:15

    If a jar-file capable archiver program, like e.g. "zip" on Linux, is available, the task can be done by

                
                
                
    
    
    

    Subtree deletion depends on the capabilities of the used archiver.
    The "os" attribute of the Ant "exec" task allows to use different archivers on different OS's.

提交回复
热议问题