Maven dependencies

I’m playing just for sport with a java project. I have zero experiences in RPM packaging and many other things. So please also forgive my terminology.

This software builds successfully downloading it and using mvn install.

Creating a spec file, I can satisfy some maven dependencies with (for instance)

BuildRequires: mvn(org.slf4j:slf4j-log4j12)

But, what about maven objects that are not packaged in Fedora?

As far as I can tell, there’s two possibilities here:

  • Some maven artifacts have different “aliases”, and might be packaged, but not able to be referenced by the exact artifact ID your maven project specifies in its pom. In this case, you can use one of the macros provided for Java packaging, e.g. %mvn_change_dep to correct this dependency in the upstream pom.xml file(s).

  • If the library you need really is not yet packaged for fedora, you’ll have to package that one separately first, so your program can later use it.


Theres also comprehensive documentation and Guidelines for packaging Java projects for fedora. You might find these pages relevant:

1 Like