Add external dependency

0
Hi All,   I am trying to add an external dependency. I found that I should place the needed jar under userlib/. After placing it, the code still does not compile and the added packages are not found. Are there more steps needed? I placed a fat jar built with gradle so there are already all the second level dependencies included.   I’d be grateful for any help!
asked
4 answers
2

Hi Paulina,

Yes it is your responsibility to take care of transitive dependencies. See the following blog post for more details
https://www.notion.so/gajduk/Best-practice-for-adding-a-java-dependency-to-Mendix-e2ee2b5776c145f99f8e9fc77f2b62b6

Hope that helps

 

answered
0

You are correct that .jar files need to be in the userlib folder. 

What compilation error message are you seeing?

answered
0

I’ve added dependency to Firebase Messaging with its dependencies.

To test it, I added an import line in one of my Java actions.

import com.google.firebase.messaging.FirebaseMessaging;

And I get this error:

error: package com.google.firebase.messaging does not exist

 

answered
0

Hi Paulina,

After placing the jar files in userlib folder, try opening the project using eclipse and include the jar files in the project if you don’t see as included.

Regards,

Sushuma

answered