Can I instruct the jar command to ignore .svn folders?
My project is synced with svn. While deploying to the client, the .svn folders get included as a part of the build and the resulting war file size is doubled.
Is there a开发者_Go百科 way I can specify the jar command to ignore .svn folders ?
This is how I use the command :
jar cvf ../MyProject.war .
If I read
http://docs.oracle.com/javase/1.4.2/docs/tooldocs/solaris/jar.html
correctly there is not. On the other hand you can achieve it quite easily using 'svn export' and a temporary directory. (Try 'svn help export' for intro to svn exporting). In short:
- stand in your project directory
- do 'svn export dirname'
- cd into dirname
- run 'jar' in dirname
- remove dirname
Later you'd like to automate this with a shell script or some such.
Update: I now see that the newer version of the docs gives more suggestions and points to strategies when choosing files:
http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/jar.html
Although if I were doing this, I'd still go for 'svn export' since it's a very straight-forward way of adding tree's.
精彩评论