The purpose of this lesson is to help you update the core code and either (1) submit fixes to the iDempiere core codebase or (2) make your changes available to others through custom created binaries.
Modifying Core iDempiere - Introduction
Contribute Changes to iDempiere Core Development Team
Text from Slide:
Create a iDempiere Jira ticket
Discuss the design via the forum or weekly meeting
Create a clean development environment (code and db)
This section assumes you have created your development environment, and you have the intent to modify code to fix an issue. Patch is a Mercurial (hg) concept. To learn more about creating and managing patches read this chapter This is a useful online book. I recommend you bookmark it.
Before you begin. Create or update your .hgrc home directory file to enable Mercurial Queues.
[ui]
username = Your Name <name@url.com>
[extensions]
hgext.mq =
use the following commands to help you create your patch.
# prepare your repository
hg qinit
# create a new patch - done before your first change
hg qnew name-of-your-patch.patch
# Modify the core code and create a new save point for your patch
hg qrefresh (creates a save point)
# Give the current active patch a comment
hg qrefresh -m "commit message"# Make the patch a permanent commit
hg qfinish name-of-your-patch.patch
If you have made uncommitted changes, the hg qnew will initialize the patch and automatically incorporate your uncommitted changes without needing to enter hg qrefresh.
Register for Jira, iDempiere's bug tracking tool. You do not need permission to perform this task.
Created an issue. Attached your patch file (name-of-your-patch.patch) created from above process. Your patch file will be located in the .hg/patches directory inside your repository.
Testing Your Patch
You should test your patch before submit your code. The following commands will help you test.
Remove all patches if any already exist:
hg qpop -a
Import your newly created patch:
hg import --no-commit name-of-your-patch.patch
Submitting Application Dictionary Changes to iDempiere's Core
The official way to offer application dictionary changes is by using migration scripts. Here are two links to help you get started:
2014-08-12 AM Building iDempiere Core Code from Eclipse and Jenkins
Introduction
0:01:30 Sample development team illustration
0:04:15 Creating an iDempiere BitBucket.org fork
0:08:15 Creating a Pull Request and Jira ticket to the iDempiere core team.
0:10:00 Diagram of supporting both the community with feature contributions and your customers with new features not in iDempiere
0:14:00 How plugin repositories fit into the diagram
0:15:30 When do you make changes via plugins vs core code changes - with an example of a new feature that can only be provided by a core code change.
0:18:45 When would you create a bitbucket fork of iDempiere
0:21:00 Options for building your binaries (1) in Eclipse and (2) using Jenkins Continuous Integration
0:22:30 How to build directly from Eclipse (zip and p2)
Note: you can also build the swing UI. This is demonstrated during the Libero Mfg installation. The Libero Mfg installation also demonstrates how to bundle plugins into the build process.
0:32:00 Why go from Eclipse to Jenkins
0:33:00 Jenkins introduction
0:33:30 Review the core iDempiere team's implementation of Jenkins
0:34:45 How to install Jenkins (list of instructions) and demonstration
0:37:0 Review details of Jenkins build steps
0:38:00 how to specify what branch/version to build
0:39:15 build steps (1) shell script to delete old artifacts, (2) buckminster commands, and (3) shell scripts to move results to an Apache web server.
0:44:30 where to find the build step code/script
0:45:30 how to move results to Amazon's S3 and use S3 as a website host (overview)
0:46:45 command to upgrade an existing production instance with our newly created build