Importing a subversion repository - apache-flex

I'm having problems: I create a new repository in Subclipse that points to a URL. When I check out the code and it creates a Flex Builder project, I am getting errors that relate to issues with the .actionscriptProperties and .flexProperties files.
So, I was told to just create a new FB project and point the src folder to where SVN is on my machine.
I'm new at this. But I'm guessing that until I do something like import my repository....it's nowhere on my machine. But when I imported it, it appeared to try and take every existing FB project I had and add it to SVN. That's not what I want.
How do I do this right? What am I missing?
Thanks for any helpful tips!

right click in the navigator, new -> other
Under SVN, select Checkout projects from SVN
Select the location of your repo with the FB project, hit next
there should only be one radio button available, if not, you didn't select the correct trunk location with the project files
Check "Check out HEAD revision", depth: fully recursive, uncheck ignore externals, check allow unversioned obstructions
click "finish"
If it complains about anything, let me know what the error is. You may have a different default, for instance, if the project was configured using "default SDK" and the project creator's default SDK was different than your default SDK you'd get errors.

Related

android studio adding extern jar library

I would like to add the extern jar library commons-jexl-2.1.1.jar. I copied the jar into the libs/ folder and performed the Add as library... menu point. I don't receive any errors in the code and everything seems to work but when compiling and starting the application I receive the error java.lang.NoClassDefFoundError: org.apache.commons.jexl2.JexlEngineon this line private JexlEngine jexl = new JexlEngine();
Does anyone know what I've missed?
Unfortunately, that menu command is doing the wrong thing for Gradle-based projects, which I assume yours is. (Gradle-based projects are what you get when you create new projects in Android Studio). I've filed bug https://code.google.com/p/android/issues/detail?id=62249 to request implementing this menu command properly for these projects, or at a minimum disabling it until it's implemented to prevent confusion.
In the meantime, you can add external JAR dependencies by going through the Project Structure dialog, which will add the appropriate entries to your build.gradle build file. Choose File menu > Project Structure, and click on the "Modules" entry on the left. Choose your module from the middle list, and click on the Dependencies tab on the right. Then click on the + button at the bottom to add a new dependency. Screen shot here:
The + menu has an option for "File dependency" (pictured). You will get a file chooser that will let you select the jar file.
If your dependency is one that can be found in Maven, you may find it more convenient to specify the Maven coordinates; that way, the build system will automatically download the dependency, and you won't have to download and store the JAR manually. To set that up, choose "Maven dependency" from the + menu. You'll get a dialog where you can search to find the proper Maven coordinates for your library. In your case, those coordinates will be "org.apache.commons:commons-jexl:2.1.1#jar"
If you prefer to edit build files by hand, check out your build.gradle file after completing the Project Structure dialog changes to see what it did.
The docs for using Gradle in Android are at http://tools.android.com/tech-docs/new-build-system
courtesy The App Chaps
I've been struggling with the same thing for many hours, trying to get the Gson jar to work no less. I finally cracked it – here are the steps I took:
Put the Gson jar (in my case, gson-2.2.4.jar) into the libs folder
Right click it and hit 'Add as library'
Ensure that compile files('libs/gson-2.2.4.jar') is in your build.gradle file
Do a clean build (you can probably do this fine in Android Studio, but to make sure I navigated in a terminal to the root folder of my app and typed gradlew clean. I'm on Mac OS X, the command might be different on your system
After I did the above three, it started working fine. I think the 'Add as library' step was the one I'd previously missed, and it didn't work until I cleaned it either.
[Edit - added the build.gradle step which is also necessary as others have pointed out]

How can I build for release/distribution on the Xcode 4?

Build for debug is just press on the PLAY symbol, but I don't know how to Build for distribution/release?
The short answer is:
choose the iOS scheme from the
drop-down near the run button from
the menu bar
choose product > archive in the
window that pops-up
click 'validate'
upon successful validation, click
'submit'
You can use command line tool to build the release version. Next to your project folder, i.e.
$ ls
...
Foo.xcodeproj
...
Type the following build command:
$ xcodebuild -configuration Release
The "play" button is specifically for build and run (or test or profile, etc). The Archive action is intended to build for release and to generate an archive that is suitable for submission to the app store. If you want to skip that, you can choose Product > Build For > Archive to force the release build without actually archiving. To find the built product, expand the Products group in the Project navigator, right-click the product and choose to show in Finder.
That said, you can click and hold the play button for a menu of other build actions (including Build and Archive).
XCode>Product>Schemes>Edit Schemes>Run>Build Configuration
They've bundled all the target/build configuration/debugging options stuff into "schemes". The transition guide has a good explanation.
I have a large app that was having problems uploading to the AppStore using the archive method you will find in XCode 4. The activity indicator kept spinning for hours whether I was trying to validate or distribute, so I created a support ticket to Apple. During that process, I found out you could right click on the .app in your Products folder inside the Project Navigator of XCode, and compress the app to submit using the Application Loader 2.5.1. (aka the old method). Only the Debug - iphoneos folder is accessible this way (for now) and once Apple responded, this is what they had to say:
I'm glad to hear that Application Loader has provided you a viable workaround. Discussing this situation internally, we're not sure that submitting the Debug build will pose too much of a problem (so long as it was signed with the App Store distribution profile, as you mentioned it was). The app will likely be slower as the debug switches are turned on and optimizations are turned off for the Debug configuration, though it will still run. App Review will ultimately determine whether or not that's ok, as I'm not sure that's something they check for. You could try reaching out directly to App Review to confirm this, if you wish. However, since App Loader is working for you, I do recommend rebuilding the app with your Release configuration and resubmitting to play it safe. To find your Release build in Xcode 4.x, control-click on the Application Archive on the Archives tab in the organizer, and choose "Show in Finder." Then, control-click on the .xcarchive file in Finder and choose "Show Package Contents." The release built .app file should be located within the /Products/Applications folder.
This was very helpful information for developers who are having problems with the archive method, and my app is now uploading successfully without any concern that it won't run to the best of it's ability.
To set the build configuration to Debug or Release, choose 'Edit Scheme' from the 'Product' menu.
Then you see a clear choice.
The Apple Transition Guide mentions a button at the top left of the Xcode screen, but I cannot see it in Xcode 4.3.
That part is now located under Schemes. If you edit your schemes you will see that you can set the debug/release/adhoc/distribution build config for each scheme.
Product -> Archive, later, press the distribute button and check the option Export as Application or what you want

How to select debug/release mode in Xcode4? [duplicate]

Build for debug is just press on the PLAY symbol, but I don't know how to Build for distribution/release?
The short answer is:
choose the iOS scheme from the
drop-down near the run button from
the menu bar
choose product > archive in the
window that pops-up
click 'validate'
upon successful validation, click
'submit'
You can use command line tool to build the release version. Next to your project folder, i.e.
$ ls
...
Foo.xcodeproj
...
Type the following build command:
$ xcodebuild -configuration Release
The "play" button is specifically for build and run (or test or profile, etc). The Archive action is intended to build for release and to generate an archive that is suitable for submission to the app store. If you want to skip that, you can choose Product > Build For > Archive to force the release build without actually archiving. To find the built product, expand the Products group in the Project navigator, right-click the product and choose to show in Finder.
That said, you can click and hold the play button for a menu of other build actions (including Build and Archive).
XCode>Product>Schemes>Edit Schemes>Run>Build Configuration
They've bundled all the target/build configuration/debugging options stuff into "schemes". The transition guide has a good explanation.
I have a large app that was having problems uploading to the AppStore using the archive method you will find in XCode 4. The activity indicator kept spinning for hours whether I was trying to validate or distribute, so I created a support ticket to Apple. During that process, I found out you could right click on the .app in your Products folder inside the Project Navigator of XCode, and compress the app to submit using the Application Loader 2.5.1. (aka the old method). Only the Debug - iphoneos folder is accessible this way (for now) and once Apple responded, this is what they had to say:
I'm glad to hear that Application Loader has provided you a viable workaround. Discussing this situation internally, we're not sure that submitting the Debug build will pose too much of a problem (so long as it was signed with the App Store distribution profile, as you mentioned it was). The app will likely be slower as the debug switches are turned on and optimizations are turned off for the Debug configuration, though it will still run. App Review will ultimately determine whether or not that's ok, as I'm not sure that's something they check for. You could try reaching out directly to App Review to confirm this, if you wish. However, since App Loader is working for you, I do recommend rebuilding the app with your Release configuration and resubmitting to play it safe. To find your Release build in Xcode 4.x, control-click on the Application Archive on the Archives tab in the organizer, and choose "Show in Finder." Then, control-click on the .xcarchive file in Finder and choose "Show Package Contents." The release built .app file should be located within the /Products/Applications folder.
This was very helpful information for developers who are having problems with the archive method, and my app is now uploading successfully without any concern that it won't run to the best of it's ability.
To set the build configuration to Debug or Release, choose 'Edit Scheme' from the 'Product' menu.
Then you see a clear choice.
The Apple Transition Guide mentions a button at the top left of the Xcode screen, but I cannot see it in Xcode 4.3.
That part is now located under Schemes. If you edit your schemes you will see that you can set the debug/release/adhoc/distribution build config for each scheme.
Product -> Archive, later, press the distribute button and check the option Export as Application or what you want

How to make a Flex Builder project to work on an existing Flex non-project with ant build?

I want to do some development on a Flex project that uses Ant: http://svn.openstreetmap.org/applications/editors/potlatch2/ . I can build it from the command line but now want to use Flex Builder 3.0.2 to build, debug, etc.
I can see a few different paths to follow, but nothing that screams out "this is the right way":
create new project, SVN checkout in there (but then the directory structures won't match, and not sure how to tell FB to build using the existing build.xml)
create new project, create external source links to another directory with the files in it
Surely people do this all the time? (Never done Flash development before...)
Ok, here's what ended up working for me. It turns out I didn't need to use ant to build the project after all. This is for the specific project (Potlatch2) but lots of the principles are probably common.
File | New Flex Project (no server), save it somewhere, eg "c:\pot"
SVN checkout the potlatch2 files inside, so you have c:\pot\potlatch2\potlatch2.mxml etc...
Rename version.as.template to version.as and make up some stuff inside
Remove the "..." line from potlatch2-config.xml. Don't ask me why.
Set Flex SDK version - configure it to point to SDK 3.5
Project | Properties | Flex Build Path:
set source folder to potlatch2
set output folder to potlatch2\resources
set library path to potlatch2\lib
Update Flash global security settings to allow access to c:\pot\potlatch2\resources (otherwise you get 1. SWF security errors)[1]
Update browser settings (Window | Preferences...) to use a browser that has Flash Debug Player installed (ie, not Chrome).
Under debug settings (click the bug drop down, Other...): Turn off "Use defaults", make debug (and possibly run and profile) point to an HTML host file that passes the right settings to potlatch2.swf, passing lat/long coordinates of a place you want to edit.

Can you configure TeamCity "Artifacts" to be checked back into source control?

I would like to have TeamCity Artifacts be checked back into source control.
I have used TFS Integrator before. So I am used to its approach where, through config, it can check in the output builds back into source control. Then when people do a get they will receive these artifacts.
Or is there a completely different way of achieving this with TeamCity?
The two ways I can think of are
VCS Labeling
specify a path in your working directory to label and the location relative to the trunk to check it in. jetbrains explains it here
/project/trunk/dist=>/project/tags/%system.build.number%
from the build script
manually checkin the artifacts from the build script and add an ignore to the place where your checking in to so it doesn't trigger the build again.
e.g. use -:user=devA:project/sources/** to prevent build triggering after a change of VCS user devA made in subfolder project/sources/**

Resources