root / config / pom.xml

View | Annotate | Download

1
<!--
2
  ~ Copyright 2009 Andrey Khalzov, and individual contributors as indicated by the @author tag.
3
  ~
4
  ~ Licensed under the Apache License, Version 2.0 (the "License");
5
  ~ you may not use this file except in compliance with the License.
6
  ~ You may obtain a copy of the License at
7
  ~
8
  ~      http://www.apache.org/licenses/LICENSE-2.0
9
  ~
10
  ~ Unless required by applicable law or agreed to in writing,
11
  ~ software distributed under the License is distributed on an "AS IS" BASIS,
12
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
  ~ See the License for the specific language governing permissions and limitations under the License.
14
  -->
15
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
17
    <parent>
18
        <groupId>org.wannatrak</groupId>
19
        <artifactId>wannatrak</artifactId>
20
        <version>${projectVersion}</version>
21
    </parent>
22
23
    <modelVersion>4.0.0</modelVersion>
24
    <groupId>org.wannatrak</groupId>
25
    <artifactId>config</artifactId>
26
    <packaging>pom</packaging>
27
28
    <name>Wannatrak config</name>
29
30
    <properties>
31
        <db.url>jdbc:postgresql://127.0.0.1</db.url>
32
        <db.driver>org.postgresql.Driver</db.driver>
33
        <db.type>PostgreSQL 8.3</db.type>
34
        <db.username>postgres</db.username>
35
        <db.password>postgres</db.password>
36
        <db.name>wannatrak</db.name>
37
38
        <mail.user>nobody</mail.user>
39
        <mail.user.password>password</mail.user.password>
40
        <mail.smtp.host>localhost</mail.smtp.host>
41
        <mail.smtp.auth>false</mail.smtp.auth>
42
        <mail.from>wannatrak@wannatrak.com</mail.from>
43
    </properties>
44
45
    <dependencies>
46
        <dependency>
47
            <groupId>org.wannatrak</groupId>
48
            <artifactId>wannatrak-middleware</artifactId>
49
            <version>${projectVersion}</version>
50
        </dependency>
51
52
        <dependency>
53
            <groupId>postgresql</groupId>
54
            <artifactId>postgresql</artifactId>
55
            <version>8.3-603.jdbc4</version>
56
        </dependency>
57
    </dependencies>
58
59
    <profiles>
60
        <profile>
61
            <id>InitJBoss</id>
62
            <build>
63
                <plugins>
64
                    <plugin>
65
                        <groupId>org.apache.maven.plugins</groupId>
66
                        <artifactId>maven-resources-plugin</artifactId>
67
                        <version>2.3</version>
68
                        <executions>
69
                            <execution>
70
                                <id>Init JBoss</id>
71
                                <goals>
72
                                    <goal>copy-resources</goal>
73
                                </goals>
74
                                <phase>install</phase>
75
                                <configuration>
76
                                    <outputDirectory>${jboss.config.path}</outputDirectory>
77
                                    <resources>
78
                                        <resource>
79
                                            <directory>src/resources</directory>
80
                                            <filtering>true</filtering>
81
                                        </resource>
82
                                    </resources>
83
                                    <overwrite>true</overwrite>
84
                                    <encoding>UTF-8</encoding>
85
                                </configuration>
86
                            </execution>
87
                        </executions>
88
                    </plugin>
89
                    <plugin>
90
                        <groupId>org.apache.maven.plugins</groupId>
91
                        <artifactId>maven-dependency-plugin</artifactId>
92
                        <executions>
93
                            <execution>
94
                                <id>Copy libs to JBoss</id>
95
                                <goals>
96
                                    <goal>copy</goal>
97
                                </goals>
98
                                <phase>install</phase>
99
                                <configuration>
100
                                    <outputDirectory>${jboss.config.path}/lib</outputDirectory>
101
                                    <artifactItems>
102
                                        <artifactItem>
103
                                            <groupId>joda-time</groupId>
104
                                            <artifactId>joda-time-hibernate</artifactId>
105
                                            <version>1.0</version>
106
                                            <type>jar</type>
107
                                            <destFileName>joda-time-hibernate.jar</destFileName>
108
                                        </artifactItem>
109
110
                                        <artifactItem>
111
                                            <groupId>joda-time</groupId>
