0

I had created a spring boot application, using spring initializer. I had added some external jars to my class path using IDE. When i try to creating a jar, by maven clean and maven install, am getting

 package com.art.common.exception does not exist. 

Do we need to add the jar dependency XML in pom.xml?

I dont want my external jar to be part of my jar, as i could get those in runtime.

2 Answers2

0

Yes, if you use maven as your dependency manager you have to tell it that you are using that external dependency. If you don't want maven to download it you can marke the scope as provided and it maven will look for the jar in your lib folder.

NiVeR
  • 9,644
  • 4
  • 30
  • 35
0

Add the jar as a dependency with scope ‘provided’ and if the jar is not found publicly on the maven central then use NCB install the jar to create it in your local repo ...