clytras / AccessConverter

A Microsoft Access database conversion tool to convert old and new Access database formats to some other popular SQL based databases and formats
MIT License
35 stars 10 forks source link

Building within Docker #14

Open jnovack opened 2 weeks ago

jnovack commented 2 weeks ago

How do I properly build (and subsequently execute) within Docker?

I'm running the following as my Dockerfile

FROM maven:3.9.9-eclipse-temurin-17

WORKDIR /usr/src/app
COPY AccessConverter/pom.xml .
RUN mvn dependency:go-offline

COPY ./AccessConverter .
RUN mvn -o clean install

However, when running the jar, I get the following:

root@65b356985f8f:/usr/src/app# java -jar target/accessconverter-2.0.jar
no main manifest attribute, in target/accessconverter-2.0.jar

If I mount in the AccessDB (or directory) via Docker, what is the proper way to build the image, then execute the container?

(I have zero experience building within Java, thus, I would like to build and execute inside of a container)

clytras commented 2 weeks ago

Hey @jnovack,

I am currently out of office and I can't get my hands onto this one, but if I remember corectly, there is a build step required using something like mvn compile -f pom.xml or just mvn compile when in project directory.

I'll get a closer look when I am back in a couple of weeks.