singleton

This is a recipe for conversion of current mvn-rpmbuild spec file into xmvn style spec file.

In this recipe we'll show how to convert Maven projects using following keywords:

Original spec file content

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
%if 0%{?fedora}
%bcond_without extensions
%endif

%global short_name guice

Name:           google-%{short_name}
Version:        3.1.2
Release:        8%{?dist}
Summary:        Lightweight dependency injection framework for Java 5 and above
Group:          Development/Libraries
License:        ASL 2.0
URL:            https://github.com/sonatype/sisu-%{short_name}
# ./create-tarball.sh %{version}
Source:         %{name}-%{version}.tar.xz
BuildArch:      noarch

BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:  javapackages-tools >= 0.7.0
BuildRequires:  maven
BuildRequires:  maven-remote-resources-plugin
BuildRequires:  apache-resource-bundles
BuildRequires:  aopalliance
BuildRequires:  atinject
BuildRequires:  cglib
BuildRequires:  guava
BuildRequires:  slf4j

%if %{with extensions}
BuildRequires:  hibernate-jpa-2.0-api
BuildRequires:  springframework-beans
BuildRequires:  tomcat-servlet-3.0-api
%endif

# Test dependencies:
%if 0
BuildRequires:  maven-surefire-provider-testng
BuildRequires:  aqute-bnd
BuildRequires:  atinject-tck
BuildRequires:  easymock2
BuildRequires:  felix-framework
BuildRequires:  hibernate3-entitymanager
BuildRequires:  mvn(org.hsqldb:hsqldb-j5)
BuildRequires:  testng
%endif

Requires:       java
Requires:       jpackage-utils
Requires:       aopalliance
Requires:       atinject
Requires:       cglib
Requires:       guava
Requires:       slf4j
Requires:       %{short_name}-parent = %{version}-%{release}
Provides:       %{short_name} = %{version}-%{release}

%description
Put simply, Guice alleviates the need for factories and the use of new
in your Java code. Think of Guice's @Inject as the new new. You will
still need to write factories in some cases, but your code will not
depend directly on them. Your code will be easier to change, unit test
and reuse in other contexts.

Guice embraces Java's type safe nature, especially when it comes to
features introduced in Java 5 such as generics and annotations. You
might think of Guice as filling in missing features for core
Java. Ideally, the language itself would provide most of the same
features, but until such a language comes along, we have Guice.

Guice helps you design better APIs, and the Guice API itself sets a
good example. Guice is not a kitchen sink. We justify each feature
with at least three use cases. When in doubt, we leave it out. We
build general functionality which enables you to extend Guice rather
than adding every feature to the core framework.

%package -n %{short_name}-parent
Summary:        Guice parent POM
Requires:       jpackage-utils

%description -n %{short_name}-parent
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides parent POM for Guice modules.

%if %{with extensions}

%package -n %{short_name}-assistedinject
Summary:        AssistedInject extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-assistedinject
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides AssistedInject module for Guice.

%package -n %{short_name}-extensions
Summary:        Extensions for Guice
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-extensions
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides extensions POM for Guice.

%package -n %{short_name}-grapher
Summary:        Grapher extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}
Requires:       %{short_name}-assistedinject = %{version}-%{release}
Requires:       %{short_name}-multibindings = %{version}-%{release}

%description -n %{short_name}-grapher
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Grapher module for Guice.

%package -n %{short_name}-jmx
Summary:        JMX extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-jmx
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides JMX module for Guice.

%package -n %{short_name}-jndi
Summary:        JNDI extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-jndi
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides JNDI module for Guice.

%package -n %{short_name}-multibindings
Summary:        MultiBindings extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-multibindings
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides MultiBindings module for Guice.

%package -n %{short_name}-persist
Summary:        Persist extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       hibernate-jpa-2.0-api
Requires:       tomcat-servlet-3.0-api
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-persist
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Persist module for Guice.

%package -n %{short_name}-servlet
Summary:        Servlet extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       tomcat-servlet-3.0-api
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-servlet
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Servlet module for Guice.

%package -n %{short_name}-spring
Summary:        Spring extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       springframework-beans
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-spring
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Spring module for Guice.

%package -n %{short_name}-throwingproviders
Summary:        ThrowingProviders extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-throwingproviders
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides ThrowingProviders module for Guice.

%endif # with extensions

%package javadoc
Summary:        API documentation for Guice
Group:          Documentation
Requires:       jpackage-utils
Provides:       %{short_name}-javadoc = %{version}-%{release}

%description javadoc
This package provides %{summary}.

%prep
%setup -q

# We don't have struts2 in Fedora yet.
%pom_disable_module struts2 extensions

