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

**URL:** <https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236>\
**Category:** Elasticsearch\
**Created:** [September 14, 2015, 10:27am UTC](https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236 "2015-09-14T10:27:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![padang](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@padang](https://discuss.elastic.co/u/padang)\
**Post date:** [September 14, 2015, 10:27am UTC](https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236/1 "2015-09-14T10:27:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 14, 2015, 10:44am UTC](https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236/2 "2015-09-14T10:44:02Z")

</div>

Why do you want to do this?

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

---

<div class="post-metadata">

**Author:** ![padang](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@padang](https://discuss.elastic.co/u/padang)\
**Post date:** [September 14, 2015, 1:31pm UTC](https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236/3 "2015-09-14T13:31:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kucera.jan.cz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kucera.jan.cz/32/5869_2.png) [@kucera.jan.cz](https://discuss.elastic.co/u/kucera.jan.cz)\
**Post date:** [December 1, 2015, 7:16am UTC](https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236/4 "2015-12-01T07:16:31Z")

</div>

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](https://github.com/kucera-jan-cz/esBench/tree/master/elastic-module/src/test/java/org/esbench/testng)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/compiling-elasticsearch-from-maven-the-property-attribute-is-required/29236/5 "2017-07-05T23:34:36Z")

</div>


