Bloggers recientes

Melanie Chung

Staff
3 Mensajes
25 de julio de 2016

Patrick Chung

Staff
1 Mensajes
25 de julio de 2016

Bryan Cheung

Staff
35 Mensajes
18 de julio de 2016

Jamie Sammons

Staff
4 Mensajes
14 de julio de 2016

David H Nebinger

24 Mensajes
13 de julio de 2016

Maarten van Heiningen

1 Mensajes
13 de julio de 2016

Koen Olaerts

1 Mensajes
11 de julio de 2016

Victor Zorin

2 Mensajes
9 de julio de 2016

Neil Griffin

Staff
54 Mensajes
6 de julio de 2016

David Truong

Staff
17 Mensajes
5 de julio de 2016
« Atrás

Deploying Liferay artifacts to your own maven repository

Company Blogs 21 de febrero de 2012 Por Mika Koivisto Staff

As part of Liferay 6.1 release we’ve created a new package that has a convenient  script to install Liferay artifacts to your local repository or to a remote repository. This package is provide for both CE and EE releases but it is more useful for EE users because we don’t release EE versions of the artifacts to Maven Central repository.

You can download the 6.1 GA1 package from here and 6.1 EE users can download it from Customer Portal. Once you have downloaded the zip file unzip it. 

In the root of the package you’ll find build.properties. This file defines the remote repository location, repository id and optional gpg signing key and password. You can override settings in this file similarly to those in plugins sdk by creating a build.USERNAME.properties file and overriding the properties you want. If you are just deploying to you local repository there’s no need to override any settings. 

Before you begin you should make sure you have mvn in your path. For remote deployment you should also increase the available memory for maven otherwise you might get a OutOfMemoryError. For windows you can use following in your cmd prompt or set MAVEN_OPTS environment variable.

set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m

For Unix-like systems such as Linux and Mac OS X use

export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"

To deploy to your local maven repository you can just run:

ant install 

To deploy to a remote repository such as Sonatype Nexus you need to set credential required to deploy to the repository in ${USER_HOME}/.m2/settings.xml like this:

<?xml version="1.0"?>
<settings>
    <servers>
        <server>
            <id>liferay</id>
            <username>admin</username>
            <password>password</password>
        </server>
    </servers>
</settings>

Then you need to add the repository id and repository location to your build.USERNAME.properties like this:

lp.maven.repository.id=liferay lp.maven.repository.url=http://localhost/nexus/content/repositories/liferay-release

Notice that the repository id must match the one in your settings.xml so that correct credentials are picked up. You can also set gpg.keyname and gpg.passphrase if you want the artifacts signed. Check out this blog post on how to generate gpg key and distribute the public key.

Now you can deploy it just by running:

ant deploy

Now you have following Liferay artifacts at your disposal. Their groupId is com.liferay.portal and artifactId is one listed below and version is the Liferay release number such as 6.1.0 for 6.1 GA1 and 6.1.10 for 6.1 EE1.

  • portal-client
  • portal-impl
  • portal-service
  • portal-web
  • support-tomcat
  • util-bridges
  • util-java
  • util-taglib
Respuestas anidadas Autor Fecha
Any word on when the 6.1EE GA1 Maven artifacts... Keith O'Connell 22 de febrero de 2012 4:13
nice! Thanks Mika. Jonas Yuan 22 de febrero de 2012 8:11
Keith, it'll be there by end of the week. Mika Koivisto 22 de febrero de 2012 9:25
Perfect, great info! Thanks a bunch! Keith O'Connell 22 de febrero de 2012 13:33
Still waiting for the EE artifacts... Henri Koskenranta 26 de febrero de 2012 23:25
Is active development of liferay-maven-support... Kamesh Sampath 27 de febrero de 2012 4:33
Kamesh, it's currently in maintenance mode but... Mika Koivisto 28 de febrero de 2012 15:15
Henri, it's there now. Sorry for the delay. Mika Koivisto 6 de marzo de 2012 12:44
As per you mentioned above we do not require to... Sagar A Vyas 8 de enero de 2016 18:22
Finally found the solution of this problems and... Sagar A Vyas 10 de enero de 2016 21:34
Superb Abdulbasit Shaikh 21 de junio de 2016 4:14
Superb Sagar Vyas Abdulbasit Shaikh 21 de junio de 2016 4:18
Thank you Abdulbasit :) Sagar A Vyas 21 de junio de 2016 14:22
Valuable article - I was fascinated by the... Niki Heaney 19 de marzo de 2016 23:38

Any word on when the 6.1EE GA1 Maven artifacts might be ready for distribution? Not seeing them on the Customer Portal yet.
Publicado el día 22/02/12 4:13.
Publicado el día 22/02/12 8:11.
Keith, it'll be there by end of the week.
Publicado el día 22/02/12 9:25 en respuesta a Jonas Yuan.
Perfect, great info! Thanks a bunch!
Publicado el día 22/02/12 13:33 en respuesta a Mika Koivisto.
Still waiting for the EE artifacts...
Publicado el día 26/02/12 23:25.
Is active development of liferay-maven-support is happening ? do you have any release schedules, if people want to contribute how do they do it just fork and send you a pull req ?
Publicado el día 27/02/12 4:33.
Kamesh, it's currently in maintenance mode but development should pick up once we start developing Liferay 6.2 at full force. If you want to contribute open a ticket in MAVEN Jira project, mark the ticket contributed and accept the contributor agreement and send a pull request to me. Also comment the pull request url to the ticket so that others can also see it.

Any issues that are set with fix in version Community backlog is something we are looking for community contributions and of course other ideas are also more than welcome. It's also recommended to solicit others input on contributions on the Contributions forum category http://www.liferay.com/community/forums/-/message_boards/category/555425
Publicado el día 28/02/12 15:15 en respuesta a Kamesh Sampath.
Henri, it's there now. Sorry for the delay.
Publicado el día 6/03/12 12:44 en respuesta a Mika Koivisto.
As per you mentioned above we do not require to have build.<username>.properties file if we are dealing with local M2 folder (correct me if I miss understood it ) so I just need to extract maven pacakge and hit ant install command ? while doing this I am getting error "Property lp.maven.repository.url was circularly defined."

Now I dont have anything in setting.xml (id ,url) as I am dealing with local M2 how can execute this command without setting this property ?

Help would be appreciated.

Thanks,
Sagar Vyas
Publicado el día 8/01/16 18:22.
Finally found the solution of this problems and others, it seems that apache mvn.bat is renamed to mvn.cmd with maven 3.3.1 version onward provided I have shared all three solution here http://share4gain.blogspot.com/2016/01/solution-possible-errors-while.html

Hope this will help.

Thanks Mika for sharing this.

Thanks,
Sagar Vyas
Publicado el día 10/01/16 21:34 en respuesta a Sagar A Vyas.
Valuable article - I was fascinated by the specifics , Does someone know if I could find a fillable a form example to edit ?
Publicado el día 19/03/16 23:38.
Publicado el día 21/06/16 4:14 en respuesta a Sagar A Vyas.
Publicado el día 21/06/16 4:18 en respuesta a Sagar A Vyas.
Thank you Abdulbasit emoticon
Publicado el día 21/06/16 14:22 en respuesta a Abdulbasit Shaikh.