[fedora-java] [IMPORTANT] News about Fedora Maven

Aleksandar Kurtakov akurtako at redhat.com
Fri Dec 7 16:32:32 UTC 2012


----- Original Message -----
> From: "Mikolaj Izdebski" <mizdebsk at redhat.com>
> To: "java-devel" <java-devel at lists.fedoraproject.org>
> Sent: Friday, December 7, 2012 1:55:53 PM
> Subject: [fedora-java] [IMPORTANT] News about Fedora Maven
> 
> Hello all,
> 
> Maven in Fedora is currently undergoing quite big changes, which are
> intended to make packaging of Maven artifacts simpler and less
> error-prone. Some of the features are already implemented and
> considered stable, so you can start using them straight away. Some of
> them are implemented or partly implemented, but not yet intended to
> be
> used widely because they may be changed in near future.
> 
> 1) jpackage-utils requires generator
> 
> Any package that contains Maven fragments in %{_mavendepmapfragdir}
> doesn't need to explicitly specify "Requires: jpackage-utils" any
> longer -- this dependency will be generated automatically by rpmbuild
> on build time. The same applies to javadoc packages (packages that
> install any files in %{_javadocdir}). For these kind of packages you
> can remove Requires: jpackage-utils lines form your spec files. This
> feature is implemented in Rawhide and will be backported to Fedora 17
> and 18.
> 
> 2) Java compiler source and target configuration
> 
> In Rawhide Maven Compiler Plugin is now forced to enable source
> compatibility of at least Java 1.5 and target not older than
> source. This means that Java sources will be compiled as Java 1.5,
> even if POM files specify source format older than 1.5. It also means
> that JSR-14-like bugs will no longer exist because target format will
> never be older than source format.
> 
> 3) maven package split
> 
> Currently maven package is a monolithic package with a big dependency
> chain. It contains upstream Maven as well as Fedora-specific
> customizations (like mvn-rpmbuild script). Users that just want to
> use
> Maven don't need to have all the Fedora-specific extensions
> installed. Because of that maven package will be split into two
> parts:
> 
> a) maven. This package will contain only upstream Maven, without any
> extensions or customizations. In other words, maven package will ship
> upstream-like maven.
> 
> b) maven-local. This package will contain Fedora extensions for Maven
> and tools useful in building RPM packages containing Maven
> artifacts. This package will depend on maven and may also depend on
> certain Maven plugins and POM files. If you are building RPM packages
> using Maven you want to depend on maven-local.
> 
> This means that all Java packages that use "BuildRequires: maven"
> will
> have to migrate to "BuildRequires: maven-local". You can (but you
> don't have to) start migrating them straight away. Packages that
> build-require maven will be migrated automatically in future (during
> a
> mass-rebuild).
> 
> 4) Simplified %files sections
> 
> During build Maven generates a number of files prefixed ".mfiles"
> that
> contain lists of installed files. You can use .mfiles* as an argument
> to -f option of %files macro instead of manually listing all files
> installed in a subpackage. Note that .mfiles* contain only files
> recognized by maven (such as pom, jar and fragment files), so any
> other files, such as documentation, still need to be listed
> explicitly.
> 
> 
> The above features (1-4) are already implemented and ready for
> use. There are some future features that are under development or
> testing. Let me describe them briefly:
> 
> 5) Automatic requires generator - packages don't need to explicitly
> list dependencies on other maven artifacts, appropriate requires will
> be generated automatically from POM files.

This will be only for runtime dependencies, right? Aka, test, optional and build dependencies will be ignored. 

Alexander Kurtakov
Red Hat Eclipse team

> 
> 6) Simplified %build and %install sections of spec files (these
> sections can be one-liners, %mvn_build and %mvn_install,
> respectively).
> 
> Features 5 and 6 are under development. They are currently used by a
> small number of packages (as a form of testing in production). If you
> want to have impact on future of Fedora Java packaging you can take a
> look at example packages, report any bugs found and share your
> feedback. You can find out which packages use features 5 and 6 with
> repoquery:
> 
>   repoquery --qf %{name} --repoid rawhide-source --arch src
>   --whatrequires xmvn
> 
> 
> --
> Mikolaj Izdebski
> --
> java-devel mailing list
> java-devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/java-devel


More information about the java-devel mailing list