Compiling elasticsearch from maven:"The property attribute is required"

Hi,

I am trying to include the elasticsearch source into my maven project.

Here is what I did:

  • expand "~.m2\repository\org\elasticsearch\elasticsearch\1.7.1\elasticsearch-1.7.1-sources.jar" into "/elasticsearch/src/main/java"
  • copy elasticsearch-1.7.1.pom to ""/elasticsearch/pom.xml"
  • add a new module "elasticsearch" in "/pom.xml"
  • run "mvn compile"

The build fails with the following stack trace:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (set-permGen) on project elasticsearch: An Ant
BuildException has occured: The property attribute is required.
[ERROR] around Ant part ...... @ 4:14 in c:\Users\loic\Google Drive\data\LookBook\elasticsearch\target\antrun\build-mai
n.xml
[ERROR] -> [Help 1]
[ERROR]

Indeed, the generated file "\elasticsearch\target\antrun\build-main.xml" has no attribute property for the condition tag:

<?xml version="1.0" encoding="UTF-8" ?>
<project name="maven-antrun-" default="main"  >
<target name="main">
  <**condition**>
    <matches/>
  </condition>
</target>
</project>

Any idea of how to fix this ?

Thanks a lot,

padang

Why do you want to do this?

Why not simply add elasticsearch as a dependency in your project?

I'd like to be able to modify the code and try things out from my usecase. More specifically, I was curious to investigate if it is possible to improve the startup time in case of a purely local node, used in embedded mode for unit testing (I noted the index files on disk are loaded even if using memory as storage).

It is understood that for a production deployment I will always use the official version as maven dependencies.

I haven't been tweaking Elasticsearch internally, but I found some advises on forums how to speed up embedded node and made it ready for test-ng. You can check it at: https://github.com/kucera-jan-cz/esBench/tree/master/elastic-module/src/test/java/org/esbench/testng