Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Corona HowTo: Include a New Plugin in Build"

(Correct Plugin Structure)
m (obsolete)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Correct Plugin Structure=
 
A Corona plugin is a regular Equinox plugin/fragment that conforms to Europa build practices. If a new plugin is created the following should be assured:
 
* 4-part version numbering should be used, the first three parts are numbers, the last is "qualifier" word, for example: 0.5.0.qualifier. The "qualifier" is not used for plugins representing 3rd party.
 
* plugin must correctly list its required JVM versions in the manifest/plugin.xml
 
* build.properties file must list all files that should be included in the build result (the option bin.includes), if a jar file is included in Corona, but does not have IP approval, it should be excluded from build.properties.
 
  
==For test plugins==
 
Test plugins '''must''' be written in JUnit 3. JUnit 4 is not yet supported. The test plugin must have an ant script, which will run the test. Typically it is called ''test.xml'' and is placed in test plugin's root directory - see [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.corona/tests/org.eclipse.corona.tests.repository/test.xml?view=log the script in one of plugins].
 
 
To add it to your plugin:
 
* Make test suits - one for tests that require UI and/or second that do not need UI.
 
*: Test suit may be any class that have a method ''public static junit.framework.Test suite()''. The return object is ''junit.framework.TestSuite'' with all your test classes added. To add a test class, you need to invoke ''addTestSuite(<TestClass>)''.
 
<blockquote>
 
<pre>
 
public static junit.framework.Test suite() {
 
    junit.framework.TestSuite suite = new junit.framework.TestSuite("An example suite");
 
    suite.addTestSuite(SomeTest.class);
 
    return suite;
 
}
 
</pre>
 
</blockquote>
 
* Copy [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.corona/tests/org.eclipse.corona.tests.repository/test.xml?view=log the example ant script] to your plugin as test.xml
 
* Modify the ''suite'' target:
 
*# If you have UI test, uncomment the ''<ant target="ui-test"...'' and set property ''classname'' with the test suite class for UI tests.
 
*# Do the same for non-UI tests in ''<ant target="core-test"...''
 
 
=Modify Build=
 
The following steps should be taken to include a new plugin in build:
 
* add the plugin to Corona Client and/or Server feature (steps for adding to Corona client feature)
 
** checkout feature projects from [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.corona/features/ Technology CVS org.eclipse.corona/features/]
 
** open feature.xml in proper feature project - org.eclipse.corona.client, org.eclipse.corona.server, org.eclipse.corona.test.client or org.eclipse.test.corona.server
 
** open feature.xml
 
** on Plug-ins and fragments tab select ''Add'' and select the new plugin
 
** then select ''Versions'' and select Synchronization options: "Copy versions from plug-in and fragment manifests"
 
** save the feature.xml and commit to CVS
 
* modify Corona maps for Corona client and/or server
 
** the maps can be found in maps folder in CVS under [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.corona/maps/ org.eclipse.corona/maps]
 
** add a line that represents the plugin, the line must specify plugin/fragment, name and CVS access parameters analogously to other defined entries in maps.
 
* If milestone version or 3rd party jars change it is necessary to modify files in the build folder (the folder is in Corona CVS)
 
** in customTargets.xml modify getPlugins target, set the correct argument to wget of 3rd party jars OR
 
** assure that download folder on the build machine contains a file named build.zip with all necessary 3rd party plugins and jars.
 
 
=Check if the Automated build works=
 
Verify if the currently configured build works correctly. The page [[Corona_Development_Build#Execution_of_Build_Scripts|Execution of Build Scripts]] describes how to run a automated build.
 
 
The page [[Corona_Development_Build]] describes steps to set up a new build environment or adjust existing one.
 

Latest revision as of 10:51, 27 February 2008

Back to the top