Talk:ADempiere Version Control

From ADempiere ERP Wiki

Jump to: navigation, search


From My MacBook by Redhuan D. Oon

Tony, i believe it has something to do with my MacBook and Eclipse version. They don't always jive with stuff out there so you must be right on that version advice.Redhuan D. Oon 03:12, 7 July 2010 (UTC)
  • You may not find the .hgrc file in your <home-dir> so you just create it there with pico utility. If your Eclipse opens with issue in Mercurial, at your terminal box run: hg debuginstall to see what can be wrong.
  • In Eclipse, you need to set the Hg command to your disk location such as in my case it is /usr/local/bin/hg
  • Follow the terminal command to clone but do it as root or else it seems to deny you permission.
    • Below is my first clone statement which is same as advised in article:
hg clone -U adempiere

Creating local working clones

  • After the above i can then do this in my Eclipse by:
    • Right-click on my left panel and select Team and Import.
    • Choosing Mercurial option
    • Then telling the dialog where my local clone and where is my workspace as shown in image here.
    • Then click Finish and it takes not long to show up in your Eclipse IDE. As seen in the image below, its folder structure appears to arrange exactly as expected even though its harddisk layout was so different during cloning. This must mean that the Mercurial app is working.

Keeping up to date

  • Now, as usual, right-click on the Project
  • Select Team and see the pop right selection box as shown below.
  • Note the new options for Push, Pull besides the usual "Commit" and "Update" selection.
  • I suspect these words have improved my sex life a lot. There is now more foreplay instead of committing right away. Try it.

Pointing to Heng Sin's Kenai Project

  • Low Heng Sin announced his own Mercurial branch in a Kenai repository here.
  • In order to fetch his work, i created a new folder as /opt/repos/kenai and execute the command:

hg clone -U

  • When the downloading process finishes (which is dependent on your download speed), you can then launch your Eclipse and Import via Mercurial Clone process.
  • This time set the Repository Location URL as opt/repos/kenai/hengsin-development
  • Set your Clone Destination (workspace)
  • Check the box for Search for .project files in clone and use them to create projects
    • This is important for the plugins to show up in each other's MANIFEST.
  • Start the project creation by clicking on Finish.

Spring DM Environment

(This is deprecated. See note 2 para further below)

  • As Heng Sin's project is setup as OSGI plugins under the Spring DM environment, you still have one more thing to install in your Eclipse.
  • Following advice from SpringSource you can install via Eclipse by pointing to a new update site

My Notes

  • In my Eclipse i set the Preferences > Plug-in Development > Target Platform > Target definitions: Running Platform (Active) or else there be eclipse plugins unresolved errors
    • INVALID - Set to the given Equinox-Target in HengSin-Development.
  • I use latest Helios Eclipse and update with Mercurial and Spring DM (minimal options)
    • INVALID - Spring DM not needed in Eclipse as the Kenai project already has them.

To Update Further

  • To update further after the clone above you just su root and in the hengsin-development directory issue this command:
hg pull

The following prompts will appear:

searching for changes
adding changesets
adding manifests
adding file changes

Progress Errors (solved, see below)

Finally got it all without errors
  • At the moment i got cyclic complaints in my IDE, (solved by forcing Manifest compile)
  • A gemini.web.tomcat and javax.ejb plugin resources missing,
  • tomcatConfig has missing 'src' (create a 'src')

Progress Notes

  • Aha! Finally solved! Now you can ignore all the above. It is definitely solved by:
    • Setting the workspace to workspace/hengsin-development so that the Equinox-Target synchs its ${workspace_loc} variable, as shown here.
  • When i test launched the Swing client i noticed the version is showing 360LTS. This answered my dummy question which HengSin did not answered. This is how the guru teaches - by leaving my ass alone.
  • In the OSGI Framework - adempiere.equinox.swing configuration, Arguments tab, VM arguments, replace Hengsin's with your own i.e.:
  • During launch, the splash screen got the properties values but seems to hang and error message:
Invalid base directory: /Adempiere
(in progress) - Redhuan D. Oon 04:27, 27 August 2010 (UTC)
  • Then i added another argument:
and no more such complaint but it still seems to hang there. Console display below:
osgi> 2010-08-27 12:38:21.156 java[34670:10b] [Java CocoaComponent compatibility mode]: Enabled
2010-08-27 12:38:21.157 java[34670:10b] [Java CocoaComponent compatibility mode]:   Setting timeout for SWT to 0.100000
Started service locator: org.adempiere.base.equinox.EquinoxServiceLocator@79bff971
2010-08-27 12:38:21.625 java[34670:27f03] *** -[NSConditionLock unlock]: lock  (<NSConditionLock: 0x123b01120> '(null)') unlocked when not locked
2010-08-27 12:38:21.625 java[34670:27f03] *** Break on _NSLockError() to debug.

SourceCode Hung

  • The above issue is at startClass.newInstance(); (org.compiere.apps.AMenu) .
  • So i tried something else such as RUN_setup and got stuck too. Debugging progress here. (Actually the cause is that MacBook starts X not on first thread. Solve by removing -ws from arguments.)

SourceCode UnHung

  • Mysteriously the above hung scenario has resolved. Perhaps after it detected the new jars after the build. Remember HengSin talked about the refactoring of Env to AEnv and that things might be broken, so after the build.xml must have kicked the right context around.
    • But it could also be this other thing i did today, which is to switch the Mac Java from 1.6.0 to Java6
  • However when i press the Server connection icon, i can only get Oracle selection and not PostgreSQL. Ah well, more scuba diving.. - Redhuan D. Oon 08:48, 30 August 2010 (UTC)
    • Solved!, and i learnt sumtin interesting :)
    • HengSin updated this and i pull from his changes to my clone by using Terminal going to /opt/repos/kenai/hengsin-development and execute hg pull. Then in my Eclipse i select Project/Team/Pull (this may be redundant if i setup more properly in my Eclipse.)

ImportAdempiere Issue

  • Now i get psql: FATAL: no pg_hba.conf entry for host "fe80::21c:42ff:fe00:0%en3", user "adempiere", database "adempiere", SSL off
  • Done all sorts of things to my /Library/PostgreSQL/8.3/data/pg_hba.conf, still trying.
  • Solved due to my RUN_setup using PC name instead of 'localhost' for HOST or SERVER.
    • Many thanks to RhodiumToad of chatroom.

Visit Kenai forum

  • If there are no issues and I got some further happenings I will report here.

Reading Materials

See Also

Personal tools