|
279 | 279 | </execution> |
280 | 280 | </executions> |
281 | 281 | </plugin> |
| 282 | + <plugin> |
| 283 | + <groupId>org.codehaus.mojo</groupId> |
| 284 | + <artifactId>rpm-maven-plugin</artifactId> |
| 285 | + <version>2.3.0</version> |
| 286 | + <executions> |
| 287 | + <execution> |
| 288 | + <phase>package</phase> |
| 289 | + <goals> |
| 290 | + <goal>rpm</goal> |
| 291 | + </goals> |
| 292 | + <configuration> |
| 293 | + <license>GPLv3</license> |
| 294 | + <distribution>Nomer</distribution> |
| 295 | + <group>Application/Collectors</group> |
| 296 | + <packager>Jorrit Poelen</packager> |
| 297 | + <prefix>/opt/${project.artifactId}</prefix> |
| 298 | + <copyTo>${project.build.directory}/${project.artifactId}-${project.version}.rpm</copyTo> |
| 299 | + <!--<changelogFile>changelog.md</changelogFile>--> |
| 300 | + <defineStatements> |
| 301 | + <defineStatement>_unpackaged_files_terminate_build 0</defineStatement> |
| 302 | + </defineStatements> |
| 303 | + <mappings> |
| 304 | + <mapping> |
| 305 | + <directory>/opt/${project.artifactId}/lib</directory> |
| 306 | + <directoryIncluded>true</directoryIncluded> |
| 307 | + <filemode>755</filemode> |
| 308 | + <username>root</username> |
| 309 | + <groupname>root</groupname> |
| 310 | + </mapping> |
| 311 | + <mapping> |
| 312 | + <directory>/opt/${project.artifactId}/lib</directory> |
| 313 | + <directoryIncluded>false</directoryIncluded> |
| 314 | + <filemode>644</filemode> |
| 315 | + <directoryIncluded>false</directoryIncluded> |
| 316 | + <username>root</username> |
| 317 | + <groupname>root</groupname> |
| 318 | + <dependency/> |
| 319 | + </mapping> |
| 320 | + <mapping> |
| 321 | + <directory>/opt/${project.artifactId}/lib</directory> |
| 322 | + <directoryIncluded>false</directoryIncluded> |
| 323 | + <filemode>644</filemode> |
| 324 | + <username>root</username> |
| 325 | + <groupname>root</groupname> |
| 326 | + <sources> |
| 327 | + <source> |
| 328 | + <location>target/${project.artifactId}-${project.version}.jar</location> |
| 329 | + </source> |
| 330 | + </sources> |
| 331 | + </mapping> |
| 332 | + <mapping> |
| 333 | + <directory>/usr/bin</directory> |
| 334 | + <directoryIncluded>false</directoryIncluded> |
| 335 | + <filemode>755</filemode> |
| 336 | + <username>root</username> |
| 337 | + <groupname>root</groupname> |
| 338 | + <sources> |
| 339 | + <source> |
| 340 | + <location>src/main/rpm/${project.artifactId}</location> |
| 341 | + </source> |
| 342 | + </sources> |
| 343 | + </mapping> |
| 344 | + </mappings> |
| 345 | + <preinstallScriptlet> |
| 346 | + <scriptFile>src/main/rpm/preinstall.sh</scriptFile> |
| 347 | + <fileEncoding>utf-8</fileEncoding> |
| 348 | + <filter>true</filter> |
| 349 | + </preinstallScriptlet> |
| 350 | + </configuration> |
| 351 | + </execution> |
| 352 | + </executions> |
| 353 | + </plugin> |
| 354 | + |
282 | 355 | </plugins> |
283 | 356 | </build> |
284 | 357 | </project> |
0 commit comments