views:

30

answers:

1

My project is synced with svn, While deploying to the client, the .svn folders too get included as a part of the build and the resulting war file size is doubled.

is there a way I can specify jar command to ignore .svn folders ?

This is how i specify the command :

jar cvf ../MyProject.war .
+1  A: 

If I read

http://java.sun.com/j2se/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:

  1. stand in your project directory
  2. do 'svn export dirname'
  3. cd into dirname
  4. run 'jar' in dirname
  5. 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://java.sun.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.

Jacob Oscarson