forked from carlspring/derby-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUSAGE
97 lines (87 loc) · 3.88 KB
/
USAGE
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
Example usage:
<project ...>
<build>
<plugins>
<plugin>
<groupId>org.carlspring.maven</groupId>
<artifactId>derby-maven-plugin</artifactId>
<version>${version.derby.plugin}</version>
<configuration>
<!-- Optional, defaults to ${project.build.directory}/derby-->
<derbyHome>${project.build.directory}/derby</derbyHome>
<!-- Optional, defaults to 1527 -->
<port>1527</port>
<!-- Optional, the username to use when authenticating.-->
<username>derby</username>
<!-- Optional, the password to use when authenticating.-->
<password>derby</password>
<!-- Optional, the absolute class name of the driver.-->
<!--<driver></driver>-->
<!-- Optional, the URL to use when connecting.-->
<!--<connectionURL></connectionURL>-->
<!-- Optional, the URL to use when shutting down the database.-->
<connectionURLShutdown>jdbc:derby:;shutdown=true</connectionURLShutdown>
<!-- Optional, whether to run Derby with debugging statements.-->
<debugStatements>true</debugStatements>
<!-- Whether to bypass running Derby.-->
<skip>false</skip>
</configuration>
<executions>
<execution>
<id>start-derby</id>
<phase>test-compile</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Usage of the run goal, configure the plugin outside of the "execution" scope as outlined above:
<project ...>
<build>
<plugins>
<plugin>
<groupId>org.carlspring.maven</groupId>
<artifactId>derby-maven-plugin</artifactId>
<version>${version.derby.plugin}</version>
<configuration>
<basedir>${project.build.directory}/derby</basedir>
<port>1527</port>
</configuration>
<executions>
<execution>
<id>start-derby</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-derby</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
# mvn derby:run
Will start your derby instance on port 1527 and block until you CTRL-C the process or use:
# mvn derby:stop
Sends a stop message to the configured server instance.
The maven property derby.skip, if set to true, will prevent the plugin from launching derby. It can also be set with
<plugin>
<groupId>org.carlspring.maven</groupId>
<artifactId>derby-maven-plugin</artifactId>
<version>${version.derby.plugin}</version>
<configuration>
<skip>true</skip>
</configuration>
...
</plugin>