<html><head><title></title></head><body>These are some rough notes. It would be great if someone could follow up and add some more substance or edit what is here as they are building their first module — e.g., some first-hand experience.
...
- Check out a local copy of the Basic Module from the repository: <tt>
</tt> ## If given the option to set the project name, give it a module name using the same conventions.No Format http://svn.openmrs.org/openmrs-modules/basicmodule
- Disconnect the project from the database (you won't be checking your changes back in as the "BasicModule")
- Using Subclipse: right-click on the project name, select "Team->Disconnect..."
- "Confirm Disconnect from SVN" wizard appears
- select the "Also delete the SVN meta..." radio button
- click "Yes" button
- Replace all references to the Basic Module with your new modules name, using the same conventions. (For example, rename BasicModule to MyFirstModule).
- edit metadata/config.xml
- find the
"<id>" tag, edit the value (example: change "Code Block <id>basicmodule</id>" to "Code Block <id>myfirst</id>")Code Block - find the
<name> tag, edit the value (example: change "Code Block <name>Basic Module</name>" to "Code Block <name>My First Module</name>")Code Block - find the
<author> tag, edit change the value (from Ben Wolfe to your name ... Ben shouldn't get all the creditCode Block - find the
<description> tag, edit the value if you want, you can change theCode Block <version> value, following the versioning conventionsCode Block - find the
<activator> tag, change the activator nameCode Block
- find the
- edit metadata/moduleApplicationContext.xml
- This file is really only needed if you want either 1) your module to provide jsp files or 2) your module to have its own ___Service.java class
- edit metadata/sqldiff.xml
- This file is not needed if you are not adding/modifying any tables or columns in the openmrs datamodel
- edit metadata/config.xml
- find the
<author> tag and edit the value.Code Block - find the
<date> tag and edit the value.Code Block
- find the
- rename the project (if you didn't set it during checkout)
- right-click on "BasicModule" in the "Package Explorer"
- select "Refactor->Rename..."
- enter the new name (example: change to "MyFirstModule")
- rename the packages
- expand src
- right-click on org.openmrs.module.basicmodule "Refactor->Rename..."
- the "Rename Package" wizard appears
- edit the name (example: change to "org.openmrs.module.myfirst")
- select all of the check boxes (Put a * in the "File name patterns" text field)
- click "Preview"
- (wait patiently)
- click "OK" on the final screen of the wizard
- Repeat the previous set of steps for web/src and test/
- Be certain to rename all files that have BasicModule (or basicmodule) in their name (for example basicmoduleForm.jsp under web/module). Also look in the contents of the files (e.g. AdminList.java and build.xml)
- Change the contents of metadata/messages_*.properties
- We recommend (and use) Eclipse IDE, but as long as you have Apache ANT installed, you can use a text editor if you prefer.
- Build your module (.omod file) using ANT (e.g., run <tt>ant package-module</tt> at command line in the root of the module)
- Try out your module
- Go to your openmrs installation Administration-->Manage Modules
- Choose Upload and browse to the "dist" folder in your checked out code. choose the latest.omod file
- Document your module
- Modules should have a home page that describes their purpose, features, instructions, known issues, etc.
- Feel free to create a wiki page for your module on this wiki. Your page should be called "FooBar Module" if you have created a module called FooBar.Make sure to place
at the top of your module's wiki page, so your module documentation will be listed in the Module Documentation page.Create it as a child of the ?Active Projects pageNo Format
- Publish the resulting .omod file
- Consider using the OpenMRS Module Repository
- Committing your code to the OpenMRS subversion repository
- See Developers Guide Code Repository#Requesting_Subversion_Repository_Access to get a new SVN project created for you.
- After a new SVN project has been created for you, the easiest way is to:
- check out the new project that was created for you
- then copy and paste your unattached code into that project
- Then just commit that entire project
</body></html>Panel