View Full Version : How to build pentaho-platform from Github

11-15-2016, 07:42 AM
Hi All,

I have to build pentaho-platform from source on my ubuntu machine.

Things that I have found out -

There is one post - http://stackoverflow.com/questions/16914886/building-pentaho-platform-from-github . According to the answers, I can build pentaho-platform using steps -

Copy file dev_build.xml to build.xml
Execute: ant dev-resolve
Execute: ant dev-build

I have also checked on the http://ci.pentaho.com (http://ci.pentaho.com/)/, there are jenkins job for individual modules e.g. pentaho-platform-api (http://ci.pentaho.com/job/pentaho-big-data-plugin/search/?q=pentaho-platform-api), pentaho-platform-core (http://ci.pentaho.com/job/pentaho-big-data-plugin/search/?q=pentaho-platform-core), pentaho-platform-scheduler (http://ci.pentaho.com/job/pentaho-big-data-plugin/search/?q=pentaho-platform-scheduler), pentaho-platform-extensions (http://ci.pentaho.com/job/pentaho-big-data-plugin/search/?q=pentaho-platform-extensions) etc. So instead of building complete pentaho-platform, should I build all its modules separately?

Taking some reference from the link http://wiki.pentaho.com/display/ServerDoc2x/Pentaho+Platform+7.0, build steps could be -

Install jdk-8, ant, maven, git
Clone the pentaho-platform code from github repository
Set environment variables.
Go to individual folder (api, build-utils, etc) and execute "ant clean-all resolve publish-local"

Anyone please guide me what are the exact steps to build pentaho-platform.

Thanks in advance.

11-16-2016, 06:27 AM
ant -f dev_build.xml dev-rebuild-merged-server

This will iterate all projects and run the resolve compile publish-local for all of them. And then do the assembly.

11-17-2016, 05:23 AM
Thanks for sharing the information.
I will try these steps and will let you know in case of any issues.

11-17-2016, 09:15 AM
Hi Pedro,

I have performed following steps :

Install jdk-8, ant, maven, git on my ubuntu VM
Set environment variables
Clone the pentaho-platform code (master branch) from github repository.
cd pentaho-platform
ant -f dev_build.xml dev-rebuild-merged-server

Observed following error -
/pentaho-platform/dev_build.xml:53: The following error occurred while executing this line:
/pentaho-platform/dev_build.xml:55: The following error occurred while executing this line:
/pentaho-platform/extensions/build.xml:70: The following error occurred while executing this line:
/pentaho-platform/extensions/build.xml:105: Warning: Could not find file /pentaho-platform/extensions/wadlExtension.xml to copy.

Added error output as an attachment.
Is there any bug regarding this Or let me know if I am missing something ?

11-22-2016, 01:01 PM
Not really. That should be it.

I tried it on my local machine and did not get that error. I had to nuke my ivy cache a couple of times but it managed to build and assemble the whole thing.

The error you're getting is here:

/pentaho-platform/extensions/src/org/pentaho/platform/web/http/api/resources/RepositoryResource.java:70: error: unmappable character for encoding ASCII
[javadoc] * The RepositoryResource service retrieves the repository files through various methods. ??Allows you to execute repository content.
[javadoc] ^
[javadoc] /pentaho-platform/extensions/src/org/pentaho/platform/web/http/api/resources/RepositoryResource.java:70: error: unmappable character for encoding ASCII
[javadoc] * The RepositoryResource service retrieves the repository files through various methods. ??Allows you to execute repository content.

Maybe something in your encoding? What do you have on line 70 for that file. Maybe it got corrupted when you cloned (I know, weird).

11-30-2016, 09:00 AM
Sorry for the delay in reply for your queries and thanks for pointing out that particular error.

There were garbage character in the file at line no. 70. (really weird)
To fix this, I have tried to set option -> export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
Afterwards, I didn't get error related to "unmappable character".

However build failed with download errors for following jar files -
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: FAILED DOWNLOADS ::
[ivy:resolve] :: ^ see resolution messages for details ^ ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: pentaho-library#libbase;7.1-SNAPSHOT!libbase.jar(source)
[ivy:resolve] :: pentaho-library#libxml;7.1-SNAPSHOT!libxml.jar(source)
[ivy:resolve] :: pentaho-library#libcss;7.1-SNAPSHOT!libcss.jar(source)
[ivy:resolve] :: pentaho#pentaho-metadata;7.1-SNAPSHOT!pentaho-metadata.jar(source)
[ivy:resolve] :: pentaho-library#libformula;7.1-SNAPSHOT!libformula.jar(source)
[ivy:resolve] :: pentaho-kettle#kettle-dbdialog;7.1-SNAPSHOT!kettle-dbdialog.jar(source)
[ivy:resolve] :: pentaho#pentaho-vfs-browser;7.1-SNAPSHOT!pentaho-vfs-browser.jar(source)
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

As per logs (attached), it is trying to download sources.jar file for above packages e.g. - http://nexus.pentaho.org/content/groups/omni/pentaho-library/libbase/7.1-SNAPSHOT/libbase-7.1-20161130.031202-147-sources.jar file, which is not present at repository right now.

Currently I am cloning master branch, should I change branch/release and pickup any stable one ?

12-02-2016, 06:09 AM
clear your ivy cache (remove folders inside pentaho-library, pentaho and pentaho-kettle)

12-07-2016, 10:56 AM
I have tried to rebuild after cleaning ivy cache, but still getting same download error for sources.jar file.
Anything else that I need to update in dev_build.xml or in build.properties?

JFYI - I am building this package on Ubuntu VM (16.04 with ppc64le architecture)


12-30-2016, 01:19 AM
Thanks Pedro for your inputs so far. Finally I am able to build this package after syncing code from "tag -"

As per the previous errors, I was getting download errors for SNAPSHOT versions of jar files (e.g. 7.0-SNAPSHOT and 7.1-SNAPSHOT).
Although I have switched from master branch to branch, its still using SNAPSHOT versions. Version information is present in file /pentaho-platform/extensions/build.properties.

Product version in build.properties in tag is and on pentaho repository for all dependent packages, their jar files with same version are present. e.g.

Best Regards,