How to build Elasticsearch from source without xpack

Hi, i am trying to build a non-snapshot build of elasticsearch from source using

gradle assemble -Dbuild.snapshot=false

But I am getting the following exception

Property license.key must be set for release build

I think this is only required for xpack.

As we don't need xpack, how would one build elasticsearch without it?

Or how do I get the license.key mentioned in the exception?

Can I ask why you're trying to build a non-snapshot build of Elasticsearch from source?

It's likely that there's an easier solution to whatever problem you're trying to solve.

However, you can build specific OSS distributions using gradle if you want:
e.g.

./gradlew :distribution:archives:oss-darwin-tar:assemble
2 Likes

Tim, thanks for the reply.

Due to legacy reasons, we were still using the older version (5.6) of elasticsearch for some of our on-premise setups, and upgrading to the latest is not possible at this point because of the amount of reindexing required. We are planning to move to 6. The problem is that if some bug is discovered later that is not backported to version 6.5 by ES Team, we should be able to patch it by ourselves. So we should know how to rebuild it from the source if such a situation arises.

The steps that you provided
./gradlew :distribution:archives:oss-darwin-tar:assemble, still builds snapshot versions.

Is there any way to rebuild non-snapshot versions? What is the license that the exception talks about and how can we get it?

5.X has been EOL for quite a long time now. You should really be looking to upgrade to 7.X instead of 6.X as well.

2 Likes

snapshot is "just" in the name. If you checked out the right tag, it should be good, whatever the final name is.

The Elasticsearch 5.6 build didn't need a license.key, so whatever you are currently trying to build, it isn't the version you're after.

Sorry for the confusion, but I was trying to build ES 6.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.