Foros de discusión

Building Plugin with another project reference

Kan Kon, modificado hace 11 años.

Building Plugin with another project reference

New Member Mensajes: 23 Fecha de incorporación: 13/09/11 Mensajes recientes
How do I include another project for building a project? For example, I have a portlet project available. When building a new plugin project, how can i include the other portlet project? From IDE, I could add the build path, but at the time of compilation it fails as though the referred classes are not available in the classpath. Any ideas? Thanks.
thumbnail
David H Nebinger, modificado hace 11 años.

RE: Building Plugin with another project reference

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
You cannot do this.

As separate plugins they are deployed as separate artifacts (WAR files). The application container will not allow you to share classes between WAR files.

For shared code, you have a couple of options:

1. build separate jar and put into global lib (i.e. tomcat's lib/ext directory).
2. build separate jar and deploy as part of EXT plugin (other plugins can access the code by including the jar in liferay-plugin-package.properties file).
3. build separate EXT plugin and put code there (results in a separate jar file to include in liferay-plugin-package.properties file).
4. manually copy code between the plugins.
thumbnail
Roberto Díaz, modificado hace 11 años.

RE: Building Plugin with another project reference

New Member Mensajes: 24 Fecha de incorporación: 30/10/12 Mensajes recientes
Paste the .jar from the first project available on the lib folder from the second one and add this jar to the build path.