Friday, June 15, 2012

Convert Maven Project To Eclipse Project

Most Eclipse user using m2e  plugin to handle Maven projects in Eclipse, while Maven provide maven-eclipse-plugin to convert Maven project to Eclipse by running command line: mvn eclipse:eclipse.
There is a problem; m2e doesn't like maven-eclipse-plugin results and occasionally produce an error.
So my suggestion, don't use "mvn eclipse:eclipse" cli to convert Maven project into Eclipse's.

Import Maven Project To Eclipse

M2e provide a wizard for this purpose. This wizard can be found in the Import menu: File->Import.
  1. Open menu: File->Import
  2. Select wizard: Maven->Existing Maven Project
  3. On the "Import Maven Projects" wizard, select root directory. Root directory is a folder contain Maven projects. (Maven project is a folder contain pom file and other folder like src...etc). Please don't be confused with this two different things.
  4. After root directory is selected, the existing Maven project will be displayed.
  5. Click "Finish" button to start importing process, then you will get the project is imported on you eclipse workspace.

Resolving Error

When we use maven-eclipse-plugin result some error may occur since m2e doesn't compatible with maven-eclipse-plugin.
  1. "Unsupported IClasspathEntry" error. The detail error can be founded here. Solution: either you have to reimport the project using m2e importing wizard or just delete the .classpath file in the project folder then run m2e "update project ..." wizard in the context menu.

About m2e (and formerly m2eclipse)

  1. Changing from m2eclipse to m2e (Eclipse 3.7 - Indigo)





Saturday, March 3, 2012

Eclipse Modeling Tools IDE untuk Hibernate

Merancang hibernate data model akan lebih mudah jika dilakukan secara grafis. Kita sangat beruntung karena eclipse menyediakan tool modeling berkualitas tinggi. yang dapat digunakan secara gratis.

Tool yang dibutuhkan :
1. Eclipse Modeling Tools IDE (Eclipse 3.7 Indigo).
2. Papyrus
3. MoDisco
4. Teneo 1.2.0
5. CDO 4.0

Installasi
  1. Pertama-tama download Eclipse Modeling Tools IDE di sini
  2. Extract dan jalankan eclipse.exe pada hasil extract. 
  3. Jalankan eclipse
  4. Install " EMF Teneo and EMFT Texo dependencies" melalui update site ini.
  5. Install "Teneo 1.2.0" melalui update site ini. 
  6. Install "CDO 4" melalui update site ini.
  7. Pilih Papyrus, MoDisco dan Teneo. Klik Finish dan ikuti instruksinya.
  8. Setelah restart eclipse, maka lingkungan kerja untuk modeling Hibernate sudah siap.
Papyrus is an open source component of the
Model Development Tools (MDT) subproject to provide an integrated environment
for editing UML and SysML models. Specially, this project will provide the glue
around valuable UML and SysML diagram editors (GMF-based or not) and other MDE
tools. It will also offer support for UML and SysML profiling mechanisms.

MoDisco provides standard metamodels to describe existing systems, discoverers
to automaticaly create models from Java and XML source code, and generic tools
to understand and transform complex models.

Teneo. The EMF – Hibernate integration supports all EMF features and standard EclipseLink and Hibernate features. EMF objects can be persisted in most major relational databases and retrieved using an EMF resource approach or HQL/JPA queries. A distinctive feature of Teneo is that you can override/extend the Model-Relational mapping using JPA annotations in the model.

Dependencies Versions :
Teneo

com.microsoft.sqlserver.jdbc3.0.1301.101
com.mysql.jdbc5.1.11
javax.persistence2.0.1
org.apache.commons.logging1.1.1
org.apache.log4j1.2.16
org.dom4j1.6.1
org.hibernate3.6.0.201107071603
org.hsqldb1.8.1
org.postgresql9.0.0.801