How can I build Liferay 7.0 from source?

How can I build Liferay 7.0 from source?

To build Liferay 7.0 from source:

  1. Obtain the source code:*

    git clone -b 7.0.x https://github.com/liferay/liferay-portal.git \
        --depth 1
    
  2. Navigate to your new liferay-portal directory:

    cd liferay-portal/
    
  3. In your app.server.${yourname}.properties file, set the location where you want Liferay 7.0 to be built:

    echo "app.server.parent.dir=/path/to/liferay-portal" \
        > "app.server.$(whoami).properties"
    
  4. Optional: If you want to build the Wildfly 10 bundle rather than the default Tomcat bundle:

    1. Add app.server.type=wildfly to app.server.${yourname}.properties:

      echo "app.server.type=wildfly" \
          >> "app.server.$(whoami).properties"
      
    2. Download and unzip Wildfly in your ${app.server.parent.dir} directory:

      ant -f build-dist.xml unzip-wildfly
      
  5. Build Liferay 7.0:

    ant clean all
    

Now you should be able to start up Tomcat (or Wildfly), and Liferay 7.0 should be accessible at localhost:8080.

* I recommend getting a shallow clone since Liferay is a huge project with massive amounts of history and commits. Shallow cloning speeds up the clone process quite a bit.

Blogs
G:\liferay-portal> git clone https://github.com/liferay/liferay-portal.git --depth 1
Cloning into 'liferay-portal'...
remote: Counting objects: 59285, done.
remote: Compressing objects: 100% (39301/39301), done.
remote: Total 59285 (delta 17638), reused 41923 (delta 9058), pack-reused 0
Receiving objects: 100% (59285/59285), 1.05 GiB | 878.00 KiB/s, done.
Resolving deltas: 100% (17638/17638), done.
Checking connectivity... done.
error: unable to create file .gradle/caches/modules-2/files-2.1/com.liferay.arquillian/arquillian-deployment-generator-bnd/1.0.0.Alpha1-20150126.151531-9/3d3e5e1e3fd0cc789655d65819e51878f6bc8025/arquillian-deployment-generator-bnd-1.0.0.Alpha1-20150126.151531-9.jar (Filename too long)
# I removed several "(Filename too long)" error messages for brevity.
# See the full error message for more details: https://gist.github.com/stiemannkj1/41c169b1a16508159d08078a510842fb
# -Kyle
error: unable to create file modules/apps/web-experience/site-navigation/site-navigation-breadcrumb-web/src/main/java/com/liferay/site/navigation/breadcrumb/web/configuration/definition/SiteNavigationBreadcrumbPortletInstanceConfigurationBeanDeclaration.java (Filename too long)
Checking out files: 100% (40886/40886), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD
Hi ildar,
Seems like you are on Windows, and you are running into a problem with the system's 260 character file path restriction (https://msdn.microsoft.com/en-us/library/aa365247.aspx). Please check out the following StackOverflow questions and answers and see if they help:

http://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows
http://stackoverflow.com/questions/21123415/git-pull-aborted-with-error-filename-too-long
http://stackoverflow.com/questions/14811991/git-checkout-error-unable-to-create-file

- Kyle
Hi

While running step "ant clean all", getting following error.
[propertyfile] Updating property file: C:\Liferay Workspace\Source\liferay-portal\.gradle\gradle.properties
[exec] Error: Could not find or load main class Workspace\Source\liferay-portal\\.gradle

How to resolve it?

Regards
Hi Sushil,
I think that the build script doesn't work when the Liferay Portal source's path contains a directory with spaces in the name. To workaround this, please try renaming "Liferay Workspace" to "Liferay-Workspace" or something similar without spaces.

I've reported this issue here: https://issues.liferay.com/browse/LPS-67794
Hi Sushil,
https://issues.liferay.com/browse/LPS-67794 has been fixed, so you should not see an error anymore and the build should proceed correctly.
Hi,
Previous issue is resolved but now i am getting strange error as follows.
C:\Liferay-Workspace\Source\liferay-portal\build-common-ivy.xml:13: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "C:\Liferay-Workspace\Source\liferay-portal\util-java"):

Not sure why build not going smoothly.

