1
2<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">
3
4  <!-- Refer to the file ./build-with-maven for instruction on how to use this pom.xml -->
5
6  <modelVersion>4.0.0</modelVersion>
7  <groupId>org.testng</groupId>
8  <artifactId>testng</artifactId>
9  <packaging>jar</packaging>
10  <name>TestNG</name>
11  <version>6.9.10-SNAPSHOT</version>
12  <description>TestNG is a testing framework.</description>
13  <url>http://testng.org</url>
14
15  <licenses>
16    <license>
17      <name>Apache License, Version 2.0</name>
18      <url>http://apache.org/licenses/LICENSE-2.0</url>
19      <distribution>repo</distribution>
20    </license>
21  </licenses>
22
23  <scm>
24    <connection>scm:git:git@github.com:cbeust/testng.git</connection>
25    <developerConnection>scm:git:git@github.com:cbeust/testng.git</developerConnection>
26    <url>git@github.com:cbeust/testng.git</url>
27  </scm>
28
29  <developers>
30    <developer>
31      <name>Cedric Beust</name>
32    </developer>
33  </developers>
34
35  <parent>
36    <groupId>org.sonatype.oss</groupId>
37    <artifactId>oss-parent</artifactId>
38    <version>3</version>
39  </parent>
40
41  <distributionManagement>
42    <repository>
43      <id>bintray</id>
44      <url>https://api.bintray.com/maven/cbeust/maven/testng</url>
45    </repository>
46  </distributionManagement>
47
48  <dependencies>
49    <dependency>
50      <groupId>org.apache.ant</groupId>
51      <artifactId>ant</artifactId>
52      <version>1.7.0</version>
53      <optional>true</optional>
54    </dependency>
55
56    <dependency>
57      <groupId>junit</groupId>
58      <artifactId>junit</artifactId>
59      <version>4.10</version>
60      <optional>true</optional>
61    </dependency>
62
63    <dependency>
64      <groupId>org.beanshell</groupId>
65      <artifactId>bsh</artifactId>
66      <version>2.0b4</version>
67<!--
68      <scope>provided</scope>
69-->
70    </dependency>
71
72    <dependency>
73      <groupId>com.google.inject</groupId>
74      <artifactId>guice</artifactId>
75      <version>4.0</version>
76      <classifier>no_aop</classifier>
77      <scope>provided</scope>
78    </dependency>
79
80    <dependency>
81      <groupId>com.beust</groupId>
82      <artifactId>jcommander</artifactId>
83      <version>1.48</version>
84    </dependency>
85
86	  <dependency>
87	    <groupId>org.yaml</groupId>
88	    <artifactId>snakeyaml</artifactId>
89	    <version>1.15</version>
90      <optional>true</optional>
91	  </dependency>
92
93    <dependency>
94      <groupId>org.assertj</groupId>
95      <artifactId>assertj-core</artifactId>
96      <version>2.0.0</version>
97      <scope>test</scope>
98    </dependency>
99  </dependencies>
100
101  <properties>
102  	<version.build.directory>${project.build.directory}/generated-sources/version</version.build.directory>
103  </properties>
104
105  <build>
106    <resources>
107      <resource>
108        <directory>src/main/resources</directory>
109        <includes>
110          <include>**/VersionTemplateJava</include>
111        </includes>
112        <filtering>true</filtering>
113        <targetPath>${version.build.directory}</targetPath>
114      </resource>
115      <resource>
116        <directory>src/main/resources</directory>
117      </resource>
118    </resources>
119    <plugins>
120
121      <!-- Rename Version.java -->
122      <plugin>
123        <groupId>com.coderplus.maven.plugins</groupId>
124        <artifactId>copy-rename-maven-plugin</artifactId>
125        <version>1.0.1</version>
126        <executions>
127          <execution>
128		    <id>rename-file</id>
129			<phase>process-resources</phase>
130			<goals>
131			  <goal>rename</goal>
132			</goals>
133			<configuration>
134			  <sourceFile>${version.build.directory}/org/testng/internal/VersionTemplateJava</sourceFile>
135			  <destinationFile>${version.build.directory}/org/testng/internal/Version.java</destinationFile>
136			</configuration>
137		  </execution>
138        </executions>
139      </plugin>
140
141      <!-- Release for bintray -->
142      <plugin>
143        <artifactId>maven-release-plugin</artifactId>
144        <configuration>
145          <useReleaseProfile>false</useReleaseProfile>
146          <releaseProfiles>release</releaseProfiles>
147          <autoVersionSubmodules>true</autoVersionSubmodules>
148        </configuration>
149      </plugin>
150
151      <!-- Generating Javadoc -->
152      <plugin>
153        <groupId>org.apache.maven.plugins</groupId>
154        <artifactId>maven-javadoc-plugin</artifactId>
155        <version>2.10.3</version>
156        <configuration>
157          <failOnError>false</failOnError>
158          <excludePackageNames>*internal</excludePackageNames>
159         </configuration>
160        <executions>
161          <execution>
162            <id>attach-javadocs</id>
163              <goals>
164                <goal>jar</goal>
165              </goals>
166            </execution>
167        </executions>
168      </plugin>
169
170      <!-- Bundle sources -->
171
172      <plugin>
173        <groupId>org.apache.maven.plugins</groupId>
174        <artifactId>maven-source-plugin</artifactId>
175        <version>2.1.1</version>
176        <executions>
177          <execution>
178            <id>attach-sources</id>
179              <goals>
180                <goal>jar</goal>
181              </goals>
182            </execution>
183        </executions>
184      </plugin>
185
186      <!-- Compilation -->
187      <plugin>
188        <groupId>org.apache.maven.plugins</groupId>
189        <artifactId>maven-compiler-plugin</artifactId>
190        <version>3.1</version>
191        <configuration>
192          <source>1.7</source>
193          <target>1.7</target>
194        </configuration>
195      </plugin>
196
197      <!-- Resource handling -->
198      <plugin>
199        <groupId>org.apache.maven.plugins</groupId>
200        <artifactId>maven-resources-plugin</artifactId>
201        <version>2.4.1</version>
202        <configuration>
203          <encoding>UTF-8</encoding>
204        </configuration>
205        <executions>
206          <execution>
207            <phase>process-sources</phase>
208          </execution>
209        </executions>
210      </plugin>
211      <plugin>
212        <groupId>org.codehaus.mojo</groupId>
213        <artifactId>build-helper-maven-plugin</artifactId>
214        <version>1.9.1</version>
215        <executions>
216          <execution>
217            <phase>generate-sources</phase>
218            <goals>
219              <goal>add-source</goal>
220            </goals>
221            <configuration>
222              <sources>
223                <source>${version.build.directory}</source>
224              </sources>
225            </configuration>
226          </execution>
227        </executions>
228      </plugin>
229
230      <!-- OSGi manifest creation -->
231      <plugin>
232        <groupId>org.apache.felix</groupId>
233        <artifactId>maven-bundle-plugin</artifactId>
234        <version>2.1.0</version>
235        <executions>
236          <execution>
237            <id>bundle-manifest</id>
238            <phase>process-classes</phase>
239            <goals>
240              <goal>manifest</goal>
241            </goals>
242            <configuration>
243              <instructions>
244                <_versionpolicy>$(@)</_versionpolicy>
245                <Import-Package>
246                  bsh.*;version="[2.0.0,3.0.0)";resolution:=optional,
247                  com.beust.jcommander.*;version="[1.7.0,3.0.0)";resolution:=optional,
248                  com.google.inject.*;version="[1.2,1.3)";resolution:=optional,
249                  junit.framework;version="[3.8.1, 5.0.0)";resolution:=optional,
250                  org.junit.*;resolution:=optional,
251                  org.apache.tools.ant.*;version="[1.7.0, 2.0.0)";resolution:=optional,
252                  org.yaml.*;version="[1.6,2.0)";resolution:=optional,
253                  !com.beust.testng,
254                  !org.testng.*,
255                  !com.sun.*,
256                  *
257                </Import-Package>
258              </instructions>
259            </configuration>
260          </execution>
261        </executions>
262      </plugin>
263
264      <!-- Add OSGi manifest in JAR -->
265      <plugin>
266        <groupId>org.apache.maven.plugins</groupId>
267        <artifactId>maven-jar-plugin</artifactId>
268        <version>2.3.1</version>
269        <configuration>
270          <archive>
271            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
272          </archive>
273        </configuration>
274      </plugin>
275
276      <!-- Tests -->
277      <plugin>
278        <groupId>org.apache.maven.plugins</groupId>
279        <artifactId>maven-surefire-plugin</artifactId>
280        <version>2.19</version>
281        <configuration>
282          <suiteXmlFiles>
283            <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
284          </suiteXmlFiles>
285          <properties>
286            <property>
287              <name>listener</name>
288              <value>test.invokedmethodlistener.MyListener</value>
289            </property>
290          </properties>
291          <systemPropertyVariables>
292            <test.resources.dir>${project.build.testOutputDirectory}</test.resources.dir>
293          </systemPropertyVariables>
294        </configuration>
295      </plugin>
296
297      <!-- Signing with gpg -->
298      <plugin>
299        <groupId>org.apache.maven.plugins</groupId>
300        <artifactId>maven-gpg-plugin</artifactId>
301        <version>1.4</version>
302        <executions>
303          <execution>
304            <id>sign-artifacts</id>
305            <phase>verify</phase>
306            <goals>
307              <goal>sign</goal>
308            </goals>
309          </execution>
310        </executions>
311      </plugin>
312
313    </plugins>
314
315  </build>
316
317
318  <profiles>
319
320    <!-- bintray profile -->
321
322    <profile>
323      <id>bintray</id>
324      <build>
325        <plugins>
326          <plugin>
327            <artifactId>maven-source-plugin</artifactId>
328            <executions>
329              <execution>
330                <id>attach-sources</id>
331                <goals>
332                  <goal>jar</goal>
333                </goals>
334              </execution>
335            </executions>
336          </plugin>
337          <plugin>
338            <groupId>org.apache.maven.plugins</groupId>
339            <artifactId>maven-javadoc-plugin</artifactId>
340            <version>2.10.3</version>
341            <configuration>
342              <failOnError>false</failOnError>
343              <excludePackageNames>*internal</excludePackageNames>
344             </configuration>
345            <executions>
346              <execution>
347                <id>attach-javadocs</id>
348                  <goals>
349                    <goal>jar</goal>
350                  </goals>
351                </execution>
352            </executions>
353          </plugin>
354<!--
355          <plugin>
356            <artifactId>maven-javadoc-plugin</artifactId>
357            <executions>
358              <execution>
359                <id>attach-javadocs</id>
360                <goals>
361                  <goal>jar</goal>
362                </goals>
363              </execution>
364            </executions>
365          </plugin>
366 -->
367          </plugins>
368      </build>
369    </profile>
370
371    <profile>
372      <!-- When activated, download dependencies from the snapshot repo -->
373      <id>snapshot</id>
374
375      <repositories>
376        <repository>
377          <id>nexus-snapshot-repository</id>
378          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
379        </repository>
380      </repositories>
381
382      <dependencies>
383        <dependency>
384            <groupId>org.apache.ant</groupId>
385            <artifactId>ant</artifactId>
386            <version>1.7.0</version>
387            <optional>true</optional>
388        </dependency>
389        <dependency>
390            <groupId>junit</groupId>
391            <artifactId>junit</artifactId>
392            <version>4.11</version>
393            <optional>true</optional>
394        </dependency>
395        <dependency>
396            <groupId>org.beanshell</groupId>
397            <artifactId>bsh</artifactId>
398            <version>2.0b4</version>
399<!--
400            <scope>provided</scope>
401-->
402        </dependency>
403        <dependency>
404          <groupId>com.google.inject</groupId>
405           <artifactId>guice</artifactId>
406           <version>2.0</version>
407           <scope>provided</scope>
408        </dependency>
409        <dependency>
410          <groupId>com.beust</groupId>
411          <artifactId>jcommander</artifactId>
412          <version>1.48</version>
413        </dependency>
414      </dependencies>
415
416    </profile>
417  </profiles>
418
419</project>
420