19
19
20
20
import java .io .File ;
21
21
import java .lang .reflect .Constructor ;
22
+ import java .util .Map ;
22
23
import java .util .Properties ;
23
24
24
25
import org .apache .tools .ant .BuildException ;
25
26
import org .apache .tools .ant .Project ;
26
27
import org .apache .tools .ant .types .Path ;
27
28
import org .hibernate .boot .cfgxml .internal .ConfigLoader ;
29
+ import org .hibernate .boot .cfgxml .spi .LoadedConfig ;
28
30
import org .hibernate .boot .registry .BootstrapServiceRegistryBuilder ;
29
31
import org .hibernate .tool .api .metadata .MetadataDescriptor ;
30
32
import org .hibernate .tool .api .metadata .MetadataDescriptorFactory ;
@@ -121,8 +123,8 @@ public void setDetectManyToMany(boolean b) {
121
123
public void setDetectOptimisticLock (boolean b ) {
122
124
detectOptimisticLock = b ;
123
125
}
124
-
125
- private RevengStrategy loadreverseEngineeringStrategy (final String className , RevengStrategy delegate )
126
+
127
+ private RevengStrategy loadreverseEngineeringStrategy (final String className , RevengStrategy delegate )
126
128
throws BuildException {
127
129
try {
128
130
Class <?> clazz = ReflectionUtil .classForName (className );
@@ -147,9 +149,10 @@ private RevengStrategy loadreverseEngineeringStrategy(final String className, Re
147
149
}
148
150
}
149
151
150
- private Properties loadCfgXmlFile () {
152
+ private Map < String , Object > loadCfgXmlFile () {
151
153
return new ConfigLoader (new BootstrapServiceRegistryBuilder ().build ())
152
- .loadProperties (getConfigurationFile ());
154
+ .loadConfigXmlFile (getConfigurationFile ())
155
+ .getConfigurationValues ();
153
156
}
154
157
155
158
private Properties loadProperties () {
0 commit comments