This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
200 lines (188 loc) · 6.22 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
<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>org.jenkins-ci.plugins</groupId>
<artifactId>priority-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>1.464-SNAPSHOT</jenkins.version>
<!-- <jenkins.version>1.409</jenkins.version> -->
</properties>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-war</artifactId>
<type>war</type>
<version>${jenkins.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>${jenkins.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>${jenkins.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<!--
Since new versions need to overwrite old versions, it's better
not to have version number in the .hpi file name.
-->
<finalName>${project.artifactId}</finalName>
<!--
I don't really understand how this works, but it makes Maven recognizes
<packaging>hpi</packaging> defined in maven-hpi-plugin.
<extensions>true</extensions> is apparently needed to have Maven read
the plugin's Plexus component file.
-->
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<version>1.67</version>
<extensions>true</extensions>
<configuration>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in parent pom -->
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<!-- version specified in parent pom -->
<configuration>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<!-- version specified in parent pom -->
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<fileMask>Messages.properties</fileMask>
<outputDirectory>target/generated-sources/localizer</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- version specified in parent pom -->
</plugin>
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5</version>
<executions>
<execution>
<id>test-in-groovy</id>
<!-- allow tests written in Groovy -->
<goals>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<property>
<name>hudson.udp</name>
<value>33849</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>compile</phase>
<configuration>
<!--requireCompleteLicenseInfo>true</requireCompleteLicenseInfo -->
<generateLicenseXml>target/${project.artifactId}/WEB-INF/licenses.xml</generateLicenseXml>
<inlineScript><![CDATA[
filter {
def plugins = [] as Set
// collect all Jenkins plugins
models.entrySet().each { e ->
if (e.value.packaging=="hpi")
plugins.add(e.key.id)
}
// filter out dependencies that don't belong to this plugin
models.entrySet().removeAll(models.entrySet().findAll { e ->
def a = e.key;
if (a.dependencyTrail.size()>0 && plugins.contains(a.dependencyTrail[1]))
return true; // ignore transitive dependencies through other plugins
// if the dependency goes through jenkins core, we don't need to bundle it in the war
// because jenkins-core comes in the <provided> scope, I think this is a bug in Maven that it puts such
// dependencies into the artifact list.
if (a.dependencyTrail.find { trail -> trail.contains(":hudson-core:") || trail.contains(":jenkins-core:") })
return true;
return false;
})
}
]]></inlineScript>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- get every artifact through maven.glassfish.org, which proxies all the artifacts that we need -->
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>