Hi,

can you please show the full pom file of your plugin project ?

Is this project somewhere available on Github or so ? So we can take a look at it...


Kind regards
Karl-Heinz Marbaise
On 9/21/14 12:28 PM, animator wrote:
Hi,

I'm developing custom reporting  plugin for my own needs. I use Java 7,
Maven 3.1. I have a problem with getting injected parameters from plugin
configuration. In Mojo class I've field like:

     @Parameter
     private String srcDirClj;

and in different project that I want to execute on this plugin I have
following configuration:
        ...
     <reporting>
         <plugins>
             <plugin>
                 <groupId>com.blah.bla</groupId>
                 <artifactId>animator-maven-plugin</artifactId>
                 <version>1.0-SNAPSHOT</version>
                 <configuration>
                     <srcDirClj>src/main/clojure</srcDirClj>
                 </configuration>
             </plugin>
         </plugins>
     </reporting>
        ...

And while invoking this mojo I always get null value for this configuration.
What is the problem with this? Is there any additional configuration that I
have to set?

When I declar property like that:
     @Parameter(property = "source.directory")
     private File srcDirClj;

and add properties configuration outside plugin declaration in POM:
     ...
    <properties>
         <source.directory>src/main/clojure</source.directory>
    </properties>
     ...
it works, but I don't think that it is nice solution.

I have spent quite long time but I could't figure out why this approach
doesn't work.
I read http://maven.apache.org/guides/mini/guide-configuring-plugins.html ,
http://people.apache.org/~ltheussl/maven-stage-site/guides/plugin/guide-java-plugin-development.html
and many other posts but cannot find explanation.

Thanks for any help!

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

Reply via email to