java.lang.NoClassDefFoundError: com/google/gson/Gson

前端 未结 1 621

I noticed a strange problem. I am able to run my test cases using Junit but when I am running using maven One of the test case is failing. It is complaining that Gson class

1条回答
  •  一向
    一向 (楼主)
    2021-01-16 16:48

    Figured Out the Problem Finally after spending lot of time.

    The problem is when I am pushing the symbology artifact to repository it is not pushing the pom into repository. So when I am using the symbology artifact as dependency my project is not able to know what are the transitive dependencies.

    So I pushed my pom into repository along with jar and now it is able to get all the dependencies.

    HURRAYYYYYYYYYYYYYYYYY!!!!!!!!!!!!!!!!!!

    0 讨论(0)
提交回复
热议问题