Let’s say you built spring-boot executable jar and uploaded it into nexus repository. To deploy your spring-boot application you create a Dockerfile that downloads your jar using nexus rest search and download API. For example:

FROM openjdk:8-jre-alpine



RUN wget -O app-service.jar  \


ENTRYPOINT [ "java", "-jar","app-service.jar"]

When you run docker container you see the following error message:

no main manifest attribute, in app-service.jar


When you build and run jar locally everything is working fine. app-service.jar inside docker container appears to be corrupted. To diagnose the issue run the wget command from the terminal:

wget -O app-service.jar  \

Notice the following results on the command line:

$ wget -O app-service.jar ''

--2019-10-21 21:48:27--

Распознаётся (…

Подключение к (||:443... соединение установлено.

HTTP-запрос отправлен. Ожидание ответа… 302 Found

Адрес: [переход]

--2019-10-21 21:48:28--

Повторное использование соединения с

HTTP-запрос отправлен. Ожидание ответа… 200 OK

Длина: 247463 (242K) [application/java-archive]

Сохранение в: «app-service.jar»

Do not get all these messages in Russian fool you. This is not a Russian hacker attack. Pay attention to what is actually being downloaded. app-service-0.0.1-20191021.220127-1-javadoc.jar javadoc!!!


Solution to this issue can be found in sonatype Search API. Looking through documentation I came across this query parameter maven.classifier This issue happens when your repository contains javadoc jar alnog side your artifact. &sort=version&direction=desc parameters are also critical to insure you are downloading the latest version, but not enough to uniquely identify artifact. Final URL that works looks like this:


Leave a Reply

Your email address will not be published. Required fields are marked *

1 reply
  • I have to voice my admiration for your kind-heartedness supporting all those that really want help on this one matter. Your special commitment to getting the message along had been wonderfully helpful and has enabled women much like me to reach their desired goals. This valuable guidelines can mean this much a person like me and even further to my fellow workers. Regards; from each one of us.