Esri / geoportal-server-catalog

Esri Geoportal Server is a next generation open-source metadata catalog and editor, based on elasticsearch.
https://www.esri.com/en-us/arcgis/products/geoportal-server/overview
Apache License 2.0
100 stars 63 forks source link

Building on 3-amazoncorretto-11-alpine docker container fails due to ant tasks being deprecated #570

Open owenh28 opened 1 week ago

owenh28 commented 1 week ago

Describe the bug Maven fails to build project, returns this error:

30.25 [WARNING]  Parameter 'tasks' is deprecated: Use {@link #target} instead. For version 3.0.0, this parameter is only defined to break the build if
30.25             you use it!
30.25 [INFO] ------------------------------------------------------------------------
30.25 [INFO] BUILD FAILURE
30.25 [INFO] ------------------------------------------------------------------------
30.25 [INFO] Total time:  27.815 s
30.25 [INFO] Finished at: 2024-11-19T18:18:59Z
30.25 [INFO] ------------------------------------------------------------------------
30.25 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (default) on project geoportal: You are using 'tasks' which has been removed from the maven-antrun-plugin. Please use 'target' and refer to the >>Major Version Upgrade to version 3.0.0<< on the plugin site. -> [Help 1]
30.25 [ERROR] 
30.25 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
30.25 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
30.25 [ERROR] 
30.25 [ERROR] For more information about the errors and possible solutions, please read the following articles:
30.25 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

To Reproduce Steps to reproduce the behavior:

  1. Top section of dockerfile contains:
    
    FROM maven:3-amazoncorretto-11-alpine AS gptbuild

MAINTAINER David Valentine dwvalentine@usdc.edu

Install geoportal web application

ENV GPTGITURL=https://github.com/esri/geoportal-server-catalog.git

WORKDIR /tmp RUN apk add git RUN git clone ${GPTGITURL} geoportal-server-catalog WORKDIR /tmp/geoportal-server-catalog/geoportal/src/main/resources/config

ENV HARVESTER_CONFIG_DIR=/tmp/harvester/geoportal-application/geoportal-harvester-war/src/main/resources/config/

COPY config/geoportal/ .

COPY config/harvester/app-security_harvester.xml app-security.xml

RUN ls -al /tmp/geoportal-server-catalog/geoportal/src/main/resources/config/

WORKDIR /tmp/geoportal-server-catalog/geoportal RUN mvn package -DskipTests

2. Run docker compose build
3. Build fails

**Expected behavior**
Build succeeds and moves on to building the harvester application.

**Desktop (please complete the following information):**
 - OS: AlmaLinux 9.3
 - Docker Version information:

Client: Docker Engine - Community Version: 27.3.1 API version: 1.47 Go version: go1.22.7 Git commit: ce12230 Built: Fri Sep 20 11:43:04 2024 OS/Arch: linux/amd64 Context: default

Server: Docker Engine - Community Engine: Version: 27.3.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.7 Git commit: 41ca978 Built: Fri Sep 20 11:41:21 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.22 GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c runc: Version: 1.1.14 GitCommit: v1.1.14-0-g2c9f560 docker-init: Version: 0.19.0 GitCommit: de40ad0

Docker Compose version v2.29.7