Foros de discusión

Liferay + Maven?

Henrik Bernström, modificado hace 15 años.

Liferay + Maven?

Junior Member Mensajes: 43 Fecha de incorporación: 5/10/07 Mensajes recientes
Hi,

as I've understood it there is no support for using Liferay with Maven. Is there any plan to support this in the future? Personally I think it's a brilliant tool.

Regards,
/Henrik
Henrik Bernström, modificado hace 15 años.

RE: Liferay + Maven?

Junior Member Mensajes: 43 Fecha de incorporación: 5/10/07 Mensajes recientes
As the professional open source application Liferay is, I think the usage of a professional convention over configuration project management tool like Maven ought to be considered. Have you?

Maven: The Definitive Guide (Free PDF Book)
http://www.sonatype.com/book/#

I don't think Maven is overly complex or a "bulky beast", as I've read here in old forum threads. Maven is more or less the defacto standard build tool for open source projects. It would for sure lower the barriers of learning the build process of Liferay for newcomers if it was incorporated.

Cheers!
/Henrik
thumbnail
Ralph Goers, modificado hace 15 años.

RE: Liferay + Maven?

New Member Mensajes: 6 Fecha de incorporación: 11/06/08 Mensajes recientes
We used Maven 1 for our builds with Liferay and are just converting to use Maven 2. The steps are basically:

1. Get the Liferay source
2. run ant start and ant build-ext as described in http://content.liferay.com/4.3/doc/devel/liferay_4_extension_environment_guide/multipage/ch02s02.html
3. Configure the ext environment targeted for the desired app server and point the target app server directory to an empty directory . Do not do anything else in the ext area.
4. run ant install.
5. Deploy the appropriate Jars and tlds to your Maven repository - this step should be happening with each Liferay release but isn't. See LEP-4965 and vote for it.
6. Zip the contents of the target app server directory created by running ant install. Deploy to your maven repository.
7. Create normal maven projects for your customizations using the Liferay jars deployed to the repository.
8. Build a portal project that has the zip file as a dependency. Ideally Liferay should be providing this as an Archetype.
9. Customize your portal project with an updated web.xml, portal-ext.properties, etc.
10. Build your portal. This will consist of unzipping the zip file, overlaying files with files in this project and then adding any necessary jars that are specified as dependencies. All this could be done with the assembly plugin. Again, if Liferay provided the Archetype the assembly would already be there.
11. You should now have a package that can be overlayed on top of your chosen container.

Liferay could and should make this much easier by providing the mentioned components above.