Index: topia-service/src/java/org/codelutin/topia/migration/TopiaMigrationServiceImpl.java diff -u topia-service/src/java/org/codelutin/topia/migration/TopiaMigrationServiceImpl.java:1.2 topia-service/src/java/org/codelutin/topia/migration/TopiaMigrationServiceImpl.java:1.3 --- topia-service/src/java/org/codelutin/topia/migration/TopiaMigrationServiceImpl.java:1.2 Wed Apr 18 08:44:59 2007 +++ topia-service/src/java/org/codelutin/topia/migration/TopiaMigrationServiceImpl.java Fri Apr 20 08:46:28 2007 @@ -30,9 +30,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codelutin.topia.TopiaNotFoundException; import org.codelutin.topia.framework.TopiaContextImplementor; -import org.codelutin.topia.framework.TopiaUtil; import org.codelutin.topia.migration.common.Version; import org.codelutin.topia.migration.kernel.ConfigurationAdapter; import org.codelutin.topia.migration.kernel.ConfigurationHelper; @@ -48,9 +46,9 @@ * @author Chevallereau Benjamin * @author Eon Sébastien * @author Trève Vincent - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * - * Last update : $Date: 2007/04/18 08:44:59 $ + * Last update : $Date: 2007/04/20 08:46:28 $ */ public class TopiaMigrationServiceImpl implements TopiaMigrationService { @@ -428,7 +426,7 @@ */ private Map loadOldConfigurations(Version vdbVersion) { // schema des noms de dossier de version - final Pattern pattern = Pattern.compile("V([0-9]+(\\.[0-9]+)*)"); + final Pattern pattern = Pattern.compile("([0-9]+(\\.[0-9]+)*)"); // instancie la map ordonée Map mVersionAndConfigurationMap = null; @@ -436,7 +434,7 @@ // parcourt du dossier mappingsDirectory File mappingBaseDir = new File(mappingsDirectory); - // pour tous les dossiers qui ont un nom genre "Vx" (x est une version) + // pour tous les dossiers qui ont un nom genre "x" (x est une version) File[] filesInIt = mappingBaseDir.listFiles(); if (filesInIt != null && filesInIt.length > 0) { @@ -451,7 +449,7 @@ Matcher matcher = pattern.matcher(fileInIt.getName()); if(matcher.find()) { - // group(1) est ce qui match entre le premeir niveau de parentheses + // group(1) est ce qui match entre le premier niveau de parentheses String sVersion = matcher.group(1); //logger.debug("Directory " + fileInIt.getName() + " matches, version = " + sVersion); @@ -470,7 +468,7 @@ else { logger.debug("Loading mapping for version " + v.getVersion()); - String mappingVersionDir = mappingsDirectory + "/V" + v.getVersion(); + String mappingVersionDir = mappingsDirectory + "/" + v.getVersion(); Configuration cfgForVersion = cfgHelper.getConfigurationInDirectory(mappingVersionDir); mVersionAndConfigurationMap.put(v, cfgForVersion);