ant task to remove files from a jar

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

    I am not sure if there a direct solution for your requirement. I would recommend to explode the jar to some temp directory and then remove unwanted class files. Finally create a new jar with required class files.

    Reference links:

    http://ant.apache.org/manual/Tasks/unzip.html

    http://ant.apache.org/manual/Tasks/delete.html

    http://ant.apache.org/manual/Tasks/jar.html

提交回复
热议问题