-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
111 lines (88 loc) · 3.1 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
<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.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin-it-derby</artifactId>
<version>1.0-SNAPSHOT</version>
<name>sql-maven-plugin Derby Database Integration Test</name>
<dependencies>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.2.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.2.2.0</version>
</dependency>
</dependencies>
<configuration>
<driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
<url>jdbc:derby:${project.build.directory}/testdb;create=true</url>
<skip>${maven.test.skip}</skip>
</configuration>
<executions>
<execution>
<id>create-table</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>create table derbyDB(num int, addr varchar(40))</sqlCommand>
</configuration>
</execution>
<execution>
<id>update-table</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>
insert into derbyDB values (1956,'Webster St.');
insert into derbyDB values (1910,'Union St.');
update derbyDB set num=180, addr='Grand Ave.' where num=1956;
</sqlCommand>
</configuration>
</execution>
<execution>
<id>shutdown-database-so-that-test-can-run</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<url>jdbc:derby:;shutdown=true</url>
<skipOnConnectionError>true</skipOnConnectionError>
</configuration>
</execution>
<execution>
<id>drop-table</id>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>drop table derbyDB</sqlCommand>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>