[ http://jira.codehaus.org/browse/MPLUGIN-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MPLUGIN-58: ------------------------------------- Attachment: align-to-base-birectory.patch This patch should fix this: - pass through absolute paths without any modifications - have two-arg File() constructor do the path concatenation > File Parameter Evaluation > ------------------------- > > Key: MPLUGIN-58 > URL: http://jira.codehaus.org/browse/MPLUGIN-58 > Project: Maven 2.x Plugin Tools > Issue Type: Bug > Reporter: Vincent Thoulé > Attachments: align-to-base-birectory.patch > > > I am developping a plugin have as configuration a File. > In the Test phasis, I encounter some trouble with File Resolution. > My dependency are : > - org.apache.maven.shared:maven-plugin-testing-harness:1.1 > In the > org.codehaus.plexus.component.configurator.converters.basic.FileConverter > provided by Plexus-container-default-1.0-alpha-9-stable-1.jar, > The method fromConfiguration() calls > expressionEvaluator.alignToBaseDirectory( f ); > In case of Test , the expressionEvaluator is > org.apache.maven.plugin.testing.ResolverExpressionEvaluatorStub. > The code is as follow : > public File alignToBaseDirectory( File file ) > { > if ( file.getAbsolutePath().startsWith( PlexusTestCase.getBasedir() ) > ) > { > return file; > } > else > { > return new File( PlexusTestCase.getBasedir() + File.pathSeparator > + file.getPath() ); > } > } > Two Bugs : > - All path which do not start with TestCase Basedir are assumed as relative > path based on basedir. Why not, but it not allow to test Absolute path. > - The concatenation with the Basedir is done with File.pathSeparator ( : > under UNIX and ; under Windows) instead of File.separator ( / under Unix and > \ under Windows ). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira