0

I use dbus-java library in my own library. It depends on unix-java and some more. Those jars are not present in any maven repo.

How would I explicitly depend on all of these? I see several options:

  • send jars to maven repo by myself (though it's not clear for me - how to preserve their groupId?)
  • package all the jar's into mine (which is obviously bad)
  • write in README: "apt-get install dbus-java-bin" and what to include in classpath... but it makes me really sad :(

Note: I came from Ruby land, so I'm relative new to all these weird Maven repos and confused by missing jars everywhere. In Ruby I was always sure that I will be able to retrieve all the gems either from rubygems or from a specified git repo (usually on github).

Could you explain how is better to distribute such libraries?

pjs
  • 18,696
  • 4
  • 27
  • 56
Vlad Bokov
  • 361
  • 2
  • 9
  • Have you seen the maven dbus plugin (http://quest.windwards.net/content/maven-dbus-plugin)? I've never tried it, but I know sometimes it's hard to find plugins so I thought it was worth mentioning. – Gus Jul 16 '14 at 23:13
  • Thanks for the link! But it doesn't solve the problem. The author writes: "Currently, the jar files are available only as Debian packages, as far as I can tell. I have created a set of jar files for dbus and dependencies from sources that can be used until they get into Maven Central". It was in 2013. A year passed, nothing changed. Should I give link to the zip, too?! – Vlad Bokov Jul 16 '14 at 23:19
  • OK, that's usually not a good sign. You may be attempting to use an abandoned project. If so, you may be happier just using the source as part of your own project, since you'll be the one fixing any bugs you find. – Gus Jul 16 '14 at 23:41
  • Do you have a remote repository of your own? EG: Nexus, Artifactory? – Daniel Kaplan Jul 17 '14 at 00:34

2 Answers2

1

What I would do is to download the jars from the net and install them in my local-global repository. (By this I mean the repository that is not local on my machine, but local to the company, often this is managed by Nexus). You just need to set a pom with <groupId>, <artifactId> and <version>. Then, in your pom, you point to them in your dependencies list.

mvn deploy
Mateva
  • 786
  • 1
  • 8
  • 27
0

By the way, if you wander what the groupId should be, you have two options:

com.yourcompany.trirdparty or com.whatever.the.original.groupid.is.groupId

Mateva
  • 786
  • 1
  • 8
  • 27