Change type of path parameters to java.io.File
----------------------------------------------

                 Key: MJAVACC-38
                 URL: http://jira.codehaus.org/browse/MJAVACC-38
             Project: Maven 2.x JavaCC Plugin
          Issue Type: Improvement
    Affects Versions: 2.2
            Reporter: Benjamin Bentmann
         Attachments: file-parameters.patch

Paul, I far as I understand Maven, the issues MJAVACC-23 and MJAVACC-29 could 
have been avoided if the plugin parameters that specify the directories were 
File's instead of String's. While this change does not affect users of the 
plugin (i.e. their configurations will continue to work), Maven will 
automatically make relative paths absolute by resolving them against the 
project's base directory (also see [Guide to Developing Java Plugins, "Files 
and 
Directories"|http://maven.apache.org/guides/plugin/guide-java-plugin-development.html]).

They call this "path translation" and employ an instance of 
"org.apache.maven.project.path.PathTranslator" for the job. If I got it right, 
the Plexus Container triggers path translation in its 
org.codehaus.plexus.component.configurator.converters.basic.FileConverter by 
invoking expressionEvaluator.alignToBaseDirectory( f ) when pushing the 
parameters from the POM into the mojo.

I created the attached patch and could verify using "-X" that the lines after 
"Configuring mojo 'org.codehaus.mojo:javacc-maven-plugin:2.3-SNAPSHOT:javacc' 
-->" printed absolute paths despite my POM only containing relative paths like 
"src/main/javacc".

-- 
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

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to