Skip to content

Commit ebb75ab

Browse files
author
eugenp
committed
maven upgrades, new way of configuring properties for persistence
1 parent a45c572 commit ebb75ab

File tree

35 files changed

+124
-154
lines changed

35 files changed

+124
-154
lines changed

core-java/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<properties>
135135
<!-- Spring -->
136136
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
137-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
137+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
138138

139139
<!-- persistence -->
140140
<hibernate.version>4.3.4.Final</hibernate.version>
@@ -152,7 +152,7 @@
152152

153153
<!-- util -->
154154
<guava.version>16.0.1</guava.version>
155-
<commons-lang3.version>3.3</commons-lang3.version>
155+
<commons-lang3.version>3.3.1</commons-lang3.version>
156156

157157
<!-- testing -->
158158
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -167,7 +167,7 @@
167167
<!-- maven plugins -->
168168
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
169169
<maven-war-plugin.version>2.4</maven-war-plugin.version>
170-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
170+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
171171
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
172172
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
173173

experiments/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
<properties>
257257
<!-- Spring -->
258258
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
259-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
259+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
260260

261261
<!-- persistence -->
262262
<hibernate.version>4.3.4.Final</hibernate.version>
@@ -271,7 +271,7 @@
271271

272272
<!-- util -->
273273
<guava.version>16.0.1</guava.version>
274-
<commons-lang3.version>3.3</commons-lang3.version>
274+
<commons-lang3.version>3.3.1</commons-lang3.version>
275275

276276
<!-- testing -->
277277
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -286,7 +286,7 @@
286286
<!-- maven plugins -->
287287
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
288288
<maven-war-plugin.version>2.4</maven-war-plugin.version>
289-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
289+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
290290
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
291291
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
292292

guava/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<properties>
9696
<!-- Spring -->
9797
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
98-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
98+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
9999

100100
<!-- persistence -->
101101
<hibernate.version>4.3.4.Final</hibernate.version>
@@ -110,7 +110,7 @@
110110

111111
<!-- util -->
112112
<guava.version>16.0.1</guava.version>
113-
<commons-lang3.version>3.3</commons-lang3.version>
113+
<commons-lang3.version>3.3.1</commons-lang3.version>
114114

115115
<!-- testing -->
116116
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -125,7 +125,7 @@
125125
<!-- maven plugins -->
126126
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
127127
<maven-war-plugin.version>2.4</maven-war-plugin.version>
128-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
128+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
129129
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
130130
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
131131

httpclient/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<properties>
132132
<!-- Spring -->
133133
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
134-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
134+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
135135

136136
<!-- persistence -->
137137
<hibernate.version>4.3.4.Final</hibernate.version>
@@ -146,7 +146,7 @@
146146

147147
<!-- util -->
148148
<guava.version>16.0.1</guava.version>
149-
<commons-lang3.version>3.3</commons-lang3.version>
149+
<commons-lang3.version>3.3.1</commons-lang3.version>
150150

151151
<!-- testing -->
152152
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -161,7 +161,7 @@
161161
<!-- maven plugins -->
162162
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
163163
<maven-war-plugin.version>2.4</maven-war-plugin.version>
164-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
164+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
165165
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
166166
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
167167

jackson/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<properties>
109109
<!-- Spring -->
110110
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
111-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
111+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
112112

113113
<!-- persistence -->
114114
<hibernate.version>4.3.4.Final</hibernate.version>
@@ -126,7 +126,7 @@
126126

127127
<!-- util -->
128128
<guava.version>16.0.1</guava.version>
129-
<commons-lang3.version>3.3</commons-lang3.version>
129+
<commons-lang3.version>3.3.1</commons-lang3.version>
130130

131131
<!-- testing -->
132132
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -141,7 +141,7 @@
141141
<!-- maven plugins -->
142142
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
143143
<maven-war-plugin.version>2.4</maven-war-plugin.version>
144-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
144+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
145145
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
146146
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
147147

mockito/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<properties>
9191
<!-- Spring -->
9292
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
93-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
93+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
9494

