1 |
Name: maven-license-plugin |
2 |
Version: 1.9.0 |
3 |
Release: %mkrel 2 |
4 |
Summary: Maven plugin to update header licenses of source files |
5 |
|
6 |
Group: Development/Java |
7 |
License: ASL 2.0 |
8 |
URL: http://code.google.com/p/maven-license-plugin |
9 |
### upstream only provides binaries or source without build scripts |
10 |
# tar creation instructions |
11 |
# svn export http://maven-license-plugin.googlecode.com/svn/tags/maven-license-plugin-1.9.0 maven-license-plugin |
12 |
# tar cfJ maven-license-plugin-1.9.0.tar.xz maven-license-plugin |
13 |
Source0: %{name}-%{version}.tar.xz |
14 |
# custom depmap needed to workaround missing xml-commons-apis poms |
15 |
#Source1: maven-license-plugin-jpp-depmap.xml |
16 |
# remove testng dep (tests are skipped) and maven-license-plugin call |
17 |
# add maven 3 support |
18 |
Patch0: maven-license-plugin-1.9.0-fixbuild.patch |
19 |
|
20 |
BuildArch: noarch |
21 |
|
22 |
BuildRequires: java-devel |
23 |
BuildRequires: jpackage-utils |
24 |
# pom BR |
25 |
BuildRequires: mycila-parent-pom |
26 |
BuildRequires: apache-resource-bundles |
27 |
BuildRequires: maven |
28 |
BuildRequires: maven-assembly-plugin |
29 |
BuildRequires: maven-clean-plugin |
30 |
BuildRequires: maven-compiler-plugin |
31 |
BuildRequires: maven-dependency-plugin |
32 |
BuildRequires: maven-deploy-plugin |
33 |
BuildRequires: maven-install-plugin |
34 |
BuildRequires: maven-jar-plugin |
35 |
BuildRequires: maven-javadoc-plugin |
36 |
BuildRequires: maven-plugin-plugin |
37 |
BuildRequires: maven-release-plugin |
38 |
BuildRequires: maven-remote-resources-plugin |
39 |
BuildRequires: maven-source-plugin |
40 |
BuildRequires: maven-surefire-plugin |
41 |
BuildRequires: plexus-utils |
42 |
BuildRequires: xmltool |
43 |
# old BR |
44 |
BuildRequires: maven-changelog-plugin |
45 |
BuildRequires: maven-changes-plugin |
46 |
BuildRequires: maven-eclipse-plugin |
47 |
BuildRequires: maven-help-plugin |
48 |
BuildRequires: maven-idea-plugin |
49 |
BuildRequires: maven-plugin-testing-harness |
50 |
BuildRequires: maven-pmd-plugin |
51 |
BuildRequires: maven-resources-plugin |
52 |
BuildRequires: maven-repository-plugin |
53 |
BuildRequires: maven-shared |
54 |
BuildRequires: maven-site-plugin |
55 |
BuildRequires: plexus-classworlds |
56 |
BuildRequires: xml-commons-apis |
57 |
|
58 |
Requires: java |
59 |
Requires: jpackage-utils |
60 |
Requires: maven |
61 |
Requires: mycila-parent-pom |
62 |
Requires: xmltool |
63 |
|
64 |
%description |
65 |
maven-license-plugin is a Maven 2 plugin that help you managing license |
66 |
headers in source files. Basically, when you are developing a project |
67 |
either in open source or in a company, you often need to add at the top |
68 |
of your source files a license to protect your work. |
69 |
This plugin lets you maintain the headers, including checking if the |
70 |
header is present, generating a report and of course having the |
71 |
possibility to update / reformat missing license headers. |
72 |
|
73 |
%files |
74 |
%doc NOTICE.txt LICENSE.txt |
75 |
%{_mavenpomdir}/JPP-%{name}.pom |
76 |
%{_mavendepmapfragdir}/%{name} |
77 |
%{_javadir}/%{name}.jar |
78 |
|
79 |
#-------------------------------------------------------------------- |
80 |
|
81 |
%package javadoc |
82 |
Summary: Javadocs for %{name} |
83 |
Group: Development/Java |
84 |
Requires: %{name} = %{version}-%{release} |
85 |
Requires: jpackage-utils |
86 |
BuildArch: noarch |
87 |
|
88 |
%description javadoc |
89 |
This package contains the API documentation for %{name}. |
90 |
|
91 |
%pre javadoc |
92 |
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ |
93 |
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : |
94 |
|
95 |
%files javadoc |
96 |
%{_javadocdir}/%{name} |
97 |
|
98 |
#-------------------------------------------------------------------- |
99 |
|
100 |
%prep |
101 |
%setup -q -n %{name} |
102 |
|
103 |
%patch0 -p0 |
104 |
|
105 |
# fix EOL |
106 |
sed -i 's/\r//' LICENSE.txt |
107 |
sed -i 's/\r//' NOTICE.txt |
108 |
|
109 |
%build |
110 |
|
111 |
mvn-rpmbuild -e -Dmaven.test.skip=true install javadoc:aggregate |
112 |
|
113 |
%install |
114 |
rm -rf $RPM_BUILD_ROOT |
115 |
|
116 |
mkdir -p $RPM_BUILD_ROOT%{_javadir} |
117 |
install -Dp -m 644 target/%{name}-%{version}.jar \ |
118 |
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar |
119 |
|
120 |
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
121 |
cp -rp target/site/apidocs/ $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
122 |
|
123 |
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} |
124 |
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom |
125 |
%add_maven_depmap JPP-%{name}.pom %{name}.jar |
126 |
|