# Remove additional build profiles, which we don't use anyways
# and which are only pulling additional dependencies.
%pom_xpath_remove pom:project/pom:profiles core

# Animal sniffer is only causing problems. Disable it for now.
%pom_remove_plugin :animal-sniffer-maven-plugin core
%pom_remove_plugin :animal-sniffer-maven-plugin extensions

# We don't have the custom doclet used by upstream. Remove
# maven-javadoc-plugin to generate javadocs with default style.
%pom_remove_plugin :maven-javadoc-plugin

# Don't try to build extension modules unless they are needed
%if %{without extensions}
%pom_disable_module extensions
%endif

%build
# Skip tests because of missing dependency (hsqldb-j5).
mvn-rpmbuild -e -Dmaven.test.skip=true verify javadoc:aggregate

%install
# directories
install -d -m 755 %{buildroot}%{_javadir}/%{short_name}
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
# JARs
install -p -m 644 core/target/sisu-%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}.jar
# POMs
install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-parent.pom
install -p -m 644 core/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{name}.pom
# depmaps
%add_maven_depmap JPP.%{short_name}-%{short_name}-parent.pom -f parent
%add_maven_depmap JPP.%{short_name}-%{name}.pom %{short_name}/%{name}.jar -a com.google.inject:guice
# javadoc
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
# compat symlink
ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}

# Extensions
%if %{with extensions}
# JARs
install -p -m 644 extensions/assistedinject/target/%{short_name}-assistedinject-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-assistedinject.jar
install -p -m 644 extensions/grapher/target/%{short_name}-grapher-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-grapher.jar
install -p -m 644 extensions/jmx/target/%{short_name}-jmx-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-jmx.jar
install -p -m 644 extensions/jndi/target/%{short_name}-jndi-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-jndi.jar
install -p -m 644 extensions/multibindings/target/%{short_name}-multibindings-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-multibindings.jar
install -p -m 644 extensions/persist/target/%{short_name}-persist-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-persist.jar
install -p -m 644 extensions/servlet/target/%{short_name}-servlet-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-servlet.jar
install -p -m 644 extensions/spring/target/%{short_name}-spring-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-spring.jar
install -p -m 644 extensions/throwingproviders/target/%{short_name}-throwingproviders-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-throwingproviders.jar
# POMs
install -p -m 644 extensions/assistedinject/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-assistedinject.pom
install -p -m 644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-extensions.pom
install -p -m 644 extensions/grapher/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-grapher.pom
install -p -m 644 extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-jmx.pom
install -p -m 644 extensions/jndi/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-jndi.pom
install -p -m 644 extensions/multibindings/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-multibindings.pom
install -p -m 644 extensions/persist/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-persist.pom
install -p -m 644 extensions/servlet/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-servlet.pom
install -p -m 644 extensions/spring/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-spring.pom
install -p -m 644 extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-throwingproviders.pom
# depmaps
%add_maven_depmap JPP.%{short_name}-%{short_name}-assistedinject.pom %{short_name}/%{short_name}-assistedinject.jar -f assistedinject -a com.google.inject.extensions:guice-assistedinject
%add_maven_depmap JPP.%{short_name}-%{short_name}-extensions.pom -f extensions
%add_maven_depmap JPP.%{short_name}-%{short_name}-grapher.pom %{short_name}/%{short_name}-grapher.jar -f grapher -a com.google.inject.extensions:guice-grapher
%add_maven_depmap JPP.%{short_name}-%{short_name}-jmx.pom %{short_name}/%{short_name}-jmx.jar -f jmx -a com.google.inject.extensions:guice-jmx
%add_maven_depmap JPP.%{short_name}-%{short_name}-jndi.pom %{short_name}/%{short_name}-jndi.jar -f jndi -a com.google.inject.extensions:guice-jndi
%add_maven_depmap JPP.%{short_name}-%{short_name}-multibindings.pom %{short_name}/%{short_name}-multibindings.jar -f multibindings -a com.google.inject.extensions:guice-multibindings
%add_maven_depmap JPP.%{short_name}-%{short_name}-persist.pom %{short_name}/%{short_name}-persist.jar -f persist -a com.google.inject.extensions:guice-persist
%add_maven_depmap JPP.%{short_name}-%{short_name}-servlet.pom %{short_name}/%{short_name}-servlet.jar -f servlet -a com.google.inject.extensions:guice-servlet
%add_maven_depmap JPP.%{short_name}-%{short_name}-spring.pom %{short_name}/%{short_name}-spring.jar -f spring -a com.google.inject.extensions:guice-spring
%add_maven_depmap JPP.%{short_name}-%{short_name}-throwingproviders.pom %{short_name}/%{short_name}-throwingproviders.jar -f throwingproviders -a com.google.inject.extensions:guice-throwingproviders
%endif # with extensions

