Jump to: navigation, search

Difference between revisions of "Developer's guide to adding new plugins to the AJDT release"

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Adding source plugins that are meant for distribution==
 
 
 
==Adding source plugins that contain tests only (not for distribution)==
 
==Adding source plugins that contain tests only (not for distribution)==
  
Locally (to be checked in to CVS):
+
For a new test plugin:
  
 
#Check the test plugin into CVS (See the [http://www.eclipse.org/ajdt/developers.php#q:cvs developer's guide] for more information on CVS.
 
#Check the test plugin into CVS (See the [http://www.eclipse.org/ajdt/developers.php#q:cvs developer's guide] for more information on CVS.
 
#Add test plugin to the feature ''org.eclipse.aspectj.feature_tests''
 
#Add test plugin to the feature ''org.eclipse.aspectj.feature_tests''
#Ensure that it is "unpacked" (check box in the plug-ins page)
+
#Ensure that it is "unpacked" (specify in ''org.eclipse.aspectj.feature_tests/feature.xml'')
#Ensure a test.xml is in the plugin copy from another test plugin and change paths appropriately.  Ensure to select either ui-test or core-test
+
#Ensure a test.xml is in the plugin. Copy from another test plugin and change paths appropriately.  Ensure to appropriately choose either ui-test or core-test
 
#JUnit 4 is not supported by eclipse testing framework (org.eclipse.test).  {{bug|153429}} tracks this.  
 
#JUnit 4 is not supported by eclipse testing framework (org.eclipse.test).  {{bug|153429}} tracks this.  
#Update the customTargets.xml ant script in update site project, org.eclipse.aspectj.updatesite. (Note that build.xml and build-minimal.xml are no longer used and can probably be deleted, I don't even know if they still work.  Certainly, the build.xml scripts in the individual plugins are broken.)
+
#Edit the build.properties file for the new test plugin and ensure that it contains the test.xml and all other files required for the binary build.  The .class files should be in their own jar.  Can copy from other build.properties files.
#Edit the build.properties file and ensure that it contains the test.xml and all other files required for the binary build.  The .class files should be in their own jar.  Can copy from other build.properties files.
+
#Edit MANIFEST.MF and add the new jar for the class files (specified in build.properties) to the classpath.
#Edit MANIFEST.MF and add the new jar (specified in build.properties) to the classpath.
+
#Update the copy-sources target in customTargets.xml ant script in org.eclipse.ajdt.releng project.
 +
#Update the run-test-eclipse, copy-test-results, and check-results targets in the buildAll.xml file.
  
On the build server:
 
#Ensure that org.eclipse.test and org.eclipse.ant.optional.junit plugins are installed in the target Eclipse for testing.  The target Eclipse for testing is ~/cruisecontrol-2.3.1/test/eclipseXX (XX is the major.minor version number).  The plugins can be found here with the [http://download.eclipse.org/eclipse/downloads/drops/R-3.4.1-200809111700/index.php#JUnitPlugin automated test plugins] (link to version 3.4.1, this is likely to be forward compatible).
 
#Update run-test3X.sh on build server to include new test plugin.  Copy from other entries
 
#Update ''build-AJDT1.X.xml'' on build server to include checking out the plugin, checking the results, and deleting old versions.  This is spread throughout the script, so copy from the other plugins. copy from other entries.  Make sure that ''upload-build1.6weaving.xml'' is not touched because these changes should not be sent to the download server.
 
#Update config.xml on build server to ensure that test results are included in the log.
 
  
 +