9595
<!-- persistence -->
9696
<hibernate.version>4.3.4.Final</hibernate.version>
@@ -105,7 +105,7 @@
105105

106106
<!-- util -->
107107
<guava.version>16.0.1</guava.version>
108-
<commons-lang3.version>3.3</commons-lang3.version>
108+
<commons-lang3.version>3.3.1</commons-lang3.version>
109109

110110
<!-- testing -->
111111
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -120,7 +120,7 @@
120120
<!-- maven plugins -->
121121
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
122122
<maven-war-plugin.version>2.4</maven-war-plugin.version>
123-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
123+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
124124
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
125125
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
126126

spring-all/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
<properties>
194194
<!-- Spring -->
195195
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
196-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
196+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
197197
<javassist.version>3.18.1-GA</javassist.version>
198198
<jstl.version>1.2</jstl.version>
199199

@@ -210,7 +210,7 @@
210210

211211
<!-- util -->
212212
<guava.version>16.0.1</guava.version>
213-
<commons-lang3.version>3.3</commons-lang3.version>
213+
<commons-lang3.version>3.3.1</commons-lang3.version>
214214

215215
<!-- testing -->
216216
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -221,12 +221,11 @@
221221
<httpclient.version>4.3.3</httpclient.version>
222222

223223
<rest-assured.version>2.3.0</rest-assured.version>
224-
225224

226225
<!-- maven plugins -->
227226
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
228227
<maven-war-plugin.version>2.4</maven-war-plugin.version>
229-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
228+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
230229
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
231230
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
232231

spring-all/src/main/java/org/baeldung/spring/config/PersistenceConfig.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,11 @@ public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
6565
}
6666

6767
final Properties hibernateProperties() {
68-
return new Properties() {
69-
{
70-
setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
71-
setProperty("hibernate.dialect", env.getProperty("hibernate.dialect"));
72-
73-
// setProperty("hibernate.globally_quoted_identifiers", "true");
74-
// note: necessary in launchpad-storage, but causing problems here
75-
}
76-
};
68+
final Properties hibernateProperties = new Properties();
69+
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
70+
hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect"));
71+
// hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true");
72+
return hibernateProperties;
7773
}
74+
7875
}

spring-exceptions/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
<properties>
206206
<!-- Spring -->
207207
<org.springframework.version>4.0.2.RELEASE</org.springframework.version>
208-
<org.springframework.security.version>3.2.2.RELEASE</org.springframework.security.version>
208+
<org.springframework.security.version>3.2.3.RELEASE</org.springframework.security.version>
209209
<javassist.version>3.18.1-GA</javassist.version>
210210
<jstl.version>1.2</jstl.version>
211211

@@ -223,7 +223,7 @@
223223

224224
<!-- util -->
225225
<guava.version>16.0.1</guava.version>
226-
<commons-lang3.version>3.3</commons-lang3.version>
226+
<commons-lang3.version>3.3.1</commons-lang3.version>
227227

228228
<!-- testing -->
229229
<org.hamcrest.version>1.3</org.hamcrest.version>
@@ -239,7 +239,7 @@
239239
<!-- maven plugins -->
240240
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
241241
<maven-war-plugin.version>2.4</maven-war-plugin.version>
242-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
242+
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
243243
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
244244
<cargo-maven2-plugin.version>1.4.7</cargo-maven2-plugin.version>
245245

spring-exceptions/src/main/java/org/baeldung/ex/mappingexception/spring/Cause1PersistenceConfig.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,11 @@ public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
6666
}
6767

6868
final Properties hibernateProperties() {
69-
return new Properties() {
70-
{
71-
setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
72-
setProperty("hibernate.dialect", env.getProperty("hibernate.dialect"));
73-
74-
// setProperty("hibernate.globally_quoted_identifiers", "true");
75-
// note: necessary in launchpad-storage, but causing problems here
76-
}
77-
};
69+
final Properties hibernateProperties = new Properties();
70+
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
71+
hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect"));
72+
// hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true");
73+
return hibernateProperties;
7874
}
75+
7976
}

0 commit comments

Comments
 (0)