Testing Liferay plugins with Arquillian

 Liferay  Comments Off on Testing Liferay plugins with Arquillian
Jan 152016
 

Testing Liferay plugins is not an easy task. Nowadays, integration tests in Liferay are easier using Arquillian. Arquillian is an innovative and highly extensible testing platform for the JVM that enables developers to easily create automated integration, functional and acceptance tests for Java middleware. In this post we are going to write the steps you need to follow in order to Arquillian works and we will also describe some of the errors that you could find. Continue reading »

Típicos problemas con Liferay

 Liferay  Comments Off on Típicos problemas con Liferay
Oct 282013
 

Los típicos problemas que nos podemos encontrar con Liferay al comenzar a trabajar con él, creando temas, portlets, etc., pueden ser:

  • Al crear un tema, portlet, etc. desde Liferay IDE (eclipse), o bien ejecutando el correspondiente create.sh o create.bat, nos da problemas ivy con la librería xalan. Lo que hay que hacer es bajarse manualmente la librería xalan desde cualquier respositorio, ivy o maven, que podamos encontar en internet (concretament xalan-2.7.1.jar es la que suele dar problemas), por ejemplo http://mirrors.ibiblio.org/pub/mirrors/maven/mule/dependencies/maven2/xalan/xalan/2.7.1/xalan-2.7.1.jar y copiarla manualmente en el repositorio ivy de Liferay, que está bajo el directorio .ivy de nuestro directorio sdk de Liferay.
  • Liferay utiliza ecj.jar (Eclipse compiler for Java) para ejecutar la compilación java desde los build.xml de ant. Hay que copiar manualmente el archivo ecj.jar en el directorio lib de de ant que tengamos instalado en nuestro sistema operativo. En mac y en linux es posible que tengamos que hacer esta copia con sudo. Más información sobre este problema podemos obtener consultando http://www.liferay.com/es/community/wiki/-/wiki/Main/ECJ
  • Al ejecutar desde Eclipse con un build.xml, por ejemplo, para crear themes, se puede dar el siguiente error:

    Para solucionar este problema debemos añadir el ecj.jar en el classpath de ant de Eclipse, como se muestra en la siguiente imagen:

    También convendría añadir el archivo tools.jar del jdk que tengamos activo.