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 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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.maven.archiva</groupId>
  25. <artifactId>archiva-web</artifactId>
  26. <version>1.0-alpha-1-SNAPSHOT</version>
  27. </parent>
  28. <artifactId>archiva-webapp-test</artifactId>
  29. <packaging>pom</packaging>
  30. <name>Archiva Web :: Application Tests</name>
  31. <dependencies>
  32. <dependency>
  33. <groupId>org.apache.maven.archiva</groupId>
  34. <artifactId>archiva-webapp</artifactId>
  35. <version>${project.version}</version>
  36. <type>war</type>
  37. </dependency>
  38. <dependency>
  39. <groupId>org.apache.maven.shared</groupId>
  40. <artifactId>maven-web-ui-tests</artifactId>
  41. <version>1.0-SNAPSHOT</version>
  42. <scope>test</scope>
  43. </dependency>
  44. <!-- Dependencies below are provided by the appserver -->
  45. <dependency>
  46. <groupId>org.apache.derby</groupId>
  47. <artifactId>derby</artifactId>
  48. <version>10.1.3.1</version>
  49. </dependency>
  50. <dependency>
  51. <groupId>javax.mail</groupId>
  52. <artifactId>mail</artifactId>
  53. <version>1.4</version>
  54. </dependency>
  55. <dependency>
  56. <groupId>javax.activation</groupId>
  57. <artifactId>activation</artifactId>
  58. <version>1.1</version>
  59. </dependency>
  60. </dependencies>
  61. <build>
  62. <testSourceDirectory>src/test/it</testSourceDirectory>
  63. <plugins>
  64. <plugin>
  65. <groupId>org.codehaus.mojo</groupId>
  66. <artifactId>dependency-maven-plugin</artifactId>
  67. <executions>
  68. <execution>
  69. <id>unzip-archiva-webapp</id>
  70. <phase>generate-resources</phase>
  71. <goals>
  72. <goal>unpack</goal>
  73. </goals>
  74. <configuration>
  75. <artifactItems>
  76. <artifactItem>
  77. <groupId>${project.groupId}</groupId>
  78. <artifactId>archiva-webapp</artifactId>
  79. <version>${project.version}</version>
  80. <type>war</type>
  81. </artifactItem>
  82. </artifactItems>
  83. <outputDirectory>${project.build.directory}/${container.name}conf/webapps/archiva</outputDirectory>
  84. </configuration>
  85. </execution>
  86. <execution>
  87. <id>prepare-provided-dependencies</id>
  88. <phase>generate-resources</phase>
  89. <goals>
  90. <goal>copy-dependencies</goal>
  91. </goals>
  92. <configuration>
  93. <overWriteReleases>false</overWriteReleases>
  94. <overWriteSnapshots>true</overWriteSnapshots>
  95. <excludeTransitive>false</excludeTransitive>
  96. <outputDirectory>${project.build.directory}/providedDependencies</outputDirectory>
  97. </configuration>
  98. </execution>
  99. </executions>
  100. </plugin>
  101. <plugin>
  102. <artifactId>maven-antrun-plugin</artifactId>
  103. <executions>
  104. <execution>
  105. <phase>generate-resources</phase>
  106. <goals>
  107. <goal>run</goal>
  108. </goals>
  109. <configuration>
  110. <tasks>
  111. <copy todir="${project.build.directory}/appserver-base">
  112. <fileset dir="src/test/resources/appserver-base" />
  113. </copy>
  114. <copy todir="${project.build.directory}/repository">
  115. <fileset dir="src/test/resources/repository" />
  116. </copy>
  117. <copy todir="${project.build.directory}/index">
  118. <fileset dir="src/test/resources/index" />
  119. </copy>
  120. </tasks>
  121. </configuration>
  122. </execution>
  123. <execution>
  124. <id>copy-container-conf</id>
  125. <phase>package</phase>
  126. <configuration>
  127. <tasks>
  128. <copy todir="${project.build.directory}/${container.name}conf">
  129. <fileset dir="src/test/${container.name}"/>
  130. </copy>
  131. <copy
  132. todir="${project.build.directory}/installs/${container.name}/apache-tomcat-5.5.20/apache-tomcat-5.5.20/common/lib">
  133. <fileset dir="${project.build.directory}/providedDependencies">
  134. <include name="**/*.jar"/>
  135. </fileset>
  136. </copy>
  137. </tasks>
  138. </configuration>
  139. <goals>
  140. <goal>run</goal>
  141. </goals>
  142. </execution>
  143. <execution>
  144. <id>check-archiva-loaded</id>
  145. <phase>integration-test</phase>
  146. <configuration>
  147. <tasks>
  148. <get src="http://localhost:9696/archiva/" dest="${project.build.directory}/index.html"/>
  149. <delete file="${project.build.directory}/index.html"/>
  150. </tasks>
  151. </configuration>
  152. <goals>
  153. <goal>run</goal>
  154. </goals>
  155. </execution>
  156. </executions>
  157. </plugin>
  158. <plugin>
  159. <groupId>org.apache.maven.plugins</groupId>
  160. <artifactId>maven-compiler-plugin</artifactId>
  161. <executions>
  162. <execution>
  163. <goals>
  164. <goal>testCompile</goal>
  165. </goals>
  166. </execution>
  167. </executions>
  168. </plugin>
  169. <plugin>
  170. <groupId>org.codehaus.mojo</groupId>
  171. <artifactId>selenium-maven-plugin</artifactId>
  172. <version>1.0-SNAPSHOT</version>
  173. <executions>
  174. <execution>
  175. <id>start-selenium</id>
  176. <phase>pre-integration-test</phase>
  177. <goals>
  178. <goal>start-server</goal>
  179. </goals>
  180. </execution>
  181. </executions>
  182. <configuration>
  183. <background>true</background>
  184. </configuration>
  185. </plugin>
  186. <plugin>
  187. <groupId>org.codehaus.cargo</groupId>
  188. <artifactId>cargo-maven2-plugin</artifactId>
  189. <executions>
  190. <execution>
  191. <id>start-container</id>
  192. <phase>pre-integration-test</phase>
  193. <goals>
  194. <goal>start</goal>
  195. </goals>
  196. </execution>
  197. <execution>
  198. <id>stop-container</id>
  199. <phase>post-integration-test</phase>
  200. <goals>
  201. <goal>stop</goal>
  202. </goals>
  203. </execution>
  204. </executions>
  205. <configuration>
  206. <wait>false</wait>
  207. <container>
  208. <containerId>${container.name}</containerId>
  209. <zipUrlInstaller>
  210. <url>${container.url}</url>
  211. <installDir>${project.build.directory}/installs/${container.name}</installDir>
  212. </zipUrlInstaller>
  213. <log>${project.build.directory}/logs/${container.name}.log</log>
  214. <output>${project.build.directory}/logs/${container.name}.out</output>
  215. <timeout>600000</timeout>
  216. <systemProperties>
  217. <appserver.base>${project.build.directory}/appserver-base</appserver.base>
  218. </systemProperties>
  219. </container>
  220. <configuration>
  221. <home>${project.build.directory}/${container.name}conf</home>
  222. <type>existing</type>
  223. <properties>
  224. <cargo.servlet.port>9696</cargo.servlet.port>
  225. </properties>
  226. </configuration>
  227. </configuration>
  228. </plugin>
  229. <plugin>
  230. <groupId>org.apache.maven.plugins</groupId>
  231. <artifactId>maven-surefire-plugin</artifactId>
  232. <executions>
  233. <execution>
  234. <phase>integration-test</phase>
  235. <goals>
  236. <goal>test</goal>
  237. </goals>
  238. </execution>
  239. </executions>
  240. <configuration>
  241. <systemProperties>
  242. <property>
  243. <name>browser</name>
  244. <value>${browser}</value>
  245. </property>
  246. </systemProperties>
  247. </configuration>
  248. </plugin>
  249. </plugins>
  250. </build>
  251. <profiles>
  252. <profile>
  253. <id>tomcat5x</id>
  254. <activation>
  255. <activeByDefault>true</activeByDefault>
  256. </activation>
  257. <properties>
  258. <container.name>tomcat5x</container.name>
  259. <container.url>http://apache.multidist.com/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.zip</container.url>
  260. </properties>
  261. </profile>
  262. <profile>
  263. <id>firefox</id>
  264. <activation>
  265. <activeByDefault>true</activeByDefault>
  266. </activation>
  267. <properties>
  268. <browser>*firefox</browser>
  269. </properties>
  270. </profile>
  271. <profile>
  272. <id>iexplore</id>
  273. <properties>
  274. <browser>*iexplore</browser>
  275. </properties>
  276. </profile>
  277. <profile>
  278. <id>otherbrowser</id>
  279. <properties>
  280. <browser>*custom ${browserPath}</browser>
  281. </properties>
  282. </profile>
  283. </profiles>
  284. </project>