I've been trying to generate bunch of services using
mvn liferay:build-service -P liferay-plugins-developmentwhere liferay-plugins-development profile contains properties setting of my liferay version and deployment directory, and was bumped with the following exception
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.172s [INFO] Finished at: Sat Mar 10 16:50:43 EST 2012 [INFO] Final Memory: 4M/15M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:6.1.0:build-service (default-cli) on project myliferay-portlet: Execution default-cli of goal com.liferay.maven.plugins:liferay-maven-plugin:6.1.0:build-service failed: An API incompatibility was encountered while executing com.liferay.maven.plugins:liferay-maven-plugin:6.1.0:build-service: java.lang.AbstractMethodError: com.liferay.util.sl4fj.LiferayLoggerAdapter.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljav/lang/Throwable;)V [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>com.liferay.maven.plugins:liferay-maven-plugin:6.1.0 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/...../maven_repo/com/liferay/maven/plugins/liferay-maven-plugin/6.1.0/liferay-maven-plugin-6.1.0.jar [ERROR] urls[1] = file:/...../maven_repo/com/liferay/portal/portal-impl/6.1.0/portal-impl-6.1.0.jarSuspect this has something to do with different version of SLF4j that is not compatible with the one that maven resolved to when running liferay-maven-plugin, so went ahead and force the SLF4j version that the plugin was using to 1.5.5
...It seems to fix this issue, but now I'm bumped with another NullPointerException coming off liferay-maven-plugin source itself. Logged a defect with the Liferay team here (MAVEN-15). Will have to wait and see how this paints out.... ... com.liferay.maven.plugins liferay-maven-plugin ${liferay.version} ${liferay.auto.deploy.dir} ${liferay.version} portlet org.slf4j slf4j-log4j12 1.5.5
Liferay-maven-plugin turns out to be quite a pain in the neck for me ... :-( Guess I should be evaluating Liferay IDE instead to see if it suits me better. It does required that the whole plugins project to be under a Liferay-Plugin-SDK directory though.
Thanks for figuring this out, you are a life saver.
ReplyDelete