Hi all,
@Jörg
I tried your suggestion, but it didn't work. As I understood the
documentation the expression-syntax is for properties and not for
parameters.
@Franz
During compile phase, my compiler is definitely used. I can see the output
and the execution of the goal in maven's output.
The only problem is the parameter passing.
In the meantime I found a workaround. But I would like to know the proper
way to implement such a plugin.
As workaround I did following:
.) Disable the compiler in the components.xml. So no <compile> tag is
defined for <role-hint>jar</role-hint>
.) Call the plugin in the pom.xml like this:
<plugin>
<groupId>mygroup</groupId>
<artifactId>customCompile</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>custom-compilation</id>
<phase>compile</phase>
<configuration>
<testParam>testValue</testParam>
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
Regards,
Martin
--On Donnerstag, Januar 11, 2007 23:04:40 -0800 franz see
<[EMAIL PROTECTED]> wrote:
Good day,
Actually, using @parameter only should be sufficient for it to be
configured via the pom. The @expression is used for setting the parameter
via commandline.
Anyway, Martin M., try specifying in your plugin tag the groupId and
version as well. It might still be trying to configure
org.apache.maven.plugins:maven-compiler-plugin:RELEASE instead of your
custom compiler plugin.
Cheers,
Franz
Jörg Schaible wrote:
Hi Martin,
there's no automation. You need to provide the expression for the
parameter to initialize:
[snip]
/**
* @parameter expression="${testParam}"
**/
private String testParam
[snip]
Within the expression you can also address other parts of the POM ...
another typical parameter is:
/**
* The directory for the generated file.
*
* @parameter expression="${project.build.directory}"
* @required
*/
private String outputDirectory;
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/passing-custom-parameters-to-a-custom-compiler-plug
in-tf2958426s177.html#a8292757 Sent from the Maven - Users mailing list
archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Martin Moser
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]