You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by "Brett Porter (Updated) (JIRA)" <ji...@apache.org> on 2012/01/12 05:11:39 UTC
[jira] [Updated] (NPANDAY-467)
resgen:generate-existing-resx-to-resource not finding resx files for
translation to resources
[ https://issues.apache.org/jira/browse/NPANDAY-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated NPANDAY-467:
---------------------------------
Fix Version/s: 1.4.1-incubating
will review for next release
> resgen:generate-existing-resx-to-resource not finding resx files for translation to resources
> ---------------------------------------------------------------------------------------------
>
> Key: NPANDAY-467
> URL: https://issues.apache.org/jira/browse/NPANDAY-467
> Project: NPanday
> Issue Type: Bug
> Components: Maven Plugins
> Affects Versions: 1.4-incubating
> Environment: Windows XP, .Net Framework 3.5, Java 6
> Reporter: Anthony Whitford
> Priority: Critical
> Fix For: 1.4.1-incubating
>
> Attachments: ExistingResxGenerator.patch
>
>
> The code says:{code}
> List commands = null;
> for (EmbeddedResource embeddedResource : embeddedResources)
> {
> File file = new File(project.getBuild().getSourceDirectory() + File.separator + embeddedResource.getSourceFile());
> if(!file.exists()) continue;
> commands = getCommands(file.getAbsoluteFile(), resourceDirectory, embeddedResource.getName());
> netExecutableFactory.getNetExecutableFor( vendor, frameworkVersion, "RESGEN",commands ,
> netHome ).execute();
> }
> if(embeddedResources == null)
> {
> String sourceDirectory = project.getBasedir().getPath();
> String[] resourceFilenames = FileUtils.getFilesFromExtension(sourceDirectory, new String[]{"resx"});
> for(String resourceFilename : resourceFilenames)
> {
> File file = new File(resourceFilename);
> if(!file.exists()) continue;
> String name = resourceFilename.substring(sourceDirectory.length() + 1).replace('\\', '.');
> name = project.getArtifactId() + "." + name.substring(0, name.lastIndexOf('.'));
> commands = getCommands(file.getAbsoluteFile(), resourceDirectory, name);
> netExecutableFactory.getNetExecutableFor( vendor, frameworkVersion, "RESGEN",commands ,
> netHome ).execute();
> }
> }
> {code}
> The {{if(embeddedResources == null)}} doesn't really make sense here because {{embeddedResources}} is an empty array. This needs to be changed to: {{if (0 == embeddedResources.length)}}. Without this fix, the plugin is not running this code that is designed to find the resx files and generate the resource files.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira