Skip to content

Commit

Permalink
Update the distribution part
Browse files Browse the repository at this point in the history
  • Loading branch information
dadoonet committed Feb 12, 2022
1 parent 9600343 commit 74044d0
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 137 deletions.
46 changes: 0 additions & 46 deletions distribution/es7/pom.xml

This file was deleted.

177 changes: 89 additions & 88 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

<artifactId>fscrawler-distribution</artifactId>
<name>FSCrawler ZIP Distribution</name>
<packaging>pom</packaging>

<modules>
<module>es7</module>
</modules>

<properties>
<!-- Global configuration parameters for docker -->
Expand All @@ -30,11 +25,13 @@
<!-- Docker Image Definitions -->
<!-- standard install with no ocr -->
<docker.noocr.alias>${project.artifactId}-noocr</docker.noocr.alias>
<docker.noocr.name>${docker.username}/fscrawler:${project.version}-noocr-${module.name}</docker.noocr.name>
<docker.noocr.name>${docker.username}/fscrawler:${project.version}-noocr</docker.noocr.name>
<docker.noocr.cacheFrom>${docker.noocr.name}</docker.noocr.cacheFrom>
<docker.noocr.dockerFile>${project.basedir}/../src/main/docker/Dockerfile</docker.noocr.dockerFile>
<docker.noocr.assembly.descriptor>${project.basedir}/../src/main/assembly/assembly.xml</docker.noocr.assembly.descriptor>
<docker.noocr.dockerFile>${project.basedir}/src/main/docker/Dockerfile</docker.noocr.dockerFile>
<docker.noocr.assembly.descriptor>${project.basedir}/src/main/assembly/assembly.xml</docker.noocr.assembly.descriptor>
<docker.noocr.assembly.mode>tgz</docker.noocr.assembly.mode>
<!-- We use this tag to make easy using docker pull dadoonet/fscrawler:noocr -->
<docker.noocr.tags.0>noocr</docker.noocr.tags.0>

<!-- install tesseract-ocr and all language files -->
<docker.ocr.alias>${project.artifactId}-ocr</docker.ocr.alias>
Expand All @@ -44,6 +41,9 @@
<docker.ocr.assembly.descriptor>${docker.noocr.assembly.descriptor}</docker.ocr.assembly.descriptor>
<docker.ocr.assembly.mode>${docker.noocr.assembly.mode}</docker.ocr.assembly.mode>
<docker.ocr.args.langsPkg>imagemagick tesseract-ocr tesseract-ocr-all</docker.ocr.args.langsPkg>
<!-- The ocr version will be the default one for anyone trying docker pull dadoonet/fscrawler:VERSION -->
<docker.ocr.tags.0>${project.version}</docker.ocr.tags.0>
<docker.ocr.tags.1>latest</docker.ocr.tags.1>

<distribution.mainClassName>fr.pilato.elasticsearch.crawler.fs.cli.FsCrawler</distribution.mainClassName>
</properties>
Expand All @@ -53,6 +53,10 @@
<groupId>fr.pilato.elasticsearch.crawler</groupId>
<artifactId>fscrawler-cli</artifactId>
</dependency>
<dependency>
<groupId>fr.pilato.elasticsearch.crawler</groupId>
<artifactId>fscrawler-elasticsearch-client</artifactId>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -115,87 +119,84 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>

<!-- Generate the release zip file (run during package step) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>generate-release-plugin</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Generate and push the docker images -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<authConfig>
<push>
<username>${docker.push.username}</username>
<password>${docker.push.password}</password>
</push>
</authConfig>
<!-- Create multiple images -->
<images combine.self="override">
<image>
<external>
<type>properties</type>
<prefix>docker.noocr</prefix>
</external>
</image>
<image>
<external>
<type>properties</type>
<prefix>docker.ocr</prefix>
</external>
</image>
</images>
</configuration>
<executions>
<!-- Generate the docker images during the package phase -->
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<!-- Push the docker images during the deploy phase -->
<execution>
<id>docker-push</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
<execution>
<!-- There is no integration test so we can skip that execution -->
<id>start-elasticsearch</id>
<phase>none</phase>
</execution>
<execution>
<!-- There is no integration test so we can skip that execution -->
<id>stop-elasticsearch</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Generate the release zip file (run during package step) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${project.parent.basedir}/src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>generate-release-plugin</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Generate and push the docker images -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<authConfig>
<push>
<username>${docker.push.username}</username>
<password>${docker.push.password}</password>
</push>
</authConfig>
<!-- Create multiple images -->
<images combine.self="override">
<image>
<external>
<type>properties</type>
<prefix>docker.noocr</prefix>
</external>
</image>
<image>
<external>
<type>properties</type>
<prefix>docker.ocr</prefix>
</external>
</image>
</images>
</configuration>
<executions>
<!-- Generate the docker images during the package phase -->
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<!-- Push the docker images during the deploy phase -->
<execution>
<id>docker-push</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
<execution>
<!-- There is no integration test so we can skip that execution -->
<id>start-elasticsearch</id>
<phase>none</phase>
</execution>
<execution>
<!-- There is no integration test so we can skip that execution -->
<id>stop-elasticsearch</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
6 changes: 3 additions & 3 deletions distribution/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

<fileSets>
<fileSet>
<directory>${project.parent.basedir}/src/main/scripts</directory>
<directory>src/main/scripts</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>fscrawler*</include>
</includes>
<filtered>true</filtered>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/..</directory>
<directory>../</directory>
<outputDirectory/>
<includes>
<include>LICENSE</include>
Expand All @@ -30,7 +30,7 @@
</includes>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/../cli/src/main/resources</directory>
<directory>cli/src/main/resources</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>log4j2.xml</include>
Expand Down
85 changes: 85 additions & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,38 @@
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- We don't deploy our IT artifact to maven central -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- We don't deploy our IT artifact to maven central -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- We don't deploy our IT artifact to maven central -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<!-- To start Docker Compose when running IT -->
<plugin>
<groupId>com.dkanejs.maven.plugins</groupId>
Expand Down Expand Up @@ -107,6 +139,59 @@
</build>

<profiles>
<profile>
<id>skip-docker-compose</id>
<activation>
<property>
<name>tests.cluster.url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.dkanejs.maven.plugins</groupId>
<artifactId>docker-compose-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>de.scravy</groupId>
<artifactId>waitfor-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-docker-compose</id>
<activation>
<property>
<name>!tests.cluster.url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.dkanejs.maven.plugins</groupId>
<artifactId>docker-compose-maven-plugin</artifactId>
<configuration>
<skip>${skipIntegTests}</skip>
</configuration>
</plugin>
<plugin>
<groupId>de.scravy</groupId>
<artifactId>waitfor-maven-plugin</artifactId>
<configuration>
<skip>${skipIntegTests}</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- We are building a profile that can be activated from the IDE -->
<profile>
<id>es-7x</id>
Expand Down

0 comments on commit 74044d0

Please sign in to comment.