The Java alternatively way if anyone else is interested.
import org.hibernate.cfg.Configuration;
import org.hibernate.ejb.Ejb3Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
......
Configuration cfg = new Ejb3Configuration().configure("org.jbpm.task",null).getHibernateConfiguration();
SchemaExport export = new SchemaExport(cfg);
export.setOutputFile("org.jbpm.task.sql");
export.setDelimiter(";");
export.setFormat(false);
export.execute(true, false, false, false);