[fedora-java] How to fix "error: File not found: ... /usr/share/maven-fragments/%{name}"

Michal Srb msrb at redhat.com
Tue Jun 10 08:22:24 UTC 2014


Hello,

A lot of packages in Rawhide failed to build with error like this:

error: File not found: /builddir/build/BUILDROOT/bouncycastle-1.50-3.fc21.noarch/usr/share/maven-fragments/bouncycastle

The reason why the packages fail is that new XMvn and javapackages-tools 
no longer produce old fragments/depmaps.

How to fix it?
Spec files of affected packages probably call %add_maven_depmap (most 
common case) and contain lines similar to these in "files" section:

%files
%{_javadir}/bcprov.jar
%{_mavenpomdir}/JPP-bcprov.pom
%{_mavendepmapfragdir}/%{name}
%doc LICENSE

Calls to %add_maven_depmap create ".mfiles" file in current working 
directory. ".mfiles" is a text file which contains list of files given 
to %add_maven_depmap (typically POM and JAR file) and it may also 
contain file(s) generated by macro itself.

So the "files" section in spec file can look like this:
%files -f .mfiles
%doc LICENSE

It simplifies the spec file a bit and it also fixes the problem with 
"File not found".

Please let me know if you have any questions or if you need help with 
migration of your package to .mfiles.

Michal


More information about the java-devel mailing list