You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements. See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership. The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License. You may obtain a copy of the License at
  10. ~
  11. ~ http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing,
  14. ~ software distributed under the License is distributed on an
  15. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. ~ KIND, either express or implied. See the License for the
  17. ~ specific language governing permissions and limitations
  18. ~ under the License.
  19. -->
  20. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  22. <modelVersion>4.0.0</modelVersion>
  23. <parent>
  24. <groupId>org.apache.archiva</groupId>
  25. <artifactId>archiva-web</artifactId>
  26. <version>2.2.9-SNAPSHOT</version>
  27. </parent>
  28. <artifactId>archiva-webapp-test</artifactId>
  29. <packaging>pom</packaging>
  30. <name>Archiva Web :: Javascript Application Tests</name>
  31. <properties>
  32. <webappDirectory>${project.build.directory}/tomcat7x/webapps/archiva</webappDirectory>
  33. <container.test.port>0</container.test.port>
  34. <tomcat.propertiesPortFilePath>${project.build.directory}/tomcat-port.properties</tomcat.propertiesPortFilePath>
  35. <maxWaitTimeInMs>10000</maxWaitTimeInMs>
  36. <seleniumPluginVersion>2.3</seleniumPluginVersion>
  37. <selenium-server.version>2.53.1</selenium-server.version>
  38. <fluentlenium.version>0.13.2</fluentlenium.version>
  39. <browserPath></browserPath>
  40. </properties>
  41. <dependencies>
  42. <dependency>
  43. <groupId>commons-io</groupId>
  44. <artifactId>commons-io</artifactId>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.apache.archiva</groupId>
  48. <artifactId>archiva-webapp</artifactId>
  49. <type>war</type>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.codehaus.plexus</groupId>
  53. <artifactId>plexus-utils</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.codehaus.plexus</groupId>
  57. <artifactId>plexus-slf4j-logging</artifactId>
  58. <exclusions>
  59. <exclusion>
  60. <artifactId>plexus-component-api</artifactId>
  61. <groupId>org.codehaus.plexus</groupId>
  62. </exclusion>
  63. </exclusions>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.seleniumhq.selenium</groupId>
  67. <artifactId>selenium-java</artifactId>
  68. <version>${selenium-server.version}</version>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.seleniumhq.selenium.client-drivers</groupId>
  72. <artifactId>selenium-java-client-driver</artifactId>
  73. <scope>test</scope>
  74. <exclusions>
  75. <exclusion>
  76. <groupId>commons-logging</groupId>
  77. <artifactId>commons-logging</artifactId>
  78. </exclusion>
  79. </exclusions>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.seleniumhq.selenium</groupId>
  83. <artifactId>selenium-remote-driver</artifactId>
  84. <version>${selenium-server.version}</version>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.apache.commons</groupId>
  88. <artifactId>commons-exec</artifactId>
  89. <version>1.3</version>
  90. </dependency>
  91. <dependency>
  92. <groupId>org.seleniumhq.selenium</groupId>
  93. <artifactId>htmlunit-driver</artifactId>
  94. <version>2.24</version>
  95. </dependency>
  96. <dependency>
  97. <groupId>org.fluentlenium</groupId>
  98. <artifactId>fluentlenium-festassert</artifactId>
  99. <version>${fluentlenium.version}</version>
  100. <scope>test</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.fluentlenium</groupId>
  104. <artifactId>fluentlenium-core</artifactId>
  105. <version>${fluentlenium.version}</version>
  106. <scope>test</scope>
  107. </dependency>
  108. <!-- Dependency for MavenConnectionTest -->
  109. <dependency>
  110. <groupId>jdom</groupId>
  111. <artifactId>jdom</artifactId>
  112. </dependency>
  113. <dependency>
  114. <groupId>jaxen</groupId>
  115. <artifactId>jaxen</artifactId>
  116. </dependency>
  117. <!-- Dependencies below are provided by the appserver -->
  118. <dependency>
  119. <groupId>org.apache.derby</groupId>
  120. <artifactId>derby</artifactId>
  121. </dependency>
  122. <dependency>
  123. <groupId>javax.mail</groupId>
  124. <artifactId>mail</artifactId>
  125. </dependency>
  126. <dependency>
  127. <groupId>javax.activation</groupId>
  128. <artifactId>activation</artifactId>
  129. </dependency>
  130. <dependency>
  131. <groupId>commons-lang</groupId>
  132. <artifactId>commons-lang</artifactId>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.assertj</groupId>
  136. <artifactId>assertj-core</artifactId>
  137. <scope>test</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.apache.logging.log4j</groupId>
  141. <artifactId>log4j-jcl</artifactId>
  142. </dependency>
  143. <dependency>
  144. <groupId>org.apache.logging.log4j</groupId>
  145. <artifactId>log4j-slf4j-impl</artifactId>
  146. </dependency>
  147. <dependency>
  148. <groupId>org.apache.logging.log4j</groupId>
  149. <artifactId>log4j-1.2-api</artifactId>
  150. </dependency>
  151. </dependencies>
  152. <build>
  153. <testResources>
  154. <testResource>
  155. <directory>src/test/resources</directory>
  156. <filtering>true</filtering>
  157. <includes>
  158. <include>**/*</include>
  159. </includes>
  160. </testResource>
  161. </testResources>
  162. <pluginManagement>
  163. <plugins>
  164. <plugin>
  165. <groupId>org.codehaus.mojo</groupId>
  166. <artifactId>selenium-maven-plugin</artifactId>
  167. <dependencies>
  168. <dependency>
  169. <groupId>org.seleniumhq.selenium</groupId>
  170. <artifactId>selenium-server</artifactId>
  171. <version>${selenium-server.version}</version>
  172. </dependency>
  173. <dependency>
  174. <groupId>org.seleniumhq.selenium</groupId>
  175. <artifactId>selenium-remote-driver</artifactId>
  176. <version>${selenium-server.version}</version>
  177. </dependency>
  178. <dependency>
  179. <groupId>org.seleniumhq.selenium</groupId>
  180. <artifactId>selenium-api</artifactId>
  181. <version>${selenium-server.version}</version>
  182. </dependency>
  183. <dependency>
  184. <groupId>org.apache.commons</groupId>
  185. <artifactId>commons-exec</artifactId>
  186. <version>1.3</version>
  187. </dependency>
  188. <dependency>
  189. <groupId>org.seleniumhq.selenium</groupId>
  190. <artifactId>htmlunit-driver</artifactId>
  191. <version>2.24</version>
  192. </dependency>
  193. <dependency>
  194. <groupId>com.google.guava</groupId>
  195. <artifactId>guava</artifactId>
  196. <version>16.0.1</version>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.seleniumhq.selenium</groupId>
  200. <artifactId>selenium-chrome-driver</artifactId>
  201. <version>${selenium-server.version}</version>
  202. </dependency>
  203. <dependency>
  204. <groupId>org.seleniumhq.selenium</groupId>
  205. <artifactId>selenium-support</artifactId>
  206. <version>${selenium-server.version}</version>
  207. </dependency>
  208. </dependencies>
  209. </plugin>
  210. <plugin>
  211. <groupId>org.apache.rat</groupId>
  212. <artifactId>apache-rat-plugin</artifactId>
  213. <configuration>
  214. <excludes>
  215. <exclude>src/test/resources/appserver-base/**</exclude>
  216. <exclude>src/test/resources/repository/**</exclude>
  217. <exclude>src/test/resources/local-repo/**</exclude>
  218. <exclude>src/test/resources/projects/**</exclude>
  219. <exclude>src/test/resources/snapshots/**</exclude>
  220. <exclude>src/test/tomcat*/conf/catalina.policy</exclude>
  221. </excludes>
  222. </configuration>
  223. </plugin>
  224. </plugins>
  225. </pluginManagement>
  226. <plugins>
  227. <plugin>
  228. <artifactId>maven-resources-plugin</artifactId>
  229. <executions>
  230. <execution>
  231. <goals>
  232. <goal>testResources</goal>
  233. </goals>
  234. </execution>
  235. </executions>
  236. </plugin>
  237. <plugin>
  238. <groupId>org.apache.maven.plugins</groupId>
  239. <artifactId>maven-compiler-plugin</artifactId>
  240. <executions>
  241. <execution>
  242. <goals>
  243. <goal>testCompile</goal>
  244. </goals>
  245. </execution>
  246. </executions>
  247. </plugin>
  248. <plugin>
  249. <groupId>org.apache.maven.plugins</groupId>
  250. <artifactId>maven-surefire-plugin</artifactId>
  251. <configuration>
  252. <redirectTestOutputToFile>false</redirectTestOutputToFile>
  253. <runOrder>alphabetical</runOrder>
  254. </configuration>
  255. <executions>
  256. <execution>
  257. <id>integration-tests</id>
  258. <phase>integration-test</phase>
  259. <goals>
  260. <goal>test</goal>
  261. </goals>
  262. <configuration>
  263. <systemPropertyVariables>
  264. <browser>${selenium.browser}</browser>
  265. <selenium.browser>${selenium.browser}</selenium.browser>
  266. <baseUrl>${baseUrl}</baseUrl>
  267. <maxWaitTimeInMs>${maxWaitTimeInMs}</maxWaitTimeInMs>
  268. <seleniumHost>${seleniumHost}</seleniumHost>
  269. <seleniumPort>${seleniumPort}</seleniumPort>
  270. <tomcat.propertiesPortFilePath>${tomcat.propertiesPortFilePath}</tomcat.propertiesPortFilePath>
  271. </systemPropertyVariables>
  272. </configuration>
  273. </execution>
  274. </executions>
  275. </plugin>
  276. </plugins>
  277. </build>
  278. <profiles>
  279. <profile>
  280. <id>create-container</id>
  281. <activation>
  282. <property>
  283. <name>!container</name>
  284. </property>
  285. </activation>
  286. <build>
  287. <plugins>
  288. <plugin>
  289. <groupId>org.apache.maven.plugins</groupId>
  290. <artifactId>maven-dependency-plugin</artifactId>
  291. <executions>
  292. <execution>
  293. <id>unzip-archiva-webapp</id>
  294. <phase>compile</phase>
  295. <goals>
  296. <goal>unpack</goal>
  297. </goals>
  298. <configuration>
  299. <artifactItems>
  300. <artifactItem>
  301. <groupId>${project.groupId}</groupId>
  302. <artifactId>archiva-webapp</artifactId>
  303. <version>${project.version}</version>
  304. <type>war</type>
  305. </artifactItem>
  306. </artifactItems>
  307. <outputDirectory>${webappDirectory}</outputDirectory>
  308. <overWriteSnapshots>true</overWriteSnapshots>
  309. </configuration>
  310. </execution>
  311. </executions>
  312. </plugin>
  313. <plugin>
  314. <groupId>org.apache.maven.plugins</groupId>
  315. <artifactId>maven-antrun-plugin</artifactId>
  316. <executions>
  317. <execution>
  318. <phase>process-classes</phase>
  319. <goals>
  320. <goal>run</goal>
  321. </goals>
  322. <configuration>
  323. <tasks>
  324. <copy overwrite="true" todir="${webappDirectory}/WEB-INF/classes">
  325. <fileset dir="src/test/resources/logging"/>
  326. </copy>
  327. <copy todir="${project.build.directory}/appserver-base">
  328. <fileset dir="src/test/resources/appserver-base"/>
  329. </copy>
  330. <copy todir="${project.build.directory}/repository">
  331. <fileset dir="src/test/resources/repository"/>
  332. </copy>
  333. <copy todir="${project.build.directory}/index">
  334. <fileset dir="src/test/resources/index"/>
  335. </copy>
  336. <copy todir="${project.build.directory}/snapshots">
  337. <fileset dir="src/test/resources/snapshots"/>
  338. </copy>
  339. <copy todir="${project.build.directory}/projects">
  340. <fileset dir="src/test/resources/projects"/>
  341. </copy>
  342. <copy todir="${project.build.directory}/local-repo">
  343. <fileset dir="src/test/resources/local-repo"/>
  344. </copy>
  345. <copy todir="${project.build.directory}/errorshtmlsnap/css">
  346. <fileset dir="${webappDirectory}/css"/>
  347. </copy>
  348. <copy todir="${project.build.directory}/errorshtmlsnap/js">
  349. <fileset dir="${webappDirectory}/js"/>
  350. </copy>
  351. <copy todir="${project.build.directory}/errorshtmlsnap/img">
  352. <fileset dir="${webappDirectory}/img"/>
  353. </copy>
  354. <copy todir="${project.build.directory}/errorshtmlsnap/images">
  355. <fileset dir="${webappDirectory}/images"/>
  356. </copy>
  357. </tasks>
  358. </configuration>
  359. </execution>
  360. </executions>
  361. </plugin>
  362. <plugin>
  363. <groupId>org.apache.tomcat.maven</groupId>
  364. <artifactId>tomcat7-maven-plugin</artifactId>
  365. <dependencies>
  366. <dependency>
  367. <groupId>org.apache.derby</groupId>
  368. <artifactId>derby</artifactId>
  369. <version>${derbyVersion}</version>
  370. </dependency>
  371. <dependency>
  372. <groupId>javax.mail</groupId>
  373. <artifactId>mail</artifactId>
  374. <version>${javaxMailVersion}</version>
  375. </dependency>
  376. </dependencies>
  377. <executions>
  378. <execution>
  379. <id>tomcat-run</id>
  380. <goals>
  381. <goal>run-war-only</goal>
  382. </goals>
  383. <phase>pre-integration-test</phase>
  384. <configuration>
  385. <path>/archiva</path>
  386. <port>${container.test.port}</port>
  387. <uriEncoding>UTF-8</uriEncoding>
  388. <warDirectory>${webappDirectory}</warDirectory>
  389. <fork>true</fork>
  390. <ignorePackaging>true</ignorePackaging>
  391. <systemProperties>
  392. <appserver.base>${project.build.directory}/appserver-base</appserver.base>
  393. <appserver.home>${project.build.directory}/appserver-base</appserver.home>
  394. <derby.system.home>${project.build.directory}</derby.system.home>
  395. <archiva.devMode>true</archiva.devMode>
  396. </systemProperties>
  397. <contextFile>${project.build.testOutputDirectory}/archiva.xml</contextFile>
  398. <propertiesPortFilePath>${tomcat.propertiesPortFilePath}</propertiesPortFilePath>
  399. <useNaming>true</useNaming>
  400. </configuration>
  401. </execution>
  402. <execution>
  403. <id>tomcat-shutdown</id>
  404. <goals>
  405. <goal>shutdown</goal>
  406. </goals>
  407. <phase>post-integration-test</phase>
  408. </execution>
  409. </executions>
  410. </plugin>
  411. </plugins>
  412. </build>
  413. </profile>
  414. <profile>
  415. <id>existing-container</id>
  416. <activation>
  417. <property>
  418. <name>!baseUrl</name>
  419. </property>
  420. </activation>
  421. <properties>
  422. <baseUrl>http://localhost:${container.test.port}/archiva/index.html?request_lang=en</baseUrl>
  423. </properties>
  424. </profile>
  425. <profile>
  426. <id>start-selenium</id>
  427. <activation>
  428. <property>
  429. <name>!seleniumHost</name>
  430. </property>
  431. </activation>
  432. <properties>
  433. <seleniumHost>localhost</seleniumHost>
  434. <seleniumPort>4444</seleniumPort>
  435. </properties>
  436. <build>
  437. <plugins>
  438. <plugin>
  439. <groupId>org.codehaus.mojo</groupId>
  440. <artifactId>selenium-maven-plugin</artifactId>
  441. <executions>
  442. <execution>
  443. <phase>pre-integration-test</phase>
  444. <goals>
  445. <goal>start-server</goal>
  446. </goals>
  447. <configuration>
  448. <background>true</background>
  449. <port>${seleniumPort}</port>
  450. <logOutput>true</logOutput>
  451. </configuration>
  452. </execution>
  453. </executions>
  454. </plugin>
  455. </plugins>
  456. </build>
  457. </profile>
  458. <profile>
  459. <id>firefox</id>
  460. <activation>
  461. <property>
  462. <name>!browser</name>
  463. </property>
  464. </activation>
  465. <properties>
  466. <selenium.browser>*firefox</selenium.browser>
  467. <excluded.groups/>
  468. </properties>
  469. </profile>
  470. <profile>
  471. <id>chrome</id>
  472. <activation>
  473. <property>
  474. <name>browser</name>
  475. <value>chrome</value>
  476. </property>
  477. </activation>
  478. <properties>
  479. <selenium.browser>*googlechrome</selenium.browser>
  480. <excluded.groups>requiresUpload</excluded.groups>
  481. </properties>
  482. </profile>
  483. <profile>
  484. <id>iexplore</id>
  485. <activation>
  486. <property>
  487. <name>browser</name>
  488. <value>iexplore</value>
  489. </property>
  490. </activation>
  491. <properties>
  492. <selenium.browser>*iexplore</selenium.browser>
  493. <excluded.groups>requiresUpload</excluded.groups>
  494. </properties>
  495. </profile>
  496. <profile>
  497. <id>safari</id>
  498. <activation>
  499. <property>
  500. <name>browser</name>
  501. <value>safari</value>
  502. </property>
  503. </activation>
  504. <properties>
  505. <selenium.browser>*safari</selenium.browser>
  506. <excluded.groups>requiresUpload</excluded.groups>
  507. </properties>
  508. </profile>
  509. <profile>
  510. <id>otherbrowser</id>
  511. <activation>
  512. <property>
  513. <name>browser</name>
  514. <value>other</value>
  515. </property>
  516. </activation>
  517. <properties>
  518. <selenium.browser>*custom ${browserPath}</selenium.browser>
  519. <excluded.groups>requiresUpload</excluded.groups>
  520. </properties>
  521. </profile>
  522. <profile>
  523. <id>headless</id>
  524. <build>
  525. <plugins>
  526. <plugin>
  527. <groupId>org.codehaus.mojo</groupId>
  528. <artifactId>selenium-maven-plugin</artifactId>
  529. <executions>
  530. <execution>
  531. <id>xvfb</id>
  532. <phase>validate</phase>
  533. <goals>
  534. <goal>xvfb</goal>
  535. </goals>
  536. </execution>
  537. </executions>
  538. </plugin>
  539. </plugins>
  540. </build>
  541. </profile>
  542. <profile>
  543. <id>ci-server</id>
  544. <build>
  545. <plugins>
  546. <plugin>
  547. <groupId>org.apache.maven.plugins</groupId>
  548. <artifactId>maven-antrun-plugin</artifactId>
  549. <executions>
  550. <execution>
  551. <id>cleanup-files</id>
  552. <phase>initialize</phase>
  553. <goals>
  554. <goal>run</goal>
  555. </goals>
  556. <configuration>
  557. <tasks>
  558. <delete file="${user.home}/.m2/archiva.xml" quiet="true" />
  559. </tasks>
  560. </configuration>
  561. </execution>
  562. </executions>
  563. </plugin>
  564. </plugins>
  565. </build>
  566. </profile>
  567. </profiles>
  568. </project>