Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.3
-
Labels:None
-
Number of attachments :
Description
When running the ounce tool against maven 2.0.8, i noticed that paths for some submodules have the wrong file.separator. These are occuring when the pom is more than one level down like the maven-script and maven-reporting
<?xml version="1.0" encoding="UTF-8"?>
<Application name="maven">
<Project language_type="2" path="maven-artifact\maven-artifact.ppf"/>
<Project language_type="2" path="maven-artifact-manager\maven-artifact-manager.ppf"/>
<Project language_type="2" path="maven-artifact-test\maven-artifact-test.ppf"/>
<Project language_type="2" path="maven-core\maven-core.ppf"/>
<Project language_type="2" path="maven-error-diagnostics\maven-error-diagnostics.ppf"/>
<Project language_type="2" path="maven-model\maven-model.ppf"/>
<Project language_type="2" path="maven-monitor\maven-monitor.ppf"/>
<Project language_type="2" path="maven-plugin-api\maven-plugin-api.ppf"/>
<Project language_type="2" path="maven-plugin-descriptor\maven-plugin-descriptor.ppf"/>
<Project language_type="2" path="maven-plugin-parameter-documenter\maven-plugin-parameter-documenter.ppf"/>
<Project language_type="2" path="maven-plugin-registry\maven-plugin-registry.ppf"/>
<Project language_type="2" path="maven-profile\maven-profile.ppf"/>
<Project language_type="2" path="maven-project\maven-project.ppf"/>
<Project language_type="2" path="maven-reporting/maven-reporting-api\maven-reporting-api.ppf"/>
<Project language_type="2" path="maven-repository-metadata\maven-repository-metadata.ppf"/>
<Project language_type="2" path="maven-script/maven-script-ant\maven-script-ant.ppf"/>
<Project language_type="2" path="maven-script/maven-script-beanshell\maven-script-beanshell.ppf"/>
<Project language_type="2" path="maven-settings\maven-settings.ppf"/>
</Application>
Another case where I'm running into trouble with improperly normalized paths is when running ounce:application on a single project (no modules or parent pom in the reactor) running on windows. The offending lines of code are in the OunceCoreXmlSerializer in the insertChildProjects method where it checks that the fullPath starts with "./" which is hard-coded to use the unix file.separator, whereas just a few lines above that it uses File.separator, which means this will always fail on a windows machine. I changed this to test for "." + File.separator (instead of "./") and that worked for me. I have attached a patch that shows the change.