Difference between revisions of "Modeling Project Releng/Releng Module"

From Eclipsepedia

Jump to: navigation, search
(Template Usage Steps)
m (Template Usage Steps)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==EMFT Releng Module==
+
<!-- for the latest version of this doc, see http://wiki.eclipse.org/index.php/Modeling_Project_Releng_Module -->
  
 
===Template Usage Steps===
 
===Template Usage Steps===
  
First, you need to get a copy of the template.
+
First, you need to get a copy of the template. Copy /cvsroot/modeling/releng-common/templates/org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>'''''.releng to
 +
/cvsroot/'''''<code style="color:darkgreen">_TOPPROJECTNAME_</code>'''''/org.eclipse.'''''<code style="color:darkgreen">_PARENTPROJECTNAME_</code>'''''/org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>'''''.releng,
 +
where:
 +
: '''''<code style="color:darkgreen">_TOPPROJECTNAME_</code>''''' = "modeling", "tools", "technology", etc.
 +
: '''''<code style="color:darkgreen">_PARENTPROJECTNAME_</code>''''' = "mdt", "m2t", "gef", "pdt", etc.
 +
: '''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>''''' is defined below.  
  
1. Copy org.eclipse.emft/releng/common_releng_template to org.eclipse.emft/releng/'''''_SHORTNAME_''''',
+
'''NOTE''': Some of the variables listed below apply to the .doc (or other) template, not the .releng template. YMMV.
      where '''''_SHORTNAME_''''' = "cdo", "eodm", "jeteditor", etc.
+
  
2. Find and replace all occurrences in all files of the string "'''''_PROJECTNAMESPACE_'''''" with  
+
Next, clean up the template for your specific needs:
      your project's namespace. This CAN be the same as the shortname, that is  
+
 
+
<ol>
 +
<li> Find and rename all files with '''''<code style="color:darkgreen">_SHORTNAME_</code>''''' in their name, using the project's shortname
 +
:* promoteToEclipse.'''''<code style="color:darkgreen">_SHORTNAME_</code>'''''.properties
 +
:* templateFiles/'''''<code style="color:darkgreen">_SHORTNAME_</code>'''''.map.template
 +
:* maps/'''''<code style="color:darkgreen">_SHORTNAME_</code>'''''.map</li>
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_TOPPROJECTNAME_</code>'''''" with your top project's name.</li>
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_PARENTPROJECTNAME_</code>'''''" with your parent project's name.</li>
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_SHORTNAME_</code>'''''" with your project's shortname.</li>
 +
 
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_PROJECTNAME_</code>'''''" with your project's name, eg. "Eclipse Web Interface", "Model Query", "UML2 Tools"</li>
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_PROJECTWEBSITE_</code>'''''" with your project's website, eg., [http://wiki.eclipse.org/Google_Summer_of_Code], [http://www.eclipse.org/modeling/emf/?project=query#query], [http://www.eclipse.org/modeling/mdt/?project=uml2tools#uml2tools]</li>
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_VERSION_</code>'''''" with your project's version, eg. 0.1.0, 1.0.0</li>
 +
 
 +
<li> Find and replace all occurrences in all files of the string "'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>'''''" with your project's namespace. This ''can'' be the same as the shortname, that is</li>
 +
</ol>
 
       eodm:
 
       eodm:
           org.eclipse.'''''_PROJECTNAMESPACE_''''' -> org.eclipse.eodm
+
           org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>''''' -> org.eclipse.eodm
 
   
 
   
      but is often different, including ''.emf'' or more
+
:but is often different, including ''.emf'' or more
 
   
 
   
 
       cdo:  
 
       cdo:  
           org.eclipse.'''''_PROJECTNAMESPACE_''''' -> org.eclipse''.emf''.cdo
+
           org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>''''' -> org.eclipse''.emf''.cdo
 
   
 
   
          - or -
+
Finally, go through the files looking for '''TODO''' markers, and update the scripts as per those instructions (as applicable).
+
      jeteditor:
+
          org.eclipse.'''''_PROJECTNAMESPACE_''''' -> org.eclipse''.emf.codegen''.jet.editor
+
  
3. Find and rename all files with '''''_SHORTNAME_''''' in their name, using the project's shortname
+
You may also wish to replace "'''''<code style="color:darkgreen">IBM Corporation</code>'''''" with your organization's name and check the copyright year. (Nick, perhaps this should be another token for replacement?)
      * promoteToEclipse.'''''_SHORTNAME_'''''.properties
+
      * templateFiles/'''''_SHORTNAME_'''''.map.template
+
      * maps/'''''_SHORTNAME_'''''.map