112
                                            <artifactId>joda-time</artifactId>
113
                                            <version>1.6</version>
114
                                            <type>jar</type>
115
                                            <destFileName>joda-time.jar</destFileName>
116
                                        </artifactItem>
117
118
                                        <artifactItem>
119
                                            <groupId>postgresql</groupId>
120
                                            <artifactId>postgresql</artifactId>
121
                                            <version>8.3-603.jdbc4</version>
122
                                            <type>jar</type>
123
                                            <destFileName>postgresql.jar</destFileName>
124
                                        </artifactItem>
125
                                    </artifactItems>
126
                                    <overWriteIfNewer>true</overWriteIfNewer>
127
                                </configuration>
128
                            </execution>
129
                        </executions>
130
                    </plugin>
131
                </plugins>
132
            </build>
133
        </profile>
134
        <profile>
135
            <id>InitDB</id>
136
            <build>
137
                <plugins>
138
                    <plugin>
139
                        <groupId>org.codehaus.mojo</groupId>
140
                        <artifactId>sql-maven-plugin</artifactId>
141
                        <version>1.1</version>
142
                        <dependencies>
143
                            <dependency>
144
                                <groupId>postgresql</groupId>
145
                                <artifactId>postgresql</artifactId>
146
                                <version>8.3-603.jdbc4</version>
147
                            </dependency>
148
                        </dependencies>
149
                        <configuration>
150
                            <driver>${db.driver}</driver>
151
                            <url>${db.url}</url>
152
                            <username>${db.username}</username>
153
                            <password>${db.password}</password>
154
                            <autocommit>true</autocommit>
155
                        </configuration>
156
                        <executions>
157
                            <execution>
158
                                <id>Init Wannatrak DB</id>
159
                                <phase>install</phase>
160
                                <goals>
161
                                    <goal>execute</goal>
162
                                </goals>
163
                                <configuration>
164
                                    <delimiter>;</delimiter>
165
                                    <sqlCommand>
166
                                        CREATE DATABASE ${db.name} ENCODING 'UTF8';;
167
                                    </sqlCommand>
168
                                    <filtering>true</filtering>
169
                                </configuration>
170
                            </execution>
171
                        </executions>
172
                    </plugin>
173
                </plugins>
174
            </build>
175
        </profile>
176
        <profile>
177
            <id>LoadDemo</id>
178
            <build>
179
                <plugins>
180
                    <plugin>
181
                        <groupId>org.codehaus.mojo</groupId>
182
                        <artifactId>sql-maven-plugin</artifactId>
183
                        <version>1.1</version>
184
                        <dependencies>
185
                            <dependency>
186
                                <groupId>postgresql</groupId>
187
                                <artifactId>postgresql</artifactId>
188
                                <version>8.3-603.jdbc4</version>
189
                            </dependency>
190
                        </dependencies>
191
                        <configuration>
192
                            <driver>${db.driver}</driver>
193
                            <username>${db.username}</username>
194
                            <password>${db.password}</password>
195
                            <autocommit>true</autocommit>
196
                            <encoding>utf8</encoding>
197
                        </configuration>
198
                        <executions>
199
                            <execution>
200
                                <id>Init Wannatrak DB</id>
201
                                <phase>install</phase>
202
                                <goals>
203
                                    <goal>execute</goal>
204
                                </goals>
205
                                <configuration>
206
                                    <url>${db.url}</url>
207
                                    <delimiter>;</delimiter>
208
                                    <sqlCommand>
209
                                        CREATE DATABASE ${db.name} ENCODING 'UTF8';;
210
                                    </sqlCommand>
211
                                    <filtering>true</filtering>
212
                                </configuration>
213
                            </execution>
214
                            <execution>
215
                                <id>Init demo data</id>
216
                                <phase>install</phase>
217
                                <goals>
218
                                    <goal>execute</goal>
219
                                </goals>
220
                                <configuration>
221
                                    <url>${db.url}/${db.name}</url>
222
                                    <srcFiles>
223
                                        <srcFile>src/resources/demo-dump.sql</srcFile>
224
                                    </srcFiles>
225
                                </configuration>
226
                            </execution>
227
                        </executions>
228
                    </plugin>
229
                </plugins>
230
            </build>
231
        </profile>
232
    </profiles>
233
</project>