Search code examples
ruby-on-railsjrubysymlinkwarbler

JRuby - Warbler does not preserve symbolic links


When packaging the application using warbler, the symbolic links are lost and the actual contents the symlink points to are packaged as part of the WAR.

In my case, I have a symlink from public/images/upload to /var/myproject/upload. After I deploy the war in tomcat, in the exploded folder public/images/upload has all the contents of /var/myproject/upload copied to it instead of linking to the folder.

UPDATE: My questions is "will warbler retain the symbolic links inside the project when deployed as a war?"

Environment Info:

jruby 1.6.2 (ruby-1.8.7-p330) | warbler 1.3.1 | Cent OS 5.5 | Java SE "1.6.0_26"


Solution

  • Warbler does not support symbolic links currently, so it tries to copy its contents. Your best bet is to configure Warbler to ignore the link and post process the .war file with some other program that would store the link.

    Feel free to file a feature request for this, or better, submit a patch/pull request.