Regards
Hi Sushil,
Is there any more information in the error message?
Following is the stacktrace.

BUILD FAILED
C:\Liferay-Workspace\Source\liferay-portal\build.xml:9: The following error occurred while executing this line:
C:\Liferay-Workspace\Source\liferay-portal\build.xml:193: The following error occurred while executing this line:
C:\Liferay-Workspace\Source\liferay-portal\build-common-java.xml:217: The following error occurred while executing this line:
C:\Liferay-Workspace\Source\liferay-portal\build-common-ivy.xml:132: The following error occurred while executing this line:
C:\Liferay-Workspace\Source\liferay-portal\build-common-ivy.xml:13: Execute failed: java.io.IOException: Cannot run program "curl" (in directory "C:\Liferay-Workspace\Source\liferay-portal\util-java"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:629)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:670)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:496)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)

Regards
Hi,

Following the above procedure Ant goes to work and halfway through the build fails with the following error, any ideas why?

Thanks in advance

BUILD FAILED
G:\src\01.liferay-dev\liferay-portal-7.0.x\build.xml:9: The following error occurred while executing this line:
G:\src\01.liferay-dev\liferay-portal-7.0.x\build.xml:193: The following error occurred while executing this line:
G:\src\01.liferay-dev\liferay-portal-7.0.x\build-common-java.xml:217: java.io.IOException: C:\Users\Yaseen\.liferay\mirrors\repository.liferay.com\nexus\content\repositories\liferay-public-releases\com\liferay\portal\com.liferay.portal.kernel\2.16.0\com.liferay.portal.kernel-2.16.0.jar failed checksum.
at com.liferay.ant.mirrors.get.MirrorsGetTask.downloadFile(MirrorsGetTask.java:261)
at com.liferay.ant.mirrors.get.MirrorsGetTask.doExecute(MirrorsGetTask.java:187)
at com.liferay.ant.mirrors.get.MirrorsGetTask.execute(MirrorsGetTask.java:46)
Hi Paul, unfortunately I cannot test this right now. Can you try deleting the c­om.liferay.portal.kernel-2.16.0.jar file and rebuilding? You might be better off opening a bug report and including the steps to reproduce: https://issues.liferay.com/secure/CreateIssue.jspa?pid=10952&issuetype=1
Hello Thanks for writing something on this but if we are able to run this successfully then this blog would be 100%.

Here is the problem. I have cloned as per your steps. First thing in windows there are too long file names so few files are can't be checked out. this is being a problem for last so many versions.
Complained about ANT -Xmx Argument, which has been added.
Complained about maven-ant.xx.jar file, copied it to the ant lib folder, after that the below is the problem.

I am not able to fix it, since we have done so many customizations in the previous versions for calendar and some other components we desperately wanted to make those changes here too... but we are struggling.

