Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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() ) )
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 ).