Difference between revisions of "Create your ADempiere development environment"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(Download ADempiere sources)
(Compile ADempiere sources)
Line 121: Line 121:
 
* doc
 
* doc
  
 +
If you run into problems, probably org.compiere.util.CPreparedStatement won't compile. Resolve that by making sure you compile on Java 5.0 SDK and run the build script in trunk/utils_dev/RUN_build.sh|bat. If it doesn't work the first time, run the trunk/utils_dev/RUN_clean.sh|bat and build again.
  
 
How to define Java Build Path:
 
How to define Java Build Path:

Revision as of 00:30, 15 April 2007

Preparing your Environment

Download and install

You need JDK 1.5 to work with adempiere source. You can define in file "eclipse.ini" on the Eclipse installation directory which jvm to use.

Subclipse enables you to access the Adempiere subversion repository (SVN) through eclipse.

Subclipse installation

1.- Automatic subclipse installation

In Eclipse Menu->Help/Software Updates/Find&Install. Select Subclipse.

2.- Manual installation

If automatic subclipse installation fails: download Subclipse installation file (e.g. site-1.2.0.zip). In Eclipse Menu->Help->Software Updates->Find&Install. Search for "New features to install", "New archived site". Select downloaded file (e.g. site-1.2.0.zip). In the following dialog deactivate "Subclipse mylar integration".

Verification of correct Subclipse installation: Eclipse Menue ->Help->Software Updates->Manage Configuration. If you expand eclipse, you will see for example Subclipse 1.2.0.

These tools install differently depending on your Operating System. When provided information on these websites does not suffice, try to find help on the forums of your Operating System or unofficial forums about these tools.

For Oracle installation in Linux: read and follow carefully each step described in http://www.puschitz.com/InstallingOracle10gOnSUSE.shtml.

Download ADempiere sources

1 Download ADempiere sources with Subclipse (for Linux and Windows)

First, you have to work in the "SVN Repository Exploring" perspective of Eclipse:

  • Open Eclipse
  • Eclipse menu->Window->Open Perspective->Other
  • Then select SVN Repository Exploring


Create a new Repository Location within the "SVN Repository Exploring" :

  • right mouse click on SVN Repository Exploring->New->Repository location
  • Type in the location URL: https://adempiere.svn.sourceforge.net/svnroot/adempiere. The Adempiere SVN Repository tree will be created
  • Open the Repository tree, select the project you wish and check it out


Updating with Subclipse

  • In Eclipse, select the java perspective and "Package Explorer" view (Eclipse menu->Window->View->Package Explorer)
  • Select the Adempiere project
  • Right mouse click -> team -> update or Right mouse click -> team -> Synchronize with Repository


2 Download ADempiere sources with Tortoise SVN (only for Windows)

  • Download and Install Tortoise SVN (http://tortoisesvn.net/downloads). Tortoise SVN is integrated with Windows explorer.
  • Create a directory e.g. C:\srcAdempiere\trunk
  • Open windows explorer and navigate to e.g. C:\srcAdempiere\trunk
  • Right click on trunk and choose "SVN checkout"
  • Fill URL of repository with: https://adempiere.svn.sourceforge.net/svnroot/adempiere/trunk
  • Click OK. It starts checking out the trunk immediately. If the connection broke in the middle of checkout, you just right-click on trunk and select "SVN update" option


Updating with Tortoise SVN

  • Open a windows explorer and go to the project you want to update
  • Right mouse click ->Tortoise SVN->update to revision
  • If you want to update to the newest version, just press OK. Otherwise, you can enter the version you wanto to update to
  • You will find many convenient funtions with the Tortoise context menu: Right mouse click ->Tortoise SVN



3 Checking out

There are two different flavours:

  • checking out Adempiere as a single project
  • Checking out the projects of the trunk once at a time

Both alternatives work and have their advantages/disadvantages.

- Checking out many projects allow closing some projects in Eclipse and thus reduce memory usage. Multiple projects allow to use project dependency.

- Checking out one sigle project is less time-consuming.

Choose the one you feel most comfortable with.


4 Creating the project "Adempiere" in Eclipse

  • Open Eclipse, java perspective, package explorer view
  • Eclipse menu->File->New->Project
  • In the following dialog, select "Java Project" and "Next"
  • Type in "Adempiere" as the Project name
  • Check the radio button "Create project from existing source"
  • Click the "Browse" button and go to the directory which contains the project you want to include (the directory has a file named ".project" )
  • Set the Build Path as specified in the next section
  • Click "Finish"

Compile ADempiere sources

Although sources don't compile right away, nothing is really wrong with it. All you need to do is checking the Java Build Path and libraries of each project that doesn't compile. It happens these paths need an update before eclipse manages to compile it all.

To make things easier, follow this list in same order. This way you respect the project dependencies.

  • Tools
  • Looks
  • dbPort
  • Print
  • Base
  • serverRoot
  • Interfaces
  • Extend
  • Client
  • serverApps
  • Install
  • sqlj
  • webstore
  • doc

If you run into problems, probably org.compiere.util.CPreparedStatement won't compile. Resolve that by making sure you compile on Java 5.0 SDK and run the build script in trunk/utils_dev/RUN_build.sh|bat. If it doesn't work the first time, run the trunk/utils_dev/RUN_clean.sh|bat and build again.

How to define Java Build Path:

- Select the java perspective, Package Explorer view

- Click Adempiere

- Right mouse click -> Properties

- Select Java Build Path, tab "Order and Export"

- Check above entries and arrange them in the described order

See also