D:\DXP\liferay-portal>ant clean all
Buildfile: D:\DXP\liferay-portal\build.xml
[taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource tasks.properties. It could not be found.

clean:
[exec] Downloading file:/D:/DXP/liferay-portal/gradle/wrapper/../../tools/gradle-3.3.LIFERAY-PATCHED-1-bin.zipException in thread "main" java.io.FileNotFoundException: D:\DXP\
liferay-portal\gradle\wrapper\..\..\tools\gradle-3.3.LIFERAY-PATCHED-1-bin.zip (The system cannot find the path specified)
[exec]
[exec] at java.io.FileInputStream.open0(Native Method)
[exec]
[exec] at java.io.FileInputStream.open(FileInputStream.java:195)
[exec] at java.io.FileInputStream.<init>(FileInputStream.java:138)
[exec] at java.io.FileInputStream.<init>(FileInputStream.java:93)
[exec] at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
[exec] at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
[exec] at org.gradle.wrapper.Download.downloadInternal(Download.java:60)
[exec] at org.gradle.wrapper.Download.download(Download.java:45)
[exec] at org.gradle.wrapper.Install$1.call(Install.java:62)
[exec] at org.gradle.wrapper.Install$1.call(Install.java:48)
[exec] at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
[exec] at org.gradle.wrapper.Install.createDist(Install.java:48)
[exec] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
[exec] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

BUILD FAILED
D:\DXP\liferay-portal\build.xml:84: The following error occurred while executing this line:
D:\DXP\liferay-portal\build-common.xml:630: D:\DXP\liferay-portal\build-common.xml:632: exec returned: 1

Total time: 1 second

D:\DXP\liferay-portal>
Hi Vasu,

About the file path too long, Kyle posted an answer at the top.

The "ant all" command already do a clean.

What ant version are you using? You don't need to copy anything to ant lib dir.

Your error occurs because the file gradle-3.3.LIFERAY-PATCHED-1-bin.zip is missing, probably related to the long file path of Windows issue.

Any idea how to compile the Liferay NetBeans Source project. I have downloaded the source from liferays website. Tried opening it in netbeans project but no clue how to compile it. Link for the downloads:

https://sourceforge.net/projects/lportal/files/Liferay%20Portal/7.1.1%20GA2/liferay-ce-portal-src-7.1.1-ga2-20181101125651026.zip/download

Hi Paras, I don't think the source zip contains any build file necessary to open Liferay Portal in Netbeans. You'll probably be better off cloning the project, checking out the 7.1.1-ga2 tag, and opening that in Netbeans.

Thank you Kyle for your reply. What I meant to ask is how exactly to compile the source project to the portal either directly by gradle or opening it into netbeans(Considering that it is a netbeans project) and then building it ??

Thanks in advance.

As far as I know, you still need to build the project with Ant. I'm not sure it's possible to build the project with Gradle or Netbeans (although the Ant scripts do use Gradle to build certain sub-projects).

I pulled the Liferay source from Github repo by this command:

> git clone https://github.com/liferay/liferay-portal --branch 7.1.1-ga2 --single-branch --depth 1

I used Ant to build successfully. But I do not see the "bundles" folder as the Liferay document wrote.

https://dev.liferay.com/en/discover/reference/-/knowledge_base/7-1/building-clustering-for-liferay#build-liferay-portal-from-source

 

Does anyone have a similar problem?

Why? How to resolve it?

I successfully built a part of the executions. But now I also get errors in the last execution, build failure.

Here is my error:

     [exec] FAILURE: Build failed with an exception.      [exec]      [exec] * What went wrong:      [exec] Could not resolve all dependencies for configuration ':core:portal-compat:petra:portal-kernel-io-compat:detachedConfiguration1'.      [exec] > Could not find com.liferay.portal:com.liferay.portal.kernel:3.0.0-20180426.173855-7.      [exec]   Searched in the following locations:      [exec]       file:/your_path/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom      [exec]       file:/your_path/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar      [exec]       https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom      [exec]       https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar      [exec]   Required by:      [exec]       project :core:portal-compat:petra:portal-kernel-io-compat

 

Does anyone have a similar problem?

Hi Mr Tran, could you provide the exact steps to reproduce your issue (https://sscce.org)? Please provide all the commands you used and all error messages.

Thanks for your reply.

Here are my steps:

Step 1: Clone the Liferay source from Github repository.

 

$ git clone https://github.com/liferay/liferay-portal --branch 7.1.1-ga2 --single-branch --depth 1 Cloning into 'liferay-portal'... remote: Enumerating objects: 89021, done. remote: Counting objects: 100% (89021/89021), done. remote: Compressing objects: 100% (58390/58390), done. remote: Total 89021 (delta 24324), reused 61232 (delta 12129), pack-reused 0 Receiving objects: 100% (89021/89021), 1.64 GiB | 2.56 MiB/s, done. Resolving deltas: 100% (24324/24324), done. Note: checking out '59148a8775a2b2345694a023683d95b478c483c6'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

Checking out files: 100% (57708/57708), done.

 

Step 2: Build from source $ cd /opt/liferay-portal/ $ ant clean all

 

Error messages:

     [exec] Parallel execution with configuration on demand is an incubating feature.      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.util.taglib/2.9.0/com.liferay.util.taglib-2.9.0.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.util.taglib/2.9.0/com.liferay.util.taglib-2.9.0.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.util.taglib/2.10.8/com.liferay.util.taglib-2.10.8.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.util.taglib/2.10.8/com.liferay.util.taglib-2.10.8.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.12.0/com.liferay.portal.kernel-2.12.0.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.12.0/com.liferay.portal.kernel-2.12.0.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.87.0/com.liferay.portal.kernel-2.87.0.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.87.0/com.liferay.portal.kernel-2.87.0.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.impl/2.24.0-SNAPSHOT/com.liferay.portal.impl-2.24.0-20171113.233642-1.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.impl/2.24.0-SNAPSHOT/com.liferay.portal.impl-2.24.0-20171113.233642-1.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.54.0-SNAPSHOT/com.liferay.portal.kernel-2.54.0-20171115.164530-1.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.54.0-SNAPSHOT/com.liferay.portal.kernel-2.54.0-20171115.164530-1.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.impl/2.25.3-SNAPSHOT/com.liferay.portal.impl-2.25.3-20171217.062543-1.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.impl/2.25.3-SNAPSHOT/com.liferay.portal.impl-2.25.3-20171217.062543-1.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.59.0-SNAPSHOT/com.liferay.portal.kernel-2.59.0-20180105.041445-1.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.59.0-SNAPSHOT/com.liferay.portal.kernel-2.59.0-20180105.041445-1.jar      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.49.0/com.liferay.portal.kernel-2.49.0.pom      [exec] Download https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/2.49.0/com.liferay.portal.kernel-2.49.0.jar      [exec]      [exec] BUILD FAILED      [exec]      [exec] Total time: 1 mins 16.89 secs      [exec]      [exec] FAILURE: Build failed with an exception.      [exec]      [exec] * What went wrong:      [exec] Could not resolve all dependencies for configuration ':core:portal-compat:petra:portal-kernel-io-compat:detachedConfiguration1'.      [exec] > Could not find com.liferay.portal:com.liferay.portal.kernel:3.0.0-20180426.173855-7.      [exec]   Searched in the following locations:      [exec]       file:/opt/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom      [exec]       file:/opt/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar      [exec]       https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom      [exec]       https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar      [exec]   Required by:      [exec]       project :core:portal-compat:petra:portal-kernel-io-compat      [exec]      [exec] * Try:      [exec] Run with --info or --debug option to get more log output.      [exec]      [exec] * Exception is:      [exec] org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':core:portal-compat:petra:portal-kernel-io-compat:detachedConfiguration1'.      [exec]     at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:192)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$1.collectFiles(DefaultLenientConfiguration.java:141)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:810)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:376)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)      [exec]     at org.gradle.api.internal.file.AbstractFileCollection.getSingleFile(AbstractFileCollection.java:57)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getSingleFile(Unknown Source)      [exec]     at com.liferay.gradle.plugins.defaults.LiferayOSGiPortalCompatDefaultsPlugin$2.call(LiferayOSGiPortalCompatDefaultsPlugin.java:147)      [exec]     at com.liferay.gradle.plugins.defaults.LiferayOSGiPortalCompatDefaultsPlugin$2.call(LiferayOSGiPortalCompatDefaultsPlugin.java:143)      [exec]     at org.gradle.util.GUtil.uncheckedCall(GUtil.java:402)      [exec]     at org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext.add(BuildDependenciesOnlyFileCollectionResolveContext.java:72)      [exec]     at org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext.add(BuildDependenciesOnlyFileCollectionResolveContext.java:79)      [exec]     at org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext.add(BuildDependenciesOnlyFileCollectionResolveContext.java:79)      [exec]     at org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.visitContents(DefaultConfigurableFileCollection.java:91)      [exec]     at org.gradle.api.internal.file.CompositeFileCollection.visitDependencies(CompositeFileCollection.java:166)      [exec]     at org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.visitDependencies(DefaultConfigurableFileCollection.java:97)      [exec]     at org.gradle.api.internal.file.CompositeFileCollection$1.visitDependencies(CompositeFileCollection.java:116)      [exec]     at org.gradle.api.internal.file.CompositeFileTree$FilteredFileTree.visitDependencies(CompositeFileTree.java:122)      [exec]     at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:88)      [exec]     at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:202)      [exec]     at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:112)      [exec]     at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:64)      [exec]     at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.doResolve(CachingTaskDependencyResolveContext.java:76)      [exec]     at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:65)      [exec]     at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:55)      [exec]     at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.addToTaskGraph(DefaultTaskExecutionPlan.java:139)      [exec]     at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.addTasks(DefaultTaskGraphExecuter.java:101)      [exec]     at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:47)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:25)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:54)      [exec]     at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:44)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:25)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:54)      [exec]     at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:47)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48)      [exec]     at org.gradle.execution.DefaultBuildConfigurationActionExecuter.select(DefaultBuildConfigurationActionExecuter.java:36)      [exec]     at org.gradle.initialization.DefaultGradleLauncher$CalculateTaskGraphAction.execute(DefaultGradleLauncher.java:220)      [exec]     at org.gradle.initialization.DefaultGradleLauncher$CalculateTaskGraphAction.execute(DefaultGradleLauncher.java:217)      [exec]     at org.gradle.internal.Transformers$4.transform(Transformers.java:169)      [exec]     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)      [exec]     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)      [exec]     at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)      [exec]     at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)      [exec]     at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:95)      [exec]     at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:66)      [exec]     at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)      [exec]     at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)      [exec]     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)      [exec]     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)      [exec]     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)      [exec]     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)      [exec]     at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)      [exec]     at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)      [exec]     at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)      [exec]     at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)      [exec]     at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:281)      [exec]     at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:254)      [exec]     at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)      [exec]     at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)      [exec]     at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)      [exec]     at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)      [exec]     at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:247)      [exec]     at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:182)      [exec]     at org.gradle.launcher.Main.doAction(Main.java:33)      [exec]     at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)      [exec]     at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)      [exec]     at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)      [exec]     at org.gradle.launcher.GradleMain.main(GradleMain.java:23)      [exec]     at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)      [exec]     at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)      [exec]     at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)      [exec] Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.liferay.portal:com.liferay.portal.kernel:3.0.0-20180426.173855-7.      [exec] Searched in the following locations:      [exec]     file:/opt/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom      [exec]     file:/opt/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar      [exec]     https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom      [exec]     https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar      [exec] Required by:      [exec]     project :core:portal-compat:petra:portal-kernel-io-compat      [exec]     at org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult.notFound(DefaultBuildableComponentResolveResult.java:38)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolveModule(RepositoryChainComponentMetaDataResolver.java:88)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolve(RepositoryChainComponentMetaDataResolver.java:59)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.ComponentResolversChain$ComponentMetaDataResolverChain.resolve(ComponentResolversChain.java:85)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(ClientModuleResolver.java:45)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java:661)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder.java:672)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:297)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:270)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:167)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:104)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:92)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:45)      [exec]     at org.gradle.internal.Factories$1.create(Factories.java:25)      [exec]     at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:189)      [exec]     at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)      [exec]     at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)      [exec]     at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:199)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:65)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:43)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolveGraph(DefaultConfigurationResolver.java:134)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolveGraph(ShortCircuitEmptyConfigurationResolver.java:74)      [exec]     at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:67)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$4.execute(DefaultConfiguration.java:463)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$4.execute(DefaultConfiguration.java:455)      [exec]     at org.gradle.internal.Transformers$4.transform(Transformers.java:169)      [exec]     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)      [exec]     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:455)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:431)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$1400(DefaultConfiguration.java:109)      [exec]     at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getSelectedArtifacts(DefaultConfiguration.java:816)      [exec]     ... 71 more      [exec]      [exec]

BUILD FAILED /opt/liferay-portal/build.xml:116: The following error occurred while executing this line: /opt/liferay-portal/build.xml:248: The following error occurred while executing this line: /opt/liferay-portal/build-common.xml:847: /opt/liferay-portal/build-common.xml:849: exec returned: 1

Total time: 13 minutes 4 seconds

 

Pls check and support.

From error message, I see the "com.liferay.portal:com.liferay.portal.kernel:3.0.0-20180426.173855-7" not found. 

 

https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.pom https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.kernel/3.0.0-SNAPSHOT/com.liferay.portal.kernel-3.0.0-20180426.173855-7.jar  

I trying to access the above URLs, but I see  404 not found. 

How to resolve this problem?