Subversion & Flex Builder 2

I use Tortoise SVN as a Subversion client on my box. Flex Builder 2 however copies all dependencies into the bin directory upon compiling. This wreak’s havoc with Tortoise because it gets confused why dupilcate .svn directories are in the bin folder. There is currently no way to tell Flex Builder 2 (plugin or standalone) not to copy .svn directories.

Joe Berkovitz suggested I create an ANT task. You can’t use ANT with the Flex Builder 2 standalone, so I uninstalled it, and installed the plugin for Eclipse 3.1.

I then created the ANT task, but it didn’t work. Apparently ANT filters the delete task for .svn directories, among other things. So, you actually have to opt-out by using the defaultexcludes=’no’ attribute. Lost 4 hours on that one until I read the documentation for the task top to bottom and found it, “If you’re shiz doesn’t work, here’s why.”

Anyway, here’s the task; it’ll delete all .svn directories in your bin folder including all sub-directories. Use at your own risk, I cannot be held liable for you deleting your project by accident.

<target name="deleteSVN">
<delete includeEmptyDirs="true">
<fileset dir="${basedir}/bin" includes="**/.svn/**" defaultexcludes="no" />
</delete>
</target>

Comments

6 responses to “Subversion & Flex Builder 2”

  1. Wayne Graham Avatar
    Wayne Graham

    There’s a lot safer way to do this with the SvnAnt task (http://subclipse.tigris.org/svnant.html). Instead of deleting, you use the export task which allows you to keep the SVN files you need for your repo, but have a ‘clean’ copy for deployment.

  2. Simeon Avatar

    I dont know if it would solve your problem or not, but since you are now in eclipse you should really look into subclipse. http://subclipse.tigris.org.

    The guys on the project are great and having all your team workflow inside the ide is amazing. I couldnt dream of life without it :)

  3. JesterXL Avatar

    Thanks guys, I’ll definately check out Subclipse!

  4. Aral Avatar

    Nice one Jesse — I can put this to use right away :) Shame about the Ant issue with the standalone.

  5. Carlos Rovira Avatar

    The problem with FB2 standalone is that you can’t use any external plugin with the installation. I don’t know what’s the problem but this behaviour goes against the eclipse philosophy

  6. ggg Avatar
    ggg

    gggggggggggggggg