0

I have one spring boot project with gradle as build tool , i created fat jar for that project , i am adding this fat jar to other project , in the build.gradle as below

compile(group: 'com.rules.base', name: 'rules-base', version: '2.0.0-SNAPSHOT')

but when a building this project after adding the farjar from terminal , using

gradle clean build

compilation issue coming , complaining that spring classes not present , one example issue is

error: package org.springframework.boot does not exist
import org.springframework.boot.SpringApplication;

even though i did not the add the spring boot dependencies for the second project explicitly in build.gradle , i added the fat jar , that fat jar contains all the spring boot dependencies , then why gradle clean build is giving issue like that ?

can anyone please help me

Bravo
  • 8,589
  • 14
  • 48
  • 85
  • Because a Spring Boot jar isn't a regular jar. – M. Deinum Jan 08 '18 at 07:56
  • @M.Deinum , i included all the jars , including this spring boot jar also to the uber jar , then still why giving errors like this ? – Bravo Jan 08 '18 at 08:20
  • That isn't what you are stating in your question. – M. Deinum Jan 08 '18 at 08:22
  • @M.Deinum uber jar means , it contains the project classes and the dependencies of that project also – Bravo Jan 08 '18 at 08:26
  • Trust me I known what it is... I also quite well known that a Spring Boot jar isn't a regular jar (check the documentation and the explanation to the question I marked this as duplicate with!). – M. Deinum Jan 08 '18 at 08:27

0 Answers0