Any sucess compiling from free maven repo?

Enonic version: 6.x
OS: Windows 7 professional

Im having some trouble finding an easy way to publish a lib for others to use in enonic XP.

I have a project which is just a .js file in /lib where I have made some functions for API calls to a videoplatform and format the response. Now i want it to be easy for other users of that videoplatform to include a maven repo and resolve my lib so they can use the funcions in their projects.

Currently im trying out bintray, but without luck. Im just doing something wrong. What im having trouble with is finding my repoā€™s files. I can see gradle trying different URLs, but it seems my files are not there. And there is no easy way in bintray to see the exact path your files are in.

Anyone else here that have published a Lib to either bintray or somewhere else public that has had any success?

Have you added your repository in the gradle file?

That would look something like this:

repositories { maven { url "http://dl.bintray.com/<your-user>/maven" } }

You can also include the package in JCenter, and thus sync it to Maven Central (so you can use the usual repos), but then you need to include a pom file and actively include it in JCenter from your package page in Bintray. (I havenā€™t tried this, but itā€™s how I understand it from the documentation.) You may also have luck with using the ā€œInclude My Packageā€ from this page, but I donā€™t really know how that works.

1 Like

Thanks for the reply.
Yes i added the repo and it searched it for the jar and pom, but didnt find it.
Ill try the Maven Central!

I have invited another user (lassejl) which has a Bintray lib on Market to this thread, maybe he has some info on this.

I have a lib on Bintray that is uploaded to bintray automagically.

My repo:
https://bintray.com/rbrastad/XP/no.rbrastad.xp.lib2render

My build.gradle

Bintray plugin

Take a look at my build.gradle and check that you have the same bintray stuff in yours

The steps you need to do:

  • Create a account on bintray
  • Create a maven repo
  • Create a bintray API key (password)
  • Setup your gradle.build file for bintray plugin
  • Add user and API key to the ~/.gradle/gradle.properties (so you donā€™t publish your user password )

When everything is setup you can do: ā€œ./gradlew bintrayUploadā€ and the lib is built and uploaded to the repo.

Then you need to go to your bintray repo and publish the new release.

When that is done you are ready to go and can be used as I have done here: https://github.com/rbrastad/app-bootstrap3-agency/blob/master/build.gradle

1 Like

Thanks! I will look into this @rbrastad . I uploaded the files manually, and maybe somehting is wrong with the pom. Ill reply here again if i have any questions!

1 Like

Quick update. Following @rbrastad guide(Thank you very much!), I was sucessfull to upload my lib to bintray, which was my problem all alongā€¦ I tried to upload manually, and thats why I could not compile from it.
Along the way, I got an error with the version of the bintray app you used(ā€˜com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6ā€™): date() not serving a parsable date. I found the newest version number from bintray and was sucessfull :slight_smile:


Thanks for all the help!

2 Likes