[
https://issues.apache.org/jira/browse/MNG-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128651#comment-15128651
]
Karl Heinz Marbaise commented on MNG-5970:
------------------------------------------
First this is old style XDoclet definition which you should change to the
[annotation based
style|https://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html].
Furthermore i would suggest to use {{File}} for the type instead of
{{String}} cause a folder is a {{File}}. This will look like this:
{code:java}
@Parameter( defaultValue = "${project.basedir}", readonly = true )
private File basedir;
{code}
I'm not 100% sure if this solve your problem..
Apart from the above you should stop using Maven 3.0.3 cause it has [many
bugs|https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922&version=12330178]...Which
Jenkins version do you use? Are you using Maven based project types?
> Directory path set in mojo by Maven is lowercased, causing it to not match
> actual directory
> -------------------------------------------------------------------------------------------
>
> Key: MNG-5970
> URL: https://issues.apache.org/jira/browse/MNG-5970
> Project: Maven
> Issue Type: Bug
> Components: Plugin API
> Affects Versions: 3.0.3
> Environment: Linux
> Reporter: Jim Showalter
>
> We have a custom mojo. It has this field:
> /**
> * Location of the directory containing the pom.
> * @parameter default-value="project.basedir"
> * @required
> */
> private String baseDir;
> Our unit test for the mojo works fine locally, but fails in Jenkins CI.
> The reason it fails is that the value of baseDir set by the Maven framework
> is all lowercase, but the directory path on the Jenkins server has some
> uppercase.
> We are not touching the value of baseDir, just taking it and immediately
> trying File[] files = new File(baseDir).listFiles(), which blows up because
> baseDir lowercase doesn't exist.
> Why is Maven not passing the directory path in as-is, instead of all
> lowercase?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)