Liferay 7 PluginSDK ivy problem

In Liferay 7 Community Edition or in Liferay 6 CE,  most of the developers will issues in creating portlet plugin.  In eclipse, ant build will get stopped at ivy-settings.xml file.   you can’t create new Liferay New Plugin Project with new plugin sdk with ivy issue.   Ant process will be hanged at “Loading ivy settings”.

[ivy:resolve] :: Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = D:\programming\com.liferay.portal.plugins.sdk-7.0\ivy-settings.xml
c
you will get below error also:
[ivy:resolve] You probably access the destination server through a proxy server that is not well configured.
[ivy:resolve] You probably access the destination server through a proxy server that is not well configured.
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] Host cdn.lfrs.sl not found. url=https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
[ivy:resolve] Host repository.liferay.com not found. url=https://repository.liferay.com/nexus/content/repositories/liferay-private-releases/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
[ivy:resolve] [FAILED ] org.apache.commons#commons-lang3;3.4!commons-lang3.jar: (0ms)
[ivy:resolve] ==== local-m2: tried
[ivy:resolve] file://C:\Users\jay/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
[ivy:resolve] ==== liferay-public: tried
[ivy:resolve] https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
[ivy:resolve] ==== liferay-private: tried
[ivy:resolve] https://repository.liferay.com/nexus/content/repositories/liferay-private-releases/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: FAILED DOWNLOADS ::
[ivy:resolve] :: ^ see resolution messages for details ^ ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: org.apache.commons#commons-lang3;3.4!commons-lang3.jar
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

Solution to Liferay 7 ivy settings:

  • Update ivy setting in build.properties file.
    • open the build.properties file, Edit directly (or in build.{username}.properties)
    • set ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar
    •  ivy.version=2.4.0
    • These settings are enough for Liferay 6.2 Plugin SDK Ivy Problem
  • Replace the  ivy-settings.xml to below: (Only for Liferay 7 Plugin SDK Ivy )
    • comment  “liferay-private” and it dependencies
    •  change the liferay-public url to “http://cdn.repository.liferay.com/nexus/content/groups/public”
    • below is workable ivy-settings.xml file and you can replace whole content with below:
    • <ivysettings>
       <settings defaultResolver="default" />
       <!--<credentials host="repository.liferay.com" passwd="${ivy.repository.liferay.private.password}" realm="Sonatype Nexus Repository Manager" username="${ivy.repository.liferay.private.username}" />
       -->
       <resolvers>
       <!--<ibiblio m2compatible="true" name="liferay-private" root="${ivy.repository.liferay.private.url}" /> -->
       <ibiblio m2compatible="true" name="liferay-public" root="http://cdn.repository.liferay.com/nexus/content/groups/public" />
       <ibiblio m2compatible="true" name="local-m2" root="file://${user.home}/.m2/repository" />
       <chain dual="true" name="default">
       <resolver ref="local-m2" />
       <resolver ref="liferay-public" />
       <!--<resolver ref="liferay-private" /> -->
       </chain>
       </resolvers>
      </ivysettings>

That’s it.  Issue is resolved. Hope this helps.

2 Comments

  1. Pingback: Liferay 7 plugin sdk tutorial,Liferay 7 plugin SDK portlet tutorial,liferay 7

  2. Ramya

    Thanks for the ivy problem. It saved my day.

    Reply

Leave a Reply to Ramya Cancel reply

Your email address will not be published. Required fields are marked *