+
  
 
===Customization Steps===
 
===Customization Steps===
Line 33: Line 45:
 
Next, you need to customize the template for your project's specific needs.
 
Next, you need to customize the template for your project's specific needs.
  
1. Edit promoteToEclipse.*.properties:
+
* Edit promoteToEclipse.*.properties. Enter the correct projectName / subprojectName, then name / email address:
      enter the correct name / email address
+
 
        
 
        
      newsgroupPublisherEmail="My Name <me@mydomain.com>"
+
projectName=m2m
 +
subprojectName=atl
 +
  ...
 +
newsgroupPublisherEmail="My Name <me@mydomain.com>"
  
2. Edit repoInfo.properties:
 
      enter the correct cvs username(s)
 
  
3. Edit buildAll.xml:
+
* Edit repoInfo.properties to use YOUR cvs username
      ensure that if you are properly configured for the JDK you require (1.4, 5.0) (see '''''TODO'''''s)
+
+
    If this project depends on more than just Eclipse and EMF (eg., also on OCL) then enter
+
      more <replacefilter/> tags in target "publish" (see '''''TODO''''')
+
+
    If necessary, you can manually copy files from the SDK into the other zips (see '''''TODO''''')
+
+
    If necessary, you should remove 3rd party jars used at build time from the zips (see '''''TODO''''')
+
+
    Additional changes may be required. For examples, see these projects:
+
   
+
      * JDK 1.4: eodm, jet, jeteditor, ocl, query, validation, transaction
+
      * JDK 1.5: cdo, net4j
+
  
4. Edit templateFiles/index.html.template:
 
      ensure all requirements are listed in the Requirements table (see '''''TODO''''')
 
  
5. Edit builder/*/build.properties:
+
* Edit buildAll.xml
      ensure they are configured for the correct JDK version (see '''''TODO''''')
+
:* Ensure that if you are properly configured for the JDK you require (1.4, 5.0) (see '''''TODO'''''s)
 +
:* If necessary, you can manually copy files from the SDK into the other zips (see '''''TODO''''')
 +
:* If necessary, you should remove 3rd party jars used at build time from the zips (see '''''TODO''''')
 +
:* Additional changes may be required. For examples, see these projects:
 +
::* JDK 1.4: eodm, jeteditor
 +
::* JDK 5.0 and JDK 1.4: ocl, query, validation, transaction, jet
 +
:::(5.0 used in 1.1/0.8 development streams,
 +
:::1.4 used in 1.0/0.7 maintenance streams)
 +
::* JDK 5.0: cdo, net4j
  
6. Edit builder/*/customTargets.xml:
+
* Edit builder/*/build.properties to ensure they are configured for the correct JDK version (see '''''TODO''''')
      ensure all requirements are downloaded and unpacked as needed (see '''''TODO''''')
+
      verify all namespaces are properly defined in -bundleDirectoryMatchRegex argument (see '''''TODO''''')
+
  
7. Edit builder/tests/configs/local/customTest.xml:
 
      ensure all requirements are downloaded and unpacked as needed (see '''''TODO''''')
 
  
8. Edit builder/tests/configs/local/testing.properties:  
+
* Edit builder/*/customTargets.xml:  
      ensure proper JDK and vmflags are set (see '''''TODO'''''s)
+
:* Ensure all requirements are downloaded and unpacked as needed (see '''''TODO''''')
  
9. Edit builder/tests/scripts/runtests:
 
      ensure proper JDK is set (see '''''TODO''''')
 
  
10. Edit builder/tests/scripts/test.xml:
+
* Edit builder/tests/configs/local/customTest.xml to ensure all requirements are downloaded and unpacked as needed (see '''''TODO''''')
      ensure all requirements are downloaded and unpacked as needed (see '''''TODO''''')
+
 
      ensure if your test plugin is jarred you (un)comment out the appropriate lines (see '''''TODO'''''s)
+
 
 +
* Edit builder/tests/configs/local/testing.properties to ensure proper JDK and vmflags are set (see '''''TODO'''''s)
 +
 
 +
 
 +
* Edit builder/tests/scripts/test.xml:
 +
:* ensure all requirements are downloaded and unpacked as needed (see '''''TODO''''')
 +
:* ensure if your test plugin is jarred you (un)comment out the appropriate lines (see '''''TODO'''''s)
 +
 
 +
===Doc Plugin & Feature Builder===
 +
 
 +
'''Updated''': As of 2007-07-12, there's now a full template for both doc plugin and doc feature that you can use to create the required stuff you need for your doc plugin in order to get at least javadoc (if you don't have any other documents available yet).
 +
 
 +