%files -f .mfiles # see singleton packaging in notable differences
%{_javadir}/%{name}.jar # see singleton packaging in notable differences

%files -n %{short_name}-parent -f .mfiles-parent # see singleton packaging in notable differences
%doc COPYING # see singleton packaging in notable differences

%if %{with extensions} # see singleton packaging in notable differences
%files -n %{short_name}-assistedinject -f .mfiles-assistedinject # see singleton packaging in notable differences
%files -n %{short_name}-extensions -f .mfiles-extensions # see singleton packaging in notable differences
%files -n %{short_name}-grapher -f .mfiles-grapher # see singleton packaging in notable differences
%files -n %{short_name}-jmx -f .mfiles-jmx # see singleton packaging in notable differences
%files -n %{short_name}-jndi -f .mfiles-jndi # see singleton packaging in notable differences
%files -n %{short_name}-multibindings -f .mfiles-multibindings # see singleton packaging in notable differences
%files -n %{short_name}-persist -f .mfiles-persist # see singleton packaging in notable differences
%files -n %{short_name}-servlet -f .mfiles-servlet # see singleton packaging in notable differences
%files -n %{short_name}-spring -f .mfiles-spring # see singleton packaging in notable differences
%files -n %{short_name}-throwingproviders -f .mfiles-throwingproviders # see singleton packaging in notable differences
%endif # with extensions # see singleton packaging in notable differences

%files javadoc # see singleton packaging in notable differences
%doc COPYING # see singleton packaging in notable differences
%{_javadocdir}/%{name} # see singleton packaging in notable differences

%changelog
* Fri Nov 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-8
- Remove README

New xmvn spec file

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
%if 0%{?fedora}
%bcond_without extensions
%endif

%global short_name guice

Name:           google-%{short_name}
Version:        3.1.2
Release:        9%{?dist}
Summary:        Lightweight dependency injection framework for Java 5 and above
Group:          Development/Libraries
License:        ASL 2.0
URL:            https://github.com/sonatype/sisu-%{short_name}
# ./create-tarball.sh %{version}
Source:         %{name}-%{version}.tar.xz
BuildArch:      noarch

BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:  javapackages-tools >= 0.7.0
BuildRequires:  xmvn
BuildRequires:  maven-remote-resources-plugin
BuildRequires:  apache-resource-bundles
BuildRequires:  aopalliance
BuildRequires:  atinject
BuildRequires:  cglib
BuildRequires:  guava
BuildRequires:  slf4j

%if %{with extensions}
BuildRequires:  hibernate-jpa-2.0-api
BuildRequires:  springframework-beans
BuildRequires:  tomcat-servlet-3.0-api
%endif

# Test dependencies:
%if 0
BuildRequires:  maven-surefire-provider-testng
BuildRequires:  aqute-bnd
BuildRequires:  atinject-tck
BuildRequires:  easymock2
BuildRequires:  felix-framework
BuildRequires:  hibernate3-entitymanager
BuildRequires:  mvn(org.hsqldb:hsqldb-j5)
BuildRequires:  testng
%endif

Requires:       %{short_name}-parent = %{version}-%{release}
Provides:       %{short_name} = %{version}-%{release}

%description
Put simply, Guice alleviates the need for factories and the use of new
in your Java code. Think of Guice's @Inject as the new new. You will
still need to write factories in some cases, but your code will not
depend directly on them. Your code will be easier to change, unit test
and reuse in other contexts.

Guice embraces Java's type safe nature, especially when it comes to
features introduced in Java 5 such as generics and annotations. You
might think of Guice as filling in missing features for core
Java. Ideally, the language itself would provide most of the same
features, but until such a language comes along, we have Guice.

Guice helps you design better APIs, and the Guice API itself sets a
good example. Guice is not a kitchen sink. We justify each feature
with at least three use cases. When in doubt, we leave it out. We
build general functionality which enables you to extend Guice rather
than adding every feature to the core framework.

%package -n %{short_name}-parent
Summary:        Guice parent POM

%description -n %{short_name}-parent
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides parent POM for Guice modules.

%if %{with extensions}

%package -n %{short_name}-assistedinject
Summary:        AssistedInject extension module for Guice
Requires:       java
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-assistedinject
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides AssistedInject module for Guice.

%package -n %{short_name}-extensions
Summary:        Extensions for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-extensions
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides extensions POM for Guice.

%package -n %{short_name}-grapher
Summary:        Grapher extension module for Guice
Requires:       %{short_name} = %{version}-%{release}
Requires:       %{short_name}-assistedinject = %{version}-%{release}
Requires:       %{short_name}-multibindings = %{version}-%{release}

%description -n %{short_name}-grapher
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Grapher module for Guice.

