ant task to remove files from a jar

后端 未结 6 574
自闭症患者
自闭症患者 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:04

    I came here looking to use ant as a workaround some short comings in gradle unzip.

    On the off chance someone else is in the same boat.

    Here is an example:

        task antUnzip() << {
    
                ant.jar(destfile : "stripped.jar") {
                    zipfileset (src : "full.jar", excludes : "files/to/exclude/**/*.file") {
                    }
                }
    }
    

提交回复
热议问题