-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathpom.xml
192 lines (179 loc) · 6.47 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.crazycake</groupId>
<artifactId>jdbctemplatetool</artifactId>
<version>1.0.4-RELEASE</version>
<packaging>jar</packaging>
<name>jdbctemplatetool</name>
<description>Spring JdbcTemplate did very convient and useful, but it also has some disadvantages or in another word “inconvenient”.
For example, you can’t just pass an object and tell JdbcTemplate to turn it into a sql and save to database just like hibernate does. Alright, you may say “JdbcTemplate doesn’t need you to write hbm.xml , so it’s understandable”. But is it true that this thing is impossible to achieve?
And also you know JdbcTemplate can auto turn the result of a query to a list of persistent object a.k.a PO, but when you want to do this you will meet a problem: “How to ?”.Because you can’t find any function of JdbcTemplate to pass a sql and a PO class as we expected. After you google for it, you’ve been told you can create a BeanPropertyRowMapper to deal with this. But isn’t it could be more easier?
Based on those questions I create JdbcTemplateTool which can provide these features.</description>
<url>https://github.com/alexxiyang/jdbctemplatetool</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<springVersion>3.2.15</springVersion>
</properties>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.crazycake</groupId>
<artifactId>ScaffoldUnit</artifactId>
<version>1.0.0-RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${springVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${springVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
</dependencies>
<developers>
<developer>
<id>alexxiyang</id>
<name>Alex Yang</name>
<email>[email protected]</email>
<timezone>GMT+8</timezone>
<roles>
</roles>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/alexxiyang/jdbctemplatetool.git</connection>
<developerConnection>scm:git:https://github.com/alexxiyang/jdbctemplatetool.git</developerConnection>
<url>https://github.com/alexxiyang/jdbctemplatetool.git</url>
</scm>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<finalName>jdbctemplatetool</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<properties>
<gpg.keyname>D2CB8A03</gpg.keyname> <!-- GPG Key ID to use for signing -->
<release.username>alexxiyang</release.username>
</properties>
<build>
<plugins>
<!-- Enable signing of the artifacts For gpg:sign-and-deploy-file it's
necessary to have a <server> with the repositoryId provided or id="remote-repository"
defined in settings.xml (it contains the repository's login, psw) Signing:
mvn gpg:sign-and-deploy-file -DpomFile=target/myapp-1.0.pom \ > -Dfile=target/myapp-1.0.jar
\ > -Durl=http://oss.sonatype.org/content/repositories/malyvelky/ \ > -DrepositoryId=sonatype_oss
Note normally it uses the defaul key but we can ovveride it by either setting
the property gpg.keyname (done in this POM) or by providing -Dkeyname=66AE163A
on the command line. OR directly w/ gpg: gpg -u 66AE163A - -sign - -detach-sign
-a target/dbunit-embeddedderby-parenttest.jar Note: "mvn gpg:sign" results
in NPE with v 1.o-a.-4, use "mvn package gpg:sign" instead; see the issue
MGPG-18 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.0-alpha-4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>