Skip to content
Advertisement

IllegalArgumentException in maven-resources-plugin during deploy goal

I am trying to build my spring-boot application using maven using below command.

mvn -X -Dmaven.test.skip=true deploy

During this step, maven-resources-plugin tries to copy my application.yaml file to my targetclasses folder. And this fails with an IllegalArgumentException.

Relevant part of the stack trace.

JavaScript
JavaScript

Any ideas on why this is failing? How can I ensure that my file gets copied?

My build succeeds if I delete my yaml file from resources folder!

More stacktrace

JavaScript

Advertisement

Answer

Finally found the issue with this. When we were packaging the application, we were using the maven-dependency-plugin to copy two artifact classes to a single classes folder. And both the artifacts had their own application.yaml file. This was causing this error. Hope this helps for anyone who encounters something similar.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement