# Conditionals to help breaking dependency cycle %if 0%{?fedora} %bcond_with bootstrap %endif Name: modernizer-maven-plugin Version: 1.4.0 Release: 1%{?dist} Summary: Maven Plugin to detect uses of legacy Java APIs License: ASL 2.0 URL: https://github.com/andrewgaul/modernizer-maven-plugin Source0: https://github.com/andrewgaul/modernizer-maven-plugin/archive/%{name}-%{version}.tar.gz # https://github.com/andrewgaul/modernizer-maven-plugin/issues/44 Source1: http://www.apache.org/licenses/LICENSE-2.0.txt # Remove RedundantThrows (see https://github.com/checkstyle/checkstyle/issues/473) Patch0: %{name}-1.4.0-checkstyle.patch BuildRequires: maven-local BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.google.inject:guice) BuildRequires: mvn(commons-codec:commons-codec) BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(joda-time:joda-time) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) #BuildRequires: mvn(org.apache.maven.plugins:maven-checkstyle-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.assertj:assertj-core) %if %{with bootstrap} BuildRequires: mvn(org.gaul:modernizer-maven-plugin) %endif BuildRequires: mvn(org.ow2.asm:asm) BuildRequires: mvn(org.ow2.asm:asm-commons) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildRequires: mvn(org.springframework:spring-beans) BuildArch: noarch %description Modernizer Maven Plugin detects uses of legacy APIs which modern Java versions supersede. These modern APIs are often more performant, safer, and idiomatic than the legacy equivalents.For example, Modernizer can detect uses of Vector instead of ArrayList, String.getBytes(String) instead of String.getBytes(Charset), and Guava Objects.equal instead of Java 7 Objects.equals. The default configuration detects over 100 legacy APIs, including third-party libraries like Guava. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-%{name}-%{version} %patch0 -p1 # Unavailable %pom_remove_plugin :findbugs-maven-plugin %pom_remove_plugin :nexus-staging-maven-plugin # Unwated tasks %pom_remove_plugin :maven-javadoc-plugin %pom_remove_plugin :maven-source-plugin # Should be update %pom_remove_plugin :maven-checkstyle-plugin %if %{without bootstrap} %pom_remove_plugin org.gaul:modernizer-maven-plugin %endif # Use only maven3 apis %pom_change_dep :maven-project :maven-core:3.3.3 cp -p %{SOURCE1} LICENSE.txt sed -i 's/\r//' LICENSE.txt %mvn_file : %{name} %build %mvn_build %install %mvn_install %files -f .mfiles %doc README.md %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Sat Dec 12 2015 gil cattaneo 1.4.0-1 - initial rpm