-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
206 lines (192 loc) · 6.69 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
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
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.hawt.examples</groupId>
<artifactId>hawtio-sample-war-plugin</artifactId>
<version>4.0.0</version>
<name>Hawtio Sample WAR Plugin</name>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Versions -->
<hawtio-version>4.0.0</hawtio-version>
<servlet-api-version>5.0.0</servlet-api-version>
<slf4j-version>2.0.12</slf4j-version>
<logback-version>1.5.6</logback-version>
<node-version>v20.12.2</node-version>
<yarn-version>v1.22.22</yarn-version>
<frontend-maven-plugin-version>1.15.0</frontend-maven-plugin-version>
<jetty-version>11.0.20</jetty-version>
<!-- Path to the Hawtio TypeScript plugin -->
<plugin.path>sample-plugin</plugin.path>
</properties>
<dependencies>
<!--
We only need to embed this dependency in the WAR. This contains
a nice helper class that our plugin can use to export its plugin
MBean.
-->
<dependency>
<groupId>io.hawt</groupId>
<artifactId>hawtio-plugin-mbean</artifactId>
<version>${hawtio-version}</version>
</dependency>
<!-- Servlet API is provided by the container -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${servlet-api-version}</version>
<scope>provided</scope>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-version}</version>
</dependency>
</dependencies>
<build>
<finalName>sample-plugin</finalName>
<plugins>
<!-- Build the plugin TypeScript subproject from Maven -->
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin-version}</version>
<configuration>
<workingDirectory>${plugin.path}</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>${node-version}</nodeVersion>
<yarnVersion>${yarn-version}</yarnVersion>
</configuration>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>yarn build</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<webResources>
<!-- Add the plugin build to web resources -->
<resource>
<directory>${plugin.path}/build</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>copy</id>
<phase>test-compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>io.hawt</groupId>
<artifactId>hawtio-war-minimal</artifactId>
<version>${hawtio-version}</version>
<type>war</type>
<outputDirectory>${project.build.directory}/deploy</outputDirectory>
<destFileName>hawtio.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-version}</version>
<configuration>
<deployMode>EMBED</deployMode>
<scan>10</scan>
<webApp>
<contextPath>/${project.build.finalName}</contextPath>
<resourceBases>
<resourceBase>src/main/webapp</resourceBase>
<resourceBases>${plugin.path}/build</resourceBases>
</resourceBases>
</webApp>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.maven.plugin.MavenWebAppContext">
<war>${project.build.directory}/deploy/hawtio.war</war>
<contextPath>/hawtio</contextPath>
</contextHandler>
</contextHandlers>
<modules>
<module>jmx</module>
</modules>
<systemProperties>
<hawtio.authenticationEnabled>false</hawtio.authenticationEnabled>
<hawtio.disableProxy>true</hawtio.disableProxy>
</systemProperties>
</configuration>
</plugin>
<!-- Clean up the plugin's 'build/' and 'node_modules/' directories as well -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/${plugin.path}/build</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${basedir}/${plugin.path}/node_modules</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>