From 36639d730244955cf146ecbff0af30dc05042798 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Tue, 22 Mar 2016 16:50:47 +0100 Subject: [PATCH] ES: add maven start facility --- README.md | 11 +++++++---- pom.xml | 5 ++++- ucoinj-elasticsearch-plugin/pom.xml | 21 +++++++++++++++++++++ ucoinj-elasticsearch/pom.xml | 8 +------- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5814b9c3..c9953bc6 100644 --- a/README.md +++ b/README.md @@ -162,9 +162,12 @@ More documentation here : - Windows: copy the file 'sodium.dll' into directory 'ucoinj-core/lib/' - Install [Maven 3](http://maven.apache.org/). +``` + sudo apt-get install maven +``` - Get the source code, then compile using Maven: - + - Get the source code, then compile using Maven: + ``` git clone https://github.com/ucoin-io/ucoinj.git cd ucoinj @@ -172,13 +175,13 @@ More documentation here : git submodule sync git submodule update - mvn install + mvn install -DskipTests ``` To package binaries : ```bash -$ mvn install -DperformRelase +$ mvn install -DskipTests -DperformRelease ``` ## Roadmap diff --git a/pom.xml b/pom.xml index e30ab408..10b33287 100644 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,9 @@ <!-- where to generate sources --> <maven.gen.dir>${project.build.directory}/generated-sources</maven.gen.dir> + <!-- Could be overriding in modules --> + <maven.jar.main.class/> + <!-- distribution management --> <distribution.site.id>eis-public-reports</distribution.site.id> <distribution.site.host>server.e-is.pro:22</distribution.site.host> @@ -654,7 +657,7 @@ <properties> <exec.mainClass>${maven.jar.main.class}</exec.mainClass> <exec.classpathScope>runtime</exec.classpathScope> - <adagio.log.file>${project.build.directory}/exec.log</adagio.log.file> + <ucoinj.log.file>${project.build.directory}/exec.log</ucoinj.log.file> </properties> </profile> diff --git a/ucoinj-elasticsearch-plugin/pom.xml b/ucoinj-elasticsearch-plugin/pom.xml index 802bb526..3a9ce36c 100644 --- a/ucoinj-elasticsearch-plugin/pom.xml +++ b/ucoinj-elasticsearch-plugin/pom.xml @@ -13,6 +13,10 @@ <description>uCoinj :: ElasticSearch Plugin</description> + <properties> + <maven.jar.main.class>io.ucoin.ucoinj.elasticsearch.Main</maven.jar.main.class> + </properties> + <dependencies> <dependency> <groupId>org.elasticsearch</groupId> @@ -82,4 +86,21 @@ </plugin> </plugins> </build> + + <profiles> + <profile> + <id>run</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <ucoinj.basedir>${project.build.directory}</ucoinj.basedir> + <ucoinj.plugins.directory>${basedir}}/src/test/es-home/plugins</ucoinj.plugins.directory> + <es.http.cors.allow-origin>*</es.http.cors.allow-origin> + <exec.args> + start reset-market reset-registry index --host metab.ucoin.fr --port 9201 + </exec.args> + </properties> + </profile> + </profiles> </project> \ No newline at end of file diff --git a/ucoinj-elasticsearch/pom.xml b/ucoinj-elasticsearch/pom.xml index 6733fb37..2a7414d5 100644 --- a/ucoinj-elasticsearch/pom.xml +++ b/ucoinj-elasticsearch/pom.xml @@ -63,17 +63,11 @@ <artifactId>jackson-databind</artifactId> </dependency> - <!-- JNA --> - <dependency> - <groupId>net.java.dev.jna</groupId> - <artifactId>jna</artifactId> - <scope>provided</scope> - </dependency> - <!-- JNA (need for OS shutdown hook) --> <dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>net.java.dev.jna</groupId> -- GitLab