Java – execute the jar command to exclude files
•
Java
I followed the Java archive tool, but I couldn't find how to exclude folders
For example, I have files in the working copy directory:
workingcopy --src --.svn -- com --.svn --WebContent
I want to compile and create jars from classes under SRC, not including All folders at the beginning of the SVN directory I want to run it from CMD, like Jar - CF test Jar, etc
What shall I do?
Solution
This may be a practical solution to your problem: it does not exclude the subversion directory (directory), but only includes class files (assuming you do not put class files under version control):
jar -cf test.jar *.class
Further enhancement: separation of code from class files You don't want to check class files anyway (build artifacts):
workingcopy --src --.svn -- com // only *.java files in here and below --.svn --WebContent --bin --com // only *.class files in here and below
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码