Dab in a Lab Posted April 17, 2019 Share Posted April 17, 2019 I've tried to integrate a library off of github last week, and I'm now stuck and not sure what to search to teach myself I have the code in my project, but I can't seem to call it and use it yet. I'm assuming I got it in there correctly too The library also has a Mavern, but I'm not sure what it does. After looking it up, there seems to be a default Mavern people build, but I'm not sure what they then do with it, and the Mavern for this library is obviously different than just the standard one. If I have to, I'd be down to pay someone 5 or 10 bucks to work with me and teach me how to get it integrated. Quote Link to comment Share on other sites More sharing options...
Chris Posted April 17, 2019 Share Posted April 17, 2019 Build a new maven project and use the existing pom.xml,etc files 1 Quote Link to comment Share on other sites More sharing options...
Token Posted April 17, 2019 Share Posted April 17, 2019 The library may be on mvnrepository if it's popular enough, search for it on that website, it usually includes a pre-compiled jar version 2 Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted April 17, 2019 Author Share Posted April 17, 2019 (edited) 19 minutes ago, Chris said: Build a new maven project and use the existing pom.xml,etc files Would I build the maven this library has as a separate .jar file, and then add it to the project like how I would with OSBot at the start of a project? 19 minutes ago, Token said: The library may be on mvnrepository if it's popular enough, search for it on that website, it usually includes a pre-compiled jar version I think I found the precompiled jar version of this library. Similar to what I asked Chris, would I then add it as a library like how OSBot is added at the start of a project? Edited April 17, 2019 by Dab in a Lab Quote Link to comment Share on other sites More sharing options...
Chris Posted April 17, 2019 Share Posted April 17, 2019 5 minutes ago, Dab in a Lab said: Would I build the maven this library has as a separate .jar file, and then add it to the project like how I would with OSBot at the start of a project? I think I found the precompiled jar version of this library. Similar to what I asked Chris, would I then add it as a library like how OSBot is added at the start of a project? its it something local for you yes you can add it as a library if this is for a script the project files need to be in the main src folder of your script Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted April 17, 2019 Author Share Posted April 17, 2019 (edited) 11 minutes ago, Chris said: its it something local for you yes you can add it as a library if this is for a script the project files need to be in the main src folder of your script Is it enough to have it like this? https://gyazo.com/59fd56085e2bcf0882f38d00253b9a94 I haven't been able to figure out what its doing when in the src like this. I'm sure its fine, but it also created its own url shortcut to the repository Edit: Also is it necessary to have all the code of the library in my project too? That com.github part in the screenshot contains all the code too Edited April 17, 2019 by Dab in a Lab Quote Link to comment Share on other sites More sharing options...
asdttt Posted April 19, 2019 Share Posted April 19, 2019 (edited) On 4/17/2019 at 11:55 AM, Dab in a Lab said: Is it enough to have it like this? https://gyazo.com/59fd56085e2bcf0882f38d00253b9a94 I haven't been able to figure out what its doing when in the src like this. I'm sure its fine, but it also created its own url shortcut to the repository Edit: Also is it necessary to have all the code of the library in my project too? That com.github part in the screenshot contains all the code too That particular library will not work straight out of the box on OSBot due to OSBot's restrictions and therefor can't be shaded in by maven without complications. You'd need to manually move the source files (Starting from the root) into your project root (Source root, not randomly placed). Then you'd need to manually replace all the code violating OSBot's permissions such as reflection, Robot, ect. Anything that prevents you from loading the library properly. Edited April 19, 2019 by asdttt 1 Quote Link to comment Share on other sites More sharing options...