-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpom.xml
182 lines (172 loc) · 6.88 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
<?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>
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.127</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness-htmlunit</artifactId>
<version>${changelist}</version>
<name>HtmlUnit dependency for Jenkins Test Harness</name>
<description>Encapsulates HtmlUnit dependency, shading conflicting dependencies.</description>
<url>https://github.com/jenkinsci/${project.artifactId}</url>
<licenses>
<!-- Uses HtmlUnit license. -->
<license>
<name>Apache 2</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
<tag>${scmTag}</tag>
<url>https://github.com/${gitHubRepo}</url>
</scm>
<properties>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}</gitHubRepo>
<spotless.check.skip>false</spotless.check.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>4.8.0</version>
<exclusions>
<!-- Provided by Jenkins core -->
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<!--
This list should contain all packages in the transitive closure of this module except for those provided
by Jenkins core or test harness (and therefore excluded above) as well as HtmlUnit itself.
-->
<relocations>
<relocation>
<pattern>mozilla</pattern>
<shadedPattern>hidden.jth.mozilla</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>hidden.jth.org.apache.http</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.lang3</pattern>
<shadedPattern>hidden.jth.org.apache.commons.lang3</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.net</pattern>
<shadedPattern>hidden.jth.org.apache.commons.net</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.text</pattern>
<shadedPattern>hidden.jth.org.apache.commons.text</shadedPattern>
</relocation>
<relocation>
<pattern>org.brotli</pattern>
<shadedPattern>hidden.jth.org.brotli</shadedPattern>
</relocation>
</relocations>
<createSourcesJar>true</createSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>flatten</id>
<goals>
<goal>flatten</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>display-info</id>
<configuration>
<rules>
<!--
HtmlUnit attempts to detect the Java API for XML Processing (JAXP) implementation in use and do some
optimizations if it is Xerces. In production, Jenkins core (and any plugins that do not bundle a JAXP
implementation) will be using the built-in version of Xerces under the
"com.sun.org.apache.xerces.internal" package namespace, and HtmlUnit's attempts to load that class
will fail on Java 17 because the module is not open to HtmlUnit. While we could solve the problem by
bundling Xerces as a library under the "org.apache.xerces" package namespace, this would make the test
environment less like the production environment. Therefore, we opt to keep the test environment as
close to the production environment as possible by using the built-in version of Xerces rather than a
bundled version, even though this means that HtmlUnit won't be able to do its Xerces-specific
optimizations when running on Java 17.
-->
<bannedDependencies>
<excludes combine.children="append">
<exclude>xalan</exclude>
<exclude>xerces</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>