See [http://dev.eclipse.org/viewcvs/index.cgi/releng-common/templates/org.eclipse._PROJECTNAMESPACE_.doc/?root=Modeling_Project releng-common/templates/org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>'''''.doc] and [http://dev.eclipse.org/viewcvs/index.cgi/releng-common/templates/org.eclipse._PROJECTNAMESPACE_.doc-feature/?root=Modeling_Project releng-common/templates/org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>'''''.doc-feature]
 +
 
 +
 
 +
For EMFT, look at an existing project such as EODM and compare their build/ and references/ folders to those in your doc plugin, along with your toc.xml.
 +
 
 +
See [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emft/eodm/doc/org.eclipse.eodm.doc/?root=Technology_Project org.eclipse.emft/eodm/doc/org.eclipse.eodm.doc]
 +
 
 +
Note that the Modeling template does not include images; if you're missing these, you can copy them from the EODM doc example.
  
 
===Template Variables===
 
===Template Variables===
Line 83: Line 101:
 
This is a checklist of all the customizations required to move from generic template to custom implementation. Ideally, much of this could be replaced with an Eclipse-based Wizard.  
 
This is a checklist of all the customizations required to move from generic template to custom implementation. Ideally, much of this could be replaced with an Eclipse-based Wizard.  
  
* '''''_SHORTNAME_''''', '''''_PROJECTNAMESPACE_'''''
+
* '''''<code style="color:darkgreen">_PARENTPROJECTNAME_</code>''''', '''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>''''', '''''<code style="color:darkgreen">_SHORTNAME_</code>'''''
* JDK version (1.4, 1.5), $JAVA_HOME / $javaHome flags/variables, JVM option flags (-Xmx, -Xms...)
+
* '''''<code style="color:darkgreen">_PROJECTNAME_</code>''''', '''''<code style="color:darkgreen">_PROJECTWEBSITE_</code>''''', '''''<code style="color:darkgreen">_VERSION_</code>'''''
 +
 
 +
* JDK version (1.4, 5.0), $JAVA_HOME / $javaHome flags/variables, JVM option flags (-Xmx, -Xms...)
 
* email name/address for newsgroup posts
 
* email name/address for newsgroup posts
 
* files in SDK that need to be copied to runtime/examples for completeness, etc.
 
* files in SDK that need to be copied to runtime/examples for completeness, etc.
 
* test plugin jarred/not-jarred
 
* test plugin jarred/not-jarred
 
* cvs username(s) (usually set to nickb; doesn't need to change)
 
* cvs username(s) (usually set to nickb; doesn't need to change)
* included namespaces (usually just org.eclipse.'''''_PROJECTNAMESPACE_''''', but can include more)
+
* included namespaces (usually just org.eclipse.'''''<code style="color:darkgreen">_PROJECTNAMESPACE_</code>''''', but can include more -- see EMFT Transaction project, which includes .workspace as well as .transaction)
 
* upstream dependencies (usually just Eclipse + EMF, but sometimes more)
 
* upstream dependencies (usually just Eclipse + EMF, but sometimes more)
 
* 3rd party jars used only for building (but not publishable) (usually none)
 
* 3rd party jars used only for building (but not publishable) (usually none)
 
* additional extra customizations (if any)
 
* additional extra customizations (if any)
 +
 +
 +
[[Category:Modeling]] [[Category:EMFT]] [[Category:Releng]]

Latest revision as of 22:52, 9 July 2008


Contents

[edit] Template Usage Steps

First, you need to get a copy of the template. Copy /cvsroot/modeling/releng-common/templates/org.eclipse._PROJECTNAMESPACE_.releng to /cvsroot/_TOPPROJECTNAME_/org.eclipse._PARENTPROJECTNAME_/org.eclipse._PROJECTNAMESPACE_.releng, where:

_TOPPROJECTNAME_ = "modeling", "tools", "technology", etc.
_PARENTPROJECTNAME_ = "mdt", "m2t", "gef", "pdt", etc.
_PROJECTNAMESPACE_ is defined below.

NOTE: Some of the variables listed below apply to the .doc (or other) template, not the .releng template. YMMV.

Next, clean up the template for your specific needs:

  1. Find and rename all files with _SHORTNAME_ in their name, using the project's shortname
    • promoteToEclipse._SHORTNAME_.properties
    • templateFiles/_SHORTNAME_.map.template
    • maps/_SHORTNAME_.map
  2. Find and replace all occurrences in all files of the string "_TOPPROJECTNAME_" with your top project's name.
  3. Find and replace all occurrences in all files of the string "_PARENTPROJECTNAME_" with your parent project's name.
  4. Find and replace all occurrences in all files of the string "_SHORTNAME_" with your project's shortname.
  5. Find and replace all occurrences in all files of the string "_PROJECTNAME_" with your project's name, eg. "Eclipse Web Interface", "Model Query", "UML2 Tools"
  6. Find and replace all occurrences in all files of the string "_PROJECTWEBSITE_" with your project's website, eg., [1], [2], [3]
  7. Find and replace all occurrences in all files of the string "_VERSION_" with your project's version, eg. 0.1.0, 1.0.0
  8. Find and replace all occurrences in all files of the string "_PROJECTNAMESPACE_" with your project's namespace. This can be the same as the shortname, that is
      eodm:
         org.eclipse._PROJECTNAMESPACE_ -> org.eclipse.eodm

but is often different, including .emf or more
      cdo: 
         org.eclipse._PROJECTNAMESPACE_ -> org.eclipse.emf.cdo

Finally, go through the files looking for TODO markers, and update the scripts as per those instructions (as applicable).

You may also wish to replace "IBM Corporation" with your organization's name and check the copyright year. (Nick, perhaps this should be another token for replacement?)

[edit] Customization Steps

Next, you need to customize the template for your project's specific needs.

  • Edit promoteToEclipse.*.properties. Enter the correct projectName / subprojectName, then name / email address:
projectName=m2m
subprojectName=atl
  ...
newsgroupPublisherEmail="My Name <me@mydomain.com>"


  • Edit repoInfo.properties to use YOUR cvs username


  • Edit buildAll.xml
  • Ensure that if you are properly configured for the JDK you require (1.4, 5.0) (see TODOs)
  • If necessary, you can manually copy files from the SDK into the other zips (see TODO)
  • If necessary, you should remove 3rd party jars used at build time from the zips (see TODO)
  • Additional changes may be required. For examples, see these projects:
  • JDK 1.4: eodm, jeteditor
  • JDK 5.0 and JDK 1.4: ocl, query, validation, transaction, jet
(5.0 used in 1.1/0.8 development streams,
1.4 used in 1.0/0.7 maintenance streams)
  • JDK 5.0: cdo, net4j
  • Edit builder/*/build.properties to ensure they are configured for the correct JDK version (see TODO)


  • Edit builder/*/customTargets.xml:
  • Ensure all requirements are downloaded and unpacked as needed (see TODO)


  • Edit builder/tests/configs/local/customTest.xml to ensure all requirements are downloaded and unpacked as needed (see TODO)


  • Edit builder/tests/configs/local/testing.properties to ensure proper JDK and vmflags are set (see TODOs)


  • Edit builder/tests/scripts/test.xml:
  • ensure all requirements are downloaded and unpacked as needed (see TODO)
  • ensure if your test plugin is jarred you (un)comment out the appropriate lines (see TODOs)

[edit] Doc Plugin & Feature Builder

Updated: As of 2007-07-12, there's now a full template for both doc plugin and doc feature that you can use to create the required stuff you need for your doc plugin in order to get at least javadoc (if you don't have any other documents available yet).

See releng-common/templates/org.eclipse._PROJECTNAMESPACE_.doc and releng-common/templates/org.eclipse._PROJECTNAMESPACE_.doc-feature


For EMFT, look at an existing project such as EODM and compare their build/ and references/ folders to those in your doc plugin, along with your toc.xml.

See org.eclipse.emft/eodm/doc/org.eclipse.eodm.doc

Note that the Modeling template does not include images; if you're missing these, you can copy them from the EODM doc example.

[edit] Template Variables

This is a checklist of all the customizations required to move from generic template to custom implementation. Ideally, much of this could be replaced with an Eclipse-based Wizard.

  • _PARENTPROJECTNAME_, _PROJECTNAMESPACE_, _SHORTNAME_
  • _PROJECTNAME_, _PROJECTWEBSITE_, _VERSION_
  • JDK version (1.4, 5.0), $JAVA_HOME / $javaHome flags/variables, JVM option flags (-Xmx, -Xms...)
  • email name/address for newsgroup posts
  • files in SDK that need to be copied to runtime/examples for completeness, etc.
  • test plugin jarred/not-jarred
  • cvs username(s) (usually set to nickb; doesn't need to change)
  • included namespaces (usually just org.eclipse._PROJECTNAMESPACE_, but can include more -- see EMFT Transaction project, which includes .workspace as well as .transaction)
  • upstream dependencies (usually just Eclipse + EMF, but sometimes more)
  • 3rd party jars used only for building (but not publishable) (usually none)
  • additional extra customizations (if any)