开发者

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:

  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://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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