-
Notifications
You must be signed in to change notification settings - Fork 71
/
pom.xml
138 lines (132 loc) · 4.93 KB
/
pom.xml
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hotels</groupId>
<artifactId>waggle-dance-parent</artifactId>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>waggle-dance-rpm</artifactId>
<description>Packages Waggle Dance for deployment using RPM.</description>
<packaging>pom</packaging>
<properties>
<tmp.directory>${project.build.directory}/tmp-directory</tmp.directory>
<rpm.maven.plugin.version>2.2.0</rpm.maven.plugin.version>
<rpm-sources.directory>${tmp.directory}/waggle-dance-${project.version}</rpm-sources.directory>
<rpm.install.dir>/opt/waggle-dance</rpm.install.dir>
<rpm.install.user>waggle-dance</rpm.install.user>
<rpm.install.group>waggle-dance</rpm.install.group>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>waggle-dance-bin</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.hotels</groupId>
<artifactId>waggle-dance</artifactId>
<version>${project.version}</version>
<classifier>bin</classifier>
<type>tgz</type>
<overWrite>true</overWrite>
<outputDirectory>${tmp.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>${rpm.maven.plugin.version}</version>
<executions>
<execution>
<id>attach-rpm</id>
<phase>package</phase>
<goals>
<goal>attached-rpm</goal>
</goals>
<configuration>
<description>${project.description}</description>
<group>Applications/Engineering</group>
<targetOS>Linux</targetOS>
<targetVendor>redhat</targetVendor>
<defaultUsername>${rpm.install.user}</defaultUsername>
<defaultGroupname>${rpm.install.group}</defaultGroupname>
<defaultDirmode>775</defaultDirmode>
<defaultFilemode>644</defaultFilemode>
<mappings>
<mapping>
<directory>${rpm.install.dir}/conf</directory>
<sources>
<source>
<location>${rpm-sources.directory}/conf</location>
</source>
</sources>
</mapping>
<mapping>
<!-- Jar needs to be executable for spring boot/init.d -->
<filemode>775</filemode>
<directory>${rpm.install.dir}/service</directory>
<sources>
<source>
<location>${rpm-sources.directory}/service</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/var/log/waggle-dance</directory>
</mapping>
<mapping>
<directory>/etc/init.d</directory>
<sources>
<softlinkSource>
<destination>waggle-dance</destination>
<location>${rpm.install.dir}/service/waggle-dance-core-latest-exec.jar</location>
</softlinkSource>
</sources>
</mapping>
<mapping>
<directory>/etc/logrotate.d</directory>
<sources>
<softlinkSource>
<destination>waggle-dance</destination>
<location>${rpm.install.dir}/conf/waggle-dance.logrotate</location>
</softlinkSource>
</sources>
</mapping>
</mappings>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sonatype-oss-release-github-actions</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>${rpm.maven.plugin.version}</version>
<executions>
<execution>
<id>attach-rpm</id>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>