0
votes

I am having a lot of trouble while syncing my Flash Builder Actionscript project with Subversion. I have read that the output folders bin, bin-debug and html-template should not be checked in to the repository. The project bin folder contains a lot of XML files and assets that other project members needs to access. The problem is that Flash builder ignores it.

Is there a way of setting up Flash Builder to override the ignored bin folder? If not, what other approach should I consider? Different folder structures?

  • /src (commited)
  • /bin (ignored)
  • /swc (commited)

I would really like to override the default "DO NOT COMMIT YOUR DEPLOY FOLDER" setting. Bounty it is.

5

5 Answers

2
votes

Yes those folders should not be committed. A common approach is to add another folder to keep all your runtime assets in which you would commit. Then just add that folder to the source path and by default Flash Builder enables "Copy non-embedded files to output folder" in the compiler options section of the project properties so those assets all get automatically copied to the bin folder for your build.

1
votes

So here are a couple of ways I've found to get around this limitation.


First option ... different svn client

Not optimal but you could use an external SVN client (like TortoiseSVN) instead of the eclipse SVN client. Not the ideal solution but since Tortoise and the eclipse SVN clients use the same SVN config files you can use the built in client to check in your src folder and only use Tortoise to check in the output folder.


A Second option... eclipse external program xcopy

Create another folder say bin-checkin in your project then create an external tool configuration in eclipse to copy the data over.... (Run -> External Tools menu)

Location:

C:\windows\system32\xcopy.exe

Working Directory:

 ${workspace_loc:/temp/bin-debug}

Arguments:

*.* ${workspace_loc:/temp/bin-checkin} /e /y

You can then just run the external program from the menu to copy the data over because this folder is not the output folder SVN will let you check it in.


Third option.... eclipse project Builder xcopy

(and this is the best because it's automatic)

do the same as the second option above but set it up as a builder instead of an external program This option is under builders in the project properties.

Here you use the same settings as above (using xcopy) you set it up on the main tab on the "Edit launch configuration properties" window, when you create a new Builder.

Once you've set that up you then switch to the Build Options tab in this same dialog and check the options you want such as "During manual builds" or "During auto builds", "After a clean" it depends on your preference. If you choose "During auto builds" make sure you click the "Specify Resources..." button and select your bin-debug folder. (this is the folder that will be monitored to detect when the auto build needs to be triggered)

Note: I've had best success setting the After a Clean, During manual, and During auto.

1
votes

I found this information here - http://blogs.adobe.com/jasonsj/2010/03/installing_subclipse_in_flash_builder_4.html. I hope it helps.

By Will - 5:04 AM on October 13, 2010 Reply

This is all good and well, but Flash Builder constantly recreates the bin-debug folder for AS/Flex projects destroying the .svn folder inside. This makes the bin-debug folder impossible to version. Does Adobe have any plans on fixing this? It’s extremely frustrating.

By Jason San Jose - 5:15 AM on October 13, 2010 Reply

This is intentional. bin-debug should only contain derived files (compiled or otherwise copied from elsewhere) and is not intended to be versioned. You can right click on bin-debug, open properties, and uncheck the Derived property. This should allow Subclipse to pick it up for version control, but this is not typically recommended. Server projects are a different story if you have server-specific resources in your bin-debug folder.

For what it's worth, I agree with not versioning those folders - it's unnecessary. I understand that, in your case, what's done is done. However, upon starting a new project, it might be worthwhile to set up a "lib" folder to place your assets and XML files into, and have everybody follow that convention. Good luck.

0
votes

Why not externalize those assets in to a separate root folder (of your project) ? Checking in bin-debug folder is a hassle , but if you keep a separate folder and use ant build to package it in to .war, then I do not see any issue.(with checking in this folder) (In fact that what we do, since sometimes we want to deploy our applications as portlets)

0
votes

Use svn:ignore on the directory. See this SO question How do I ignore a directory with SVN? Note that if those directories are already checked in, you first have to remove them from the repository.