Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warnings #28

Merged
merged 7 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: End to End tests setup
run: |
docker compose up -d elasticsearch
docker compose build planet-search
- name: End to End tests using curl
run: docker compose up -d elasticsearch
- name: Docker Build
run: docker compose build planet-search
- name: Build index and PMTiles
run: |-
mkdir -p ./data/input
cp ./src/test/resources/extenal.geojson ./data/input/external.geojson
docker compose up planet-search
- name: End to End tests using curl
run: |
curl -s -X GET http://localhost:9200/points/_search?pretty -H 'Content-Type: application/json'
- name: Check that a PMTiles was created
if: ${{ hashFiles('./data/output/global_points.pmtiles') == '' }}
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ WORKDIR /app

COPY . .

RUN mvn package
RUN mvn clean package dependency:copy-dependencies

FROM eclipse-temurin:21-jre-alpine

ENV JAVA_OPTS="-Xmx2g -Xms2g"

WORKDIR /app

COPY --from=build /app/target/planet-search-1.0.jar ./
COPY --from=build /app/target/ ./

VOLUME [ "/data" ]

ENTRYPOINT java $JAVA_OPTS -jar planet-search-1.0.jar "$0" "$@"
ENTRYPOINT java $JAVA_OPTS -cp "classes:dependency/*" il.org.osm.israelhiking.MainClass "$0" "$@"
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ To run using docker (While having a local elasticsearch running at 9200):

To compile run:

`mvn package`
`mvn clean package dependency:copy-dependencies`

To run do:

`java -jar ./target/planet-search-1.0.jar`
`java -cp "target/classes:target/dependency/*" il.org.osm.israelhiking.MainClass`

You can also do the same with Docker locally:

`docker compose build planet-search`
`docker compose up planet-search`

To serve the PMTiles run:

Expand Down
33 changes: 1 addition & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,45 +65,14 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>il.org.osm.israelhiking.MainClass</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>**/Log4j2Plugins.dat</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<groups>unit</groups>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down