%package -n %{short_name}-jmx
Summary:        JMX extension module for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-jmx
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides JMX module for Guice.

%package -n %{short_name}-jndi
Summary:        JNDI extension module for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-jndi
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides JNDI module for Guice.

%package -n %{short_name}-multibindings
Summary:        MultiBindings extension module for Guice
Requires:       java
Requires:       jpackage-utils
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-multibindings
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides MultiBindings module for Guice.

%package -n %{short_name}-persist
Summary:        Persist extension module for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-persist
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Persist module for Guice.

%package -n %{short_name}-servlet
Summary:        Servlet extension module for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-servlet
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Servlet module for Guice.

%package -n %{short_name}-spring
Summary:        Spring extension module for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-spring
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Spring module for Guice.

%package -n %{short_name}-throwingproviders
Summary:        ThrowingProviders extension module for Guice
Requires:       %{short_name} = %{version}-%{release}

%description -n %{short_name}-throwingproviders
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides ThrowingProviders module for Guice.

%endif # with extensions

%package javadoc
Summary:        API documentation for Guice
Group:          Documentation
Provides:       %{short_name}-javadoc = %{version}-%{release}

%description javadoc
This package provides %{summary}.

%prep
%setup -q

# We don't have struts2 in Fedora yet.
%pom_disable_module struts2 extensions

# Remove additional build profiles, which we don't use anyways
# and which are only pulling additional dependencies.
%pom_xpath_remove pom:project/pom:profiles core

# Animal sniffer is only causing problems. Disable it for now.
%pom_remove_plugin :animal-sniffer-maven-plugin core
%pom_remove_plugin :animal-sniffer-maven-plugin extensions

# We don't have the custom doclet used by upstream. Remove
# maven-javadoc-plugin to generate javadocs with default style.
%pom_remove_plugin :maven-javadoc-plugin

# Don't try to build extension modules unless they are needed
%if %{without extensions}
%pom_disable_module extensions
%endif

%build
%if %{with extensions}
%mvn_alias ":guice-{assistedinject,grapher,jmx,jndi,multibindings,persist, \ # see artifact aliases in notable differences
   servlet,spring,throwingproviders}" "com.google.inject.extensions:guice-@1" # see artifact aliases in notable differences
%endif # with extensions

%mvn_file  ":guice-{*}"  %{short_name}/guice-@1 # see compatibility symlinks in notable differences
%mvn_file  ":sisu-guice" %{short_name}/%{name} # see compatibility symlinks in notable differences
%mvn_file  ":sisu-guice" %{name} # see compatibility symlinks in notable differences
%mvn_alias ":sisu-guice" "com.google.inject:guice" # see artifact aliases in notable differences
# Skip tests because of missing dependency (hsqldb-j5).
%mvn_build -f -s # see singleton packaging in notable differences

%install
%mvn_install

%files -f .mfiles-sisu-guice

%files -n %{short_name}-parent -f .mfiles-guice-parent
%doc COPYING

%if %{with extensions}
%files -n %{short_name}-assistedinject -f .mfiles-guice-assistedinject
%files -n %{short_name}-extensions -f .mfiles-guice-extensions
%files -n %{short_name}-grapher -f .mfiles-guice-grapher
%files -n %{short_name}-jmx -f .mfiles-guice-jmx
%files -n %{short_name}-jndi -f .mfiles-guice-jndi
%files -n %{short_name}-multibindings -f .mfiles-guice-multibindings
%files -n %{short_name}-persist -f .mfiles-guice-persist
%files -n %{short_name}-servlet -f .mfiles-guice-servlet
%files -n %{short_name}-spring -f .mfiles-guice-spring
%files -n %{short_name}-throwingproviders -f .mfiles-guice-throwingproviders
%endif # with extensions

%files javadoc -f .mfiles-javadoc
%doc COPYING

%changelog
* Mon Jan 28 2013 Michal Srb <msrb@redhat.com> - 3.1.2-9
- Build with xmvn

Comparison of manual and automatic requires

Manual requires

guice-servlet requires:

guice-jmx requires:

guice-extensions requires:

guice-parent requires:

guice-throwingproviders requires:

google-guice requires:

guice-jndi requires:

guice-grapher requires:

guice-persist requires:

guice-multibindings requires:

google-guice-javadoc requires:

guice-assistedinject requires:

guice-spring requires:

Automatic requires

guice-servlet requires:

guice-jmx requires:

guice-extensions requires:

guice-parent requires:

guice-throwingproviders requires:

google-guice requires:

guice-jndi requires:

guice-grapher requires:

guice-persist requires:

guice-multibindings requires:

google-guice-javadoc requires:

guice-assistedinject requires:

guice-spring requires:

Notable spec file differences