1 Summary: Maven Repository Manager
6 Group: Networking/Daemons/Java
7 Source0: http://nexus.sonatype.org/downloads/%{name}-webapp-%{version}.war
8 # Source0-md5: 1297a834a9a6a58b62a22b5e008d1f4b
9 Source1: %{name}-context.xml
10 Source2: %{name}-plexus.properties
11 Source3: %{name}-security-configuration.xml
12 Source4: %{name}-security.xml
13 URL: http://nexus.sonatype.org/
14 BuildRequires: rpm-javaprov
15 BuildRequires: rpmbuild(macros) >= 1.300
16 Requires: jpackage-utils
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Nexus is a powerful and robust Maven repository manager, created to
24 provide reliable access to artifacts required for development and
25 provisioning. Maven's central repository has always served as a great
26 convenience for users of Maven, but it has always been recommended to
27 maintain your own repositories to ensure stability within your
28 organization. Nexus greatly simplifies the maintenance of your own
29 internal repositories and access to external repositories. With Nexus
30 you can completely control access to, and deployment of, every
31 artifact in your organization from a single location.
37 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/nexus,%{_datadir}/nexus,%{_tomcatconfdir},/var/log/nexus,%{_sharedstatedir}/{nexus/conf,tomcat/conf/Catalina/localhost}}
40 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml
41 ln -sf %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_tomcatconfdir}/%{name}.xml
42 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/plexus.properties
44 cp -a . $RPM_BUILD_ROOT%{_datadir}/nexus
46 mv $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/web.xml
47 ln -sf %{_sysconfdir}/nexus/web.xml $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml
48 ln -sf %{_sysconfdir}/nexus/plexus.properties $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/plexus.properties
50 # These files are configs, but they should be created by nexus. So lets
51 # install them as %%ghost %%config, and link to /etc/nexus
52 touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/log4j.properties
53 touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/nexus.xml
54 touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/lvo-plugin.xml
55 ln -sf %{_sharedstatedir}/nexus/conf/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/nexus/log4j.properties
56 ln -sf %{_sharedstatedir}/nexus/conf/nexus.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/nexus.xml
57 ln -sf %{_sharedstatedir}/nexus/conf/lvo-plugin.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/lvo-plugin.xml
59 install %{SOURCE3} $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security-configuration.xml
60 install %{SOURCE4} $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security.xml
61 ln -sf %{_sharedstatedir}/nexus/conf/security-configuration.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security-configuration.xml
62 ln -sf %{_sharedstatedir}/nexus/conf/security.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security.xml
65 ln -s /var/log/nexus $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/logs
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
73 %attr(770,root,servlet) %{_datadir}/nexus
74 %dir %attr(770,root,servlet) %{_sharedstatedir}/nexus
75 %dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/logs
76 %dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/conf
77 %attr(770,root,servlet) /var/log/nexus
79 %dir %{_sysconfdir}/nexus
80 %attr(644,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/plexus.properties
81 %attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/web.xml
82 %attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/tomcat-context.xml
83 %{_tomcatconfdir}/nexus.xml
85 # These file must be writeable, that is why it goes to /var
86 %attr(640,tomcat,tomcat) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/security-configuration.xml
87 %attr(640,tomcat,tomcat) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/security.xml
88 %{_sysconfdir}/nexus/security-configuration.xml
89 %{_sysconfdir}/nexus/security.xml
91 # These files are created by nexus, but they are config files.
92 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/log4j.properties
93 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/nexus.xml
94 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/lvo-plugin.xml
95 %{_sysconfdir}/nexus/log4j.properties
96 %{_sysconfdir}/nexus/nexus.xml
97 %{_sysconfdir}/nexus/lvo-plugin.xml