Merge "Improve logging of persister and netconf client."
[controller.git] / opendaylight / distribution / sanitytest / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
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/xsd/maven-4.0.0.xsd">
3   <modelVersion>4.0.0</modelVersion>
4   <parent>
5     <groupId>org.opendaylight.controller</groupId>
6     <artifactId>commons.opendaylight</artifactId>
7     <version>1.4.1-SNAPSHOT</version>
8     <relativePath>../../commons/opendaylight</relativePath>
9   </parent>
10   <scm>
11     <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
12     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
13     <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
14     <tag>HEAD</tag>
15   </scm>
16
17   <artifactId>sanitytest</artifactId>
18   <version>0.4.1-SNAPSHOT</version>
19   <packaging>jar</packaging>
20
21   <properties>
22     <distro.dir>${project.basedir}/../opendaylight/target/distribution.opendaylight-osgipackage/opendaylight</distro.dir>
23     <distro.script>${distro.dir}/run.bat</distro.script>
24     <!-- the address is passed to both the controller & the test to establish the connection -->
25     <sanitytest.bind.address>127.0.0.1</sanitytest.bind.address>
26     <sanitytest.timeout>300</sanitytest.timeout>
27   </properties>
28
29   <profiles>
30     <profile>
31       <id>non-windows</id>
32       <activation>
33         <os>
34           <family>!windows</family>
35         </os>
36       </activation>
37       <properties>
38         <distro.script>${distro.dir}/run.sh</distro.script>
39         <distro.pid>/tmp/opendaylight.PID</distro.pid>
40       </properties>
41     </profile>
42   </profiles>
43
44   <dependencies>
45     <dependency>
46       <groupId>org.osgi</groupId>
47       <artifactId>org.osgi.core</artifactId>
48       <scope>provided</scope>
49     </dependency>
50
51     <dependency>
52       <groupId>junit</groupId>
53       <artifactId>junit</artifactId>
54       <scope>test</scope>
55     </dependency>
56
57     <dependency>
58       <groupId>org.ow2.chameleon.management</groupId>
59       <artifactId>chameleon-mbeans</artifactId>
60       <scope>test</scope>
61     </dependency>
62
63   </dependencies>
64
65   <build>
66     <plugins>
67       <plugin>
68         <!-- disable the install plugin -->
69         <groupId>org.apache.maven.plugins</groupId>
70         <artifactId>maven-install-plugin</artifactId>
71         <version>${install.plugin.version}</version>
72         <configuration>
73           <skip>true</skip>
74         </configuration>
75         <executions>
76           <execution>
77             <id>default-install</id>
78             <phase>none</phase>
79           </execution>
80         </executions>
81       </plugin>
82
83       <plugin>
84         <!--  ensure that the distro installation is already built -->
85         <groupId>org.apache.maven.plugins</groupId>
86         <artifactId>maven-enforcer-plugin</artifactId>
87         <version>${enforcer.plugin.version}</version>
88         <executions>
89           <execution>
90             <id>enforce-files-exist</id>
91             <phase>pre-integration-test</phase>
92             <goals>
93               <goal>enforce</goal>
94             </goals>
95             <configuration>
96               <rules>
97                 <requireFilesExist>
98                   <files>
99                     <file>${distro.script}</file>
100                   </files>
101                 </requireFilesExist>
102               </rules>
103               <fail>true</fail>
104             </configuration>
105           </execution>
106         </executions>
107       </plugin>
108
109       <plugin>
110         <groupId>org.opendaylight.controller</groupId>
111         <artifactId>controller-maven-plugin</artifactId>
112         <version>0.1.0-SNAPSHOT</version>
113           <configuration>
114               <controllerHome>${distro.dir}</controllerHome>
115               <controllerHost>localhost</controllerHost>
116               <controllerWebPort>8080</controllerWebPort>
117               <controllerUsername>admin</controllerUsername>
118               <controllerPassword>admin</controllerPassword>
119               <controllerStartScriptName>${distro.script}</controllerStartScriptName>
120               <pidFile>${distro.pid}</pidFile>
121           </configuration>
122         <executions>
123           <execution>
124             <!-- ensure controller is started in pre-integration phase -->
125             <id>start-controller</id>
126             <phase>pre-integration-test</phase>
127             <configuration>
128               <startArgs>
129                 <param>-start</param>
130                 <param>-jmx</param>
131                 <param>-Djava.rmi.server.hostname=${sanitytest.bind.address} </param>
132               </startArgs>
133               <warmupTimeSecs> 60 </warmupTimeSecs>
134             </configuration>
135             <goals>
136               <goal>run</goal>
137             </goals>
138           </execution>
139           <execution>
140             <!-- ensure controller is stopped in post-integration phase -->
141             <id>stop-controller</id>
142             <phase>post-integration-test</phase>
143             <goals>
144               <goal>stop</goal>
145             </goals>
146           </execution>
147         </executions>
148       </plugin>
149
150       <plugin>
151         <!--  run the test -->
152         <groupId>org.apache.maven.plugins</groupId>
153         <artifactId>maven-failsafe-plugin</artifactId>
154         <version>${failsafe.version}</version>
155         <configuration>
156           <systemPropertyVariables>
157             <ctrl.home>${distro.dir}</ctrl.home>
158             <ctrl.host>${sanitytest.bind.address}</ctrl.host>
159             <ctrl.start.timeout>${sanitytest.timeout}</ctrl.start.timeout>
160           </systemPropertyVariables>
161         </configuration>
162       </plugin>
163
164     </plugins>
165
166
167   </build>
168 </project>