[http://www.eclipse.org/articles/Article-PDE-Automation/automation.html This article] describes the headless testing process.
  
Note that if you want to run the tests locally through the testing framework (a good idea in order to ensure that everything is set up properly), do this:
+
==Adding source plugins that are meant for distribution==
  
#Download and install the Eclipse testing framework: org.eclipse.test, and org.eclipse.ant.optional.junit.
+
A lot of similarity to above, but some differences:
#Create a new debug launch configuration.
+
#Set the Program args to be something like this:
+
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -f ${workspace_loc}/org.eclipse.contribution.weaving.jdt.tests/testbackup.xml -classname org.eclipse.contribution.weaving.jdt.tests.AllWeavingTests -testpluginname org.eclipse.contribution.weaving.jdt.tests
+
#Set the VM args to be something like this:
+
-Ddata-dir=${workspace_loc}/org.eclipse.test/results -Dplugin-name=org.eclipse.contribution.weaving.jdt.tests -Dclassname=org.eclipse.contribution.weaving.jdt.tests.AllWeavingTests -Declipse-home=/Users/andrew/Eclipse/Installations/Eclipse3.4
+
-Xms40m
+
-Xmx768m
+
-XX:PermSize=128M
+
-XX:MaxPermSize=256M
+
  
 +
#Add plugin to appropriate feature (probably org.eclipse.ajdt-feature). This plugin should probably be "packed".
 +
#Update the copy-sources target in customTargets.xml ant script in org.eclipse.ajdt.releng project.
  
[http://www.eclipse.org/articles/Article-PDE-Automation/automation.html This article] describes the headless testing process.
 
  
==Adding third party binary plugins for distribution==
+
That's probably it.
  
AJDT does not do this yet, but we may choose to bundle our own version of Equinox Aspects.  If we do this, then how to do this for other third party plugins will be described here. 
+
==Adding third party binary plugins for distribution==
  
 +
AJDT includes Equinox Aspects in its distribution.  Equinox Weaving is grabbed from the Equinox/RT's CVS repository using a map file specified in org.eclipse.ajdt.releng/maps.  If it is necessary to include more 3rd party plugins, then follow the same steps as is used for Equinox Weaving.  Be sure to choose a stable tag from the source repository.  Also, be sure to file a CQ for the new plugins.
  
  
 
[[Category:AJDT]]
 
[[Category:AJDT]]

Latest revision as of 09:09, 17 March 2010

Adding source plugins that contain tests only (not for distribution)

For a new test plugin:

  1. Check the test plugin into CVS (See the developer's guide for more information on CVS.
  2. Add test plugin to the feature org.eclipse.aspectj.feature_tests
  3. Ensure that it is "unpacked" (specify in org.eclipse.aspectj.feature_tests/feature.xml)
  4. Ensure a test.xml is in the plugin. Copy from another test plugin and change paths appropriately. Ensure to appropriately choose either ui-test or core-test
  5. JUnit 4 is not supported by eclipse testing framework (org.eclipse.test). bug 153429 tracks this.
  6. Edit the build.properties file for the new test plugin and ensure that it contains the test.xml and all other files required for the binary build. The .class files should be in their own jar. Can copy from other build.properties files.
  7. Edit MANIFEST.MF and add the new jar for the class files (specified in build.properties) to the classpath.
  8. Update the copy-sources target in customTargets.xml ant script in org.eclipse.ajdt.releng project.
  9. Update the run-test-eclipse, copy-test-results, and check-results targets in the buildAll.xml file.


This article describes the headless testing process.

Adding source plugins that are meant for distribution

A lot of similarity to above, but some differences:

  1. Add plugin to appropriate feature (probably org.eclipse.ajdt-feature). This plugin should probably be "packed".
  2. Update the copy-sources target in customTargets.xml ant script in org.eclipse.ajdt.releng project.


That's probably it.

Adding third party binary plugins for distribution

AJDT includes Equinox Aspects in its distribution. Equinox Weaving is grabbed from the Equinox/RT's CVS repository using a map file specified in org.eclipse.ajdt.releng/maps. If it is necessary to include more 3rd party plugins, then follow the same steps as is used for Equinox Weaving. Be sure to choose a stable tag from the source repository. Also, be sure to file a CQ for the new plugins.