Skip to content
Commits on Source (2)
......@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.gaellalire.vote</groupId>
<artifactId>vote</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.1</version>
<packaging>jar</packaging>
<name>Vote</name>
<dependencyManagement>
......@@ -212,6 +212,12 @@
<postgresql.version>42.2.19</postgresql.version>
<slf4j.version>1.7.25</slf4j.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>gaellalire_nexus</id>
<url>https://gaellalire.fr/nexus/content/repositories/releases/</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>gaellalire_nexus</id>
......@@ -225,7 +231,7 @@
<scm>
<connection>scm:git:git@gaellalire.fr:gaellalire/vote.git</connection>
<developerConnection>scm:git:git@gaellalire.fr:gaellalire/vote.git</developerConnection>
<tag>HEAD</tag>
<tag>vote-1.0.1</tag>
</scm>
<prerequisites>
<maven>3.0.4</maven>
......
......@@ -19,6 +19,7 @@ package fr.gaellalire.vote;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.security.CodeSource;
import java.security.Permission;
import java.security.PermissionCollection;
......@@ -95,7 +96,7 @@ public abstract class AbstractLauncher implements Callable<Void> {
return properties;
}
public Map<String, String> createEntityManagerProperties(final Properties properties) {
public Map<String, String> createEntityManagerProperties(final Properties properties) throws MalformedURLException {
String persistenceName = properties.getProperty("profile.persistence.name");
Map<String, String> persistenceMapping = new HashMap<>();
......@@ -109,7 +110,7 @@ public abstract class AbstractLauncher implements Callable<Void> {
for (Entry<String, String> entry : persistenceMapping.entrySet()) {
String value = properties.getProperty("persistence." + persistenceName + "." + entry.getKey());
if (value != null) {
value = value.replaceAll(Pattern.quote("${vestige.data}"), data.getAbsolutePath());
value = value.replaceAll(Pattern.quote("${vestige.data}"), data.toURI().toURL().toString());
entityManagerProperties.put(entry.getValue(), value);
}
}
......