Maven
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.
Maven is by far the most consistent Java build system, allowing large amount of automation. In most common situations only following steps are necessary:
-
In
%buildsection of the spec file use%mvn_buildmacro. -
In
%installsection, use%mvn_installmacro. -
Use generated file
.mfileslists to populate%filessection with-fswitch.
BuildRequires: maven-local
...
%build
%mvn_build
...
%install
%mvn_install
...
%files -f .mfiles
%dir %{_javadir}/%{name}
%files javadoc -f .mfiles-javadoc
The macros %mvn_build and %mvn_install automatically handle building of the JAR files and their subsequent installation to the correct directory.
The corresponding POM and metadata files are also installed.
Want to help? Learn how to contribute to Fedora Docs ›