Integrate with source control systems
Some source code files should be held in a version control system: others should not.
There are two types of files and folders in a standard MobileFirst project hierarchy:
- Your own source code files and some source code files provided in the MobileFirst device runtime libraries.
You should commit these files to a version control system.
- Files that are generated from the web source code and some JavaScript files provided with MPF (such as wlclient.js).
These files and folders are added to the file system every build.
You should not commit them to a version control system.
In the next figure, these files and folders are marked with a star (*) after their names.
Figure 1. Integration of MobileFirst project hierarchy with source control systems
Project Name | +---Java Resources +---JavaScript Resources +---adapters +---apps | +--Application Name | | application-descriptor.xml | | build-settings.xml | | | +---android | | +---css | | +---images | | +---js | | +---native | | | | Application Name.iml | | | | AndroidManifest.xml | | | | project.properties | | | | | | | +---assets | | | | | wlclient.properties | | | | | | | | | +---featurelibs | | | | +---www (*) | | | +---libs | | | +---res | | | +---src | | +---nativeResources | | | +---blackberry | | +---css | | +---images | | +---js | | +---native | | | config.xml | | | icon.png | | | splash.png | | | .wldata | | | | | +---ext | | | WLExtension.jar | | | | | +---www (*) | | | +---blackberry10 | | +---css | | +---images | | +---js | | +---nativeResources | | | | | | | +---www (*) | +---common | | | index.html | | | | | +---css | | +---images | | +---js | | | +---ipad | | +---css | | +---images | | +---js | | +---native | | | | buildtime.sh | | | | config.xml | | | | Entitlements-Debug.plist | | | | Entitlements-Release.plist | | | | main.m | | | | Project Name Application NameIpad_Prefix.pch | | | | Project Name Application NameIpad-Info.plist | | | | README.txt | | | | worklight.plist | | | | | | | +---Classes | | | | Application Name.h | | | | Application Name.m | | | | | | | +---CordovaLib (*) | | | +---FipsHttp | | | +---Frameworks | | | +---Project Name Application NameIpad.xcodeproj | | | +---Resources | | | +---Settings.bundle | | | +---Tealeaf | | | +---WorklightSDK (*) | | | +---www (*) | | +---nativeResources | +---iphone | | +---css | | +---images | | +---js | | +---native | | | | buildtime.sh | | | | config.xml | | | | Entitlements-Debug.plist | | | | Entitlements-Release.plist | | | | main.m | | | | Project Name Application NameIphone_Prefix.pch | | | | Project Name Application NameIphone-Info.plist | | | | README.txt | | | | worklight.plist | | | | | | | +---Classes | | | | Application Name.h | | | | Application Name.m | | | | | | | +---CordovaLib (*) | | | +---FipsHttp | | | +---Frameworks | | | +---Project Name Application NameIphone.xcodeproj | | | +---Resources | | | +---Settings.bundle | | | +---Tealeaf | | | +---WorklightSDK (*) | | | +---www (*) | | +---nativeResources | +---legal | | | +---windowsphone8 | +---css | +---images | +---js | +---native | | | Application Name.csproj | | | App.xaml | | | App.xaml.cs | | | ApplicationIcon.png | | | Background.png | | | config.xml | | | MainPage.xaml | | | MainPage.xaml.cs | | | Newtonsoft.Json.dll | | | SplashScreenImage.jpg | | | wlclient.properties | | | WLWPNativeLib.dll | | | WPCordovaClassLib.dll | | | | | +---applicationBar | | +---buildtarget | | +---Properties | | +---Resources | | +---www (*) | +---nativeResources | +---bin (*) +---externalServerLibraries +---server | +---conf | +---java | +---lib +---servicesTo ensure that the source code is always synchronized with your source control system, add the (*) files and folders to the ignore list in the source control system. For Subversion, for example, perform the following steps:
- Step 1: Use the Tortoise extension for Subversion, right-click each file or folder that is to be ignored and add it to the ignore list.
- Step 2: Go up one level in the file system and commit the change to the SVN repository. The changes take effect from now on for every developer who updates the code.
For more information about the folders that are shown in the figure, see Anatomy of a MobileFirst application.
Parent topic: Artifacts produced during development cycle