3

I am trying to create an liferay 7 plugin project using Ant and I am always recieving the below error, can someone help ?

it seems that the server mirrors.lax.liferay.com is down

[Console output redirected to file:/Users/yjradeh/foo/java/workspace/.metadata/.plugins/com.liferay.ide.sdk.core/sdk.log]
Buildfile: /Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/portlets/build.xml
      [get] Getting: http://mirrors.lax.liferay.com/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
      [get] To: /Users/yjradeh/.liferay/mirrors/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
      [get] Error getting http://mirrors.lax.liferay.com/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar to /Users/yjradeh/.liferay/mirrors/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
      [get] Getting: http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
      [get] To: /Users/yjradeh/.liferay/mirrors/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar

BUILD FAILED
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/portlets/build.xml:5: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common-plugins.xml:5: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common.xml:57: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common-ivy.xml:130: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common-ivy.xml:81: HTTP Authorization failure

Total time: 1 second
brandizzi
  • 26,083
  • 8
  • 103
  • 158
yjradeh
  • 233
  • 4
  • 11

3 Answers3

4

I had the same issue while trying to compile the SDK, you can try this url: https://repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/. Instead of the old one. They apparently change the repository of Liferay, you can check it on Date Modification on :https://repository.liferay.com/nexus/content/repositories/.

Najlaa Stitou
  • 41
  • 1
  • 4
  • try changing this ivy.jar.url=https://repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar in build.properties, then you follow this to put a jar of evy to make it work [link](http://stackoverflow.com/questions/12677816/ant-target-failing-antlib-or-ivy-issue) – Najlaa Stitou May 15 '16 at 21:13
2

Steps/Prerequisite for liferay on windows:

  1. Firstly we need liferay IDE, which we can download from https://web.liferay.com/downloads/liferay-projects/liferay-ide , If you dont have eclipse editor select eclipse neon 2+liferay IDE. Or if you are having eclipse go for update archive file.
  2. Second we need liferay plugin sdk here’s the link: https://www.liferay.com/downloads , under liferay portal CE(Community Edition) select plugins sdk.
  3. Third, you need to download apache ant.
  4. Download tomcat bundle from link provided in 2nd point.
  5. Setup ANT_HOME, ANT_OPTS, CATLINA_HOME,JAVA_HOME,and JRE_HOME, and append their path accordingly in the Path field.
  6. Let’s configure the sdk file before moving next. Keep the bundled tomcat and sdk extracted files at same folder location(mandatory). That is keep same extraction folder for tomcat and sdk plugins.
  7. In plugins folder which you would extract, you’ll find build.properties. Replicate that file with build.username.properties. For example in my case it would be build.Jennis.properties, Keep in mind the case of the Username of your PC/laptop. And add the following line of code at the end of the file app.server.dir=path_to_sdk../bundles/path_to_tomcat in build.username.porperties. In my case the appended line would be app.server.dir=C:\Users\Jennis\Documents\Downloads\com.liferay.portal.plugins.sdk-7.0/../bundles/tomcat-8.0.32
  8. Create a bundles folder and keep the extracted folder other than SDK plugins in bundles folder.
  9. Now we are ready to go with directly eclipse for liferay 7.0.2 installation in eclipse. Open Eclipse →Help →Install New Software. Locate the liferay IDE archive from browse button.
  10. Now we need to add the server for liferay, to do so right click in servers window in eclipse and click on new select liferay →liferay7.x configure it and give path to tomcat8.0.32 bundle.
  11. Run the server it will lead you to localhost:8080, configure it with defaults(not mandatory) for our example defaults are fine.
  12. After eclipse installs the new software, it would restart in toolbar menu find the below icon and click new liferay plugin project!
  13. If toolbar doesn't show than find it from Window →Appearance → Show Toolbar. Now click above icon and click new liferay plugin project!
  14. Give your portlet a name.
  15. Select build type as: Ant(liferay-plugins-sdk).
  16. Select liferay MVC for sake of simplicity.
  17. Next you will be prompted with SDK location give the location of SDK plugin extracted folder, which were kept at same folder at time of extracting it.
  18. Project would be created and celebrate the first portlet.
xlm
  • 6,854
  • 14
  • 53
  • 55
Jennis Vaishnav
  • 331
  • 7
  • 29
1

I have also ran into this problem. The solution was in my case to change the ivy settings in build.properties (in plugins SDK root directory) like this:

ivy.version=2.4.0
ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar

I'm however not familiar with changes Liferay made in the PATCHET version of ivy, so it could possibly lead to some other problem. But it works for portlets apparently.

shimon001
  • 733
  • 9
  • 24