You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by lukewpatterson <lu...@gmail.com> on 2010/05/20 23:38:14 UTC
enforcer BeanShell script, retrieving escaped stuff from
ExpressionEvaluator
evaluateBeanshell rule:
http://maven.apache.org/plugins/maven-enforcer-plugin/rules/evaluateBeanshell.html
want to do something like this:
directoryScanner = new org.codehaus.plexus.util.DirectoryScanner();
directoryScanner.setBasedir(new java.io.File(${project.basedir}));
...
but ${project.basedir} results in a String with '\' characters, which must
be escaped in Java/BeanShell
it doesn't look like any project objects are passed into the
bsh.Interpreter, e.g. like gmaven does when passing in "project" instance
ideas?
background: I'm trying to verify that my projects only have /pom.xml and
/src/** on the root
--
View this message in context: http://old.nabble.com/enforcer-BeanShell-script%2C-retrieving-escaped-stuff-from-ExpressionEvaluator-tp28626298p28626298.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: enforcer BeanShell script, retrieving escaped stuff from
ExpressionEvaluator
Posted by lukewpatterson <lu...@gmail.com>.
lukewpatterson wrote:
>
> evaluateBeanshell rule:
> http://maven.apache.org/plugins/maven-enforcer-plugin/rules/evaluateBeanshell.html
>
> ... ${project.basedir} results in a String with '\' characters, which must
> be escaped in Java/BeanShell
>
I created http://jira.codehaus.org/browse/MENFORCER-100
lukewpatterson wrote:
>
> ... I'm trying to verify that my projects only have /pom.xml and /src/**
> on the root
>
a cookbook hack with gmaven: http://pastebin.com/ddFZJj0e
--
View this message in context: http://old.nabble.com/enforcer-BeanShell-script%2C-retrieving-escaped-stuff-from-ExpressionEvaluator-tp28626298p28633372.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org