Tag: opensource

Part II: Running Adempiere on IntelliJ IDEA

This part is a continuation of the first part which is creating projects up to compiling Adempiere in IntelliJ IDEA. Part 1: Adempiere on IDEA here. Running Adempiere is even easier that the previous part.

In the first part, we have built the Adempiere with the IntelliJ IDEA’s own build tool. Now, we will build Adempiere to package and prepare it for running inside an Application Server. We will use Glassfish as an Application Server.

The build.xml

The build.xml is an Ant build script necessary for preparing, compiling and packaging Adempiere. Adempiere guys created it for this purpose. I am writing an upgrade to the Ant build script to use a Maven build script for Adempiere.

The default target of build.xml (found in utils_dev\build.xml) is the complete target. The complete target creates all jar, dependencies, and everything else. End output is the installable Adempiere zip file.

Click to open the Ant Build tool window in IntelliJ IDEA

Click the “+” button to add the build.xml

Find the utils_dev\build.xml

Click OK to add.

You will see an “adempiere” in the ant build tool window

Open it and double click the “complete” target to execute.

Figure 9

The result of building should be like this and no error would occur. If there is for example a delete error, just re-run the complete target.

Adempiere in IntelliJ IDEA

Part I: Creating Adempiere project in IntelliJ IDEA

I am an IntelliJ IDEA fanatic since its version 5. It eases all my development efforts especially its shortcut keys in its Editor and the Code refactorings as well as Inspection tool which generally guides me to avoid things that I overlooked. This is the part 1 and click here for the part 2: running adempiere in idea.

Pre requisites

You need to have the following running on your system no matter what OS you use:

If the Subversion asks you about adding the newly created files to the repository, click No.

Now as an end result, there will be one project module present “adempiereTrunk”. When you view its module settings, all sources locate each directory. We will call it the parent project. We will proceed with the creation of the child projects.

Making the Child projects

Make the child modules in the adempiereTrunk parent folder by doing the following steps:

Right click the adempiereTrunk in the Project tool window

Click the New à Module

Figure 4

In the New Module dialog box, select the Import module from external model

Click Next and Select Eclipse as external model

Click Next

Find the module you want to import

Check the Link created IntelliJ IDEA modules to Eclipse project files

Check also the Create module files near .classpath files

Figure 5

Click Next

Select the Eclipse project you want to import as module

Click Finish.

In the end, your Project tool window might look like the above image in Figure 4.

Import the modules in this order to minimize errors of dependency. Although this should not be a problem since IntelliJ will still treat correct dependency even if you imported the dependent module ahead of the depended module:

lib

tools

serverApps

JasperReportTools

Base

Client

Data

JasperReports

JasperReportsWebApp

Db

Extend

Jboss

serverRoot

install

sqlj

webStore

doc

looks

interfaces

launch

migration

packages

posterita

utils

utils_dev

webCM

zkwebui

glassfishfacet

jbossfacet

Once you’ve successfully imported all projects as a module in IntelliJ IDEA, you can now click the Rebuild Project under the Build menu. If there are errors in JasperReportsWebApp, follow instructions below.

Resolving error in JasperReportsWebApp

Right click the JasperReportsWebApp

Click on the Module Settings

Click the Dependencies tab

Click Add à Module Dependencies

Find and add the “base”, then click OK

Click Add à Single Entry Module Library

You will be asked for the Path of the jars, enter the tools\lib folder i.e. C:\workspace\adempiere\trunk\tools\lib\

Select all the jars under the folder as shown below then click OK

Figure 6

Once done, you will end up like this as shown below. Click OK button when finished.

Figure 7

Compiling Adempiere in IntelliJ IDEA

All else successful in the above configuration, we can now compile Adempiere project.

Click the Build menu

Click Rebuild Project

This will show a successful compilation as shown below. No errors would be found, only warnings.

Figure 8

If you wanted to go back to Eclipse as an IDE; it should have no problems since the classpath is already linked with both IDE’s. In Eclipse, select all and then press F5 to refresh. Click Clean and rebuild. It should have nil errors.

Hudson – is an extensible continuous integration engine. With regards to the criteria above, Hudson resides on a servlet container (e.g. Apache Tomcat), has a creative commons license, can run Ant scripts, maven poms, grails, ruby, and shell scripts. It supports cvs, subversion, mercurial and git at least, and has an email, twitter, irc notification. It also supports integration of Eclipse, IDEA, Bugzilla, and JIRA. Best of all, it have a personality.

LuntBuild – is a build automation and management tool (much like a continuous integration server). It resides also on a servlet container, has apache license, and can run ant, maven, and shell script alike. It supports cvs, subversion at least, and has an email notification system.

Here’s the list of Java-based Opensource ERP that I would like to consider in my upcoming retail biz that uses inventory (any suggestions are welcome):

My criteria would be:

Readiness to use

Has a huge client base

Flexibility in development if I would like to extend

Architecture or design of the tool, and

Scalability and adaptability as your biz grows.

Adempiere – I dont know how it got me into this, but most likely this will be the one that I will use and extend if the functionality is insufficient. For one, Adempiere is previously Compiere (the pioneer in open source ERP). Having said that, it has all the functionality of Compiere, uses Application Dictionaries (model driven), uses business rule engine through callbacks (and one can plugin a bash code as a biz rule). It also is UI agnostic – create additional customization and it will exist as both in Swing and DHTML (AJAX). This model and flexibility suits me best.

Adempiere lacks a good website and organize documentation. Its forums and source codes are quite messy and needs a divine intervention. Resources are many and tend to spread out. Has books develop for it. Has a straight one month learning curve. Posterita (POS) is integrated as much as its client POS.

Openbravo ERP – is an open source ERP solution designed specifically for the SME (small to midsize firm). Developed in a web based environment, it includes many robust functionalities which are considered part of the extended ERP: procurement and warehouse management, project and service management, production management, and financial management. Additionally, this same application seemlessly integrates the rest of the areas, starting with a management scope directly helping clients with its CRM (Customer Relationship Management) and BI (Business Intelligence).

In comparison with Adempiere, Openbravo has a very clean interface, organized workflows, and easily extensible. But Adempiere is more complete and more business focus. Also, although they claim that the POS is integrated in the Openbravo ERP, it relies on a third party application, and is not fully integrated. The business intelligence and reporting tool is top of the class and exceeds any opensource ERP. Has a huge user and client base.

Apache OfBiz – Apache OFBiz is a foundation and starting point for reliable, secure and scalable enterprise solutions. Use it out-of-the-box (OOTB) or customize to suite even your most challenging business needs. With OFBiz in place, you can get started right away and then grow your operations as your business grows, without the huge deployment and maintenance costs of traditional enterprise automation systems.

OFBiz is more leaning towards e-commerce, has a huge client base, and designed from the ground up to be customizable (but not easily for me). They have a good and organized documentation, no restrictions of the license, and provides a good architecture for its development; but it lacks user friendliness and readiness to use; it is very huge and requires a massive amount of hardware resources. Bottomline – OFBiz is a good ERP oriented towards big enterprises that is willing to implement its own IT. In my case, I am a small one. =(

Here are others that I think did not pass worth considering:

JFire – is an opensource (LGPL) ERP Framework, build with technologies like J2EE 1.4, JDO 2.0 and Eclipse RCP 3.2. It is designed to be highly customizable and the core framework can also be used for other purposes then ERP. However this lacks functionality and readiness of use.

JAllInOne – is an open source ERP/CRM java application having a Swing front-end. It is a Rich Internet Application so the front-end can remotely comunicate with the server-side layer of JAllInOne via HTTP protocol. Main features: Sales, Purchases, Warehouse, Bill of materials and production, Accounting, Agenda, CRM, Customers and contacts hierarchies, Callouts and appoinments management, Document management, Users and roles management, database schema management, grids and forms customization, reporting solution based on Jasper Report, reports customization.

Wavelet EMP – is a web-based ERP built on J2EE framework that caters for the needs of franchises and chain stores. It includes CRM, Point of Sales, Inventory Management, Warehouse Management, System Administration, Accounting, Finance, Supply Chain, Distribution & Logistic, Trading modules, etc.