%global _version %(echo %version | tr . _) Name: jipsy Version: 0.4.0 Release: 1%{?dist} Summary: Configurable Java Annotation Processor License: ASL 2.0 URL: https://github.com/aalmiray/jipsy Source0: https://github.com/aalmiray/jipsy/archive/RELEASE_%{_version}.tar.gz BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildArch: noarch %description Jipsy is a configurable Java Annotation Processor to simplify the use of the Service Provider Interface. JDK6 added a neat facility named ServiceLoader that enables library authors to hook in implementations using an Service provider interface (SPI). As explained at the ServiceLoader, services must follow certain rules in order to be considered as such; they also must be registered using an standard location based on a naming convention. The following rules apply to classes that may be considered services . The class must implement at least one target interface (the service interface). . The class must provide a no-args constructor. . The class must be public. . The class name should be added to a file named `META-INF/services/` This library provides a mechanism for enforcing those rules by simply adding an annotation on each service implementation, for example say there exists the following `Calculator` service interface Jipsy is a re-implementation of the org.mangosdk.spi project, original by Roel Spilker and Bart Enkelaar. %package parent Summary: Jipsy Parent POM %description parent Jipsy Parent POM. %package test-support Summary: Jipsy compliance test suite %description test-support Jipsy compliance test suite. %package tests Summary: Jipsy Test suite %description tests Jipsy Test suite. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-RELEASE_%{_version} %mvn_package ":jipsy-tests::tests:" jipsy-tests %build %mvn_build -s %install %mvn_install %files -f .mfiles-jipsy %doc README.adoc %license LICENSE.txt NOTICE.txt %files parent -f .mfiles-jipsy-parent %license LICENSE.txt NOTICE.txt %files test-support -f .mfiles-jipsy-test-support %files tests -f .mfiles-jipsy-tests %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog * Sun Dec 20 2015 gil cattaneo 0.4.0-1 - initial rpm