On 16 December 2013 12:45, Martin Gainty <mgai...@hotmail.com> wrote:
> Folks-
>
>
>
> org.apache.maven.compiler.plugin.compiler.CompilerMojo.java
>
>     /**
>      * The source directories containing the sources to be compiled.
>      */
>     @Parameter( defaultValue = "${project.compileSourceRoots}", readonly = 
> true, required = true )
>
>
> For some reason I cannot locate compileSourceRoots anywhere on 
> maven-compiler-plugin page
> http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
>
>
>
> do I need better glasses to read this page properly?

I had to do some googling to find where in the documentation to point
you to as I'm too rusty to be able to point you to the docs which
describes this.
I sorry to say that I struggled to find what I wanted.

A lot of this is from memory and may not be quite correct for 3.x

${project... means from the interpolate value
(http://maven.apache.org/shared/maven-filtering/) named "project"
which gets injected by Plexus automatically
(http://plexus.codehaus.org/plexus-components/plexus-interpolation/).
This is a MavenProject object.

The method you are talking about is here
http://maven.apache.org/ref/3.0.3/maven-core/apidocs/org/apache/maven/project/MavenProject.html#getCompileSourceRoots%28%29

I thought http://maven.apache.org/plugin-developers/ had some guidance
on access MavenProject but I can't find anything.

I finally found a similar example
http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook#MojoDeveloperCookbook-Themavenproject,ortheeffectivepom.
which shows you how to have a local variable get injected with this
value so you can reference it in your Mojo. But if you dont need that
variable, you can just reference its properties directly like
CompilerMojo does for the compileSourceRoots variable.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to