@@ -0,0 +1,1322 @@
+package de.fichtelmax.mojo.messagebundle.generate;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.Properties;%0A%0Aimport de.fichtelmax.mojo.messagebundle.model.MessageBundleInfo;%0Aimport de.fichtelmax.mojo.messagebundle.model.MessagePropertyInfo;%0A%0Apublic class MessageResourceParser %7B%0A%0A%09public MessageBundleInfo parse(File baseDir, File file) throws IOException %7B%0A%09%09String packagePath = baseDir.toURI().relativize(file.getParentFile().toURI()).getPath();%0A%09%09if (packagePath.endsWith(File.separator)) %7B%0A%09%09%09packagePath = packagePath.substring(0, packagePath.length() - 1);%0A%09%09%7D%0A%0A%09%09String packageName = packagePath.replace(File.separatorChar, '.');%0A%0A%09%09try (InputStream in = new FileInputStream(file)) %7B%0A%09%09%09Properties properties = new Properties();%0A%09%09%09properties.load(in);%0A%0A%09%09%09MessageBundleInfo info = new MessageBundleInfo();%0A%09%09%09info.setBundleFileName(packagePath + File.separatorChar + file.getName());%0A%09%09%09info.setPackageName(packageName);%0A%09%09%09info.setName(file.getName().replaceAll(%22%5C%5C..*$%22, %22%22));%0A%0A%09%09%09for (String property : properties.stringPropertyNames()) %7B%0A%09%09%09%09MessagePropertyInfo propertyInfo = new MessagePropertyInfo();%0A%09%09%09%09propertyInfo.setPropertyName(property);%0A%0A%09%09%09%09info.getPropertyInfos().add(propertyInfo);%0A%09%09%09%7D%0A%0A%09%09%09return info;%0A%09%09%7D%0A%09%7D%0A%7D%0A

add resource parser