1) put the components bit in components.xml for your compiler JAR
2) add your jar as a dependency within the compiler plugin element in build
3) add the compilerId configuration to the compiler plugin

So, untested, but something like this:

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <compilerId>mycustomcompiler</compilerId>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>com.mycompany</groupId>
      <artifactId>my-custom-compiler</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
</plugin>

HTH,
Brett

On 10/24/05, Stevenson, Chris <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> Does anyone know how to specify a custom compiler in the pom of a project
> that wishes to use it?
>
> Am i correct in thinking that to make plexus/maven aware of a custom
> compiler I need to:
>
> a) Define a role/component in the components.xml of the compiler so that
> plexus can find it?
>
> <component-set>
>   <components>
>     <component>
>       <role>org.codehaus.plexus.compiler.Compiler</role>
>       <role-hint>mycustomcompiler</role-hint>
>       <implementation>uk.co.blah.blah.compiler.CompilerImpl</implementation>
>
>     </component>
>   </components>
> </component-set>
>
> b) add a reference to my compiler as a dependency? (can Ijust add it as a
> normal dep?)
>
> c) tell maven to use my compiler instead of the defaul javac (this is the
> real corker...)
>
> Any help much appreciated.
>
> Chris S
>
>
>
> Chris Stevenson
>
> Dresdner Kleinwort Wasserstein
>
>
>
>
>
>
> --------------------------------------------------------------------------------
> The information contained herein is confidential and is intended solely for 
> the
> addressee. Access by any other party is unauthorised without the express
> written permission of the sender. If you are not the intended recipient, 
> please
> contact the sender either via the company switchboard on +44 (0)20 7623 8000, 
> or
> via e-mail return. If you have received this e-mail in error or wish to read 
> our
> e-mail disclaimer statement and monitoring policy, please refer to
> http://www.drkw.com/disc/email/ or contact the sender. 3167
> --------------------------------------------------------------------------------
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to