There is a source jar for an apt plugin at:
http://www.mvnrepository.com/artifact/org.apache.myfaces.tobago/maven-ap
t-plugin/1.0.7
No idea if that works, but might be worth investigating. As far as the
antrun option goes, you'll need to specify the ant-apt.jar as a
dependency within the antrun execution, something like:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<execution>
<phase>process-classes</phase>
<configuration>
<tasks>
<apt ...></apt>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-apt</artifactId>
<version>SOME_VERSION</version>
</dependency>
</dependencies>
</plugin>
Unfortunately, it doesn't appear that the ant-apt jar has been loaded
into the main repository, so you can either (1) go through the process
to add it to the main repository, (2) do an install:install-file to
install it in your local repository, (3) do a deploy:deploy-file to
deploy it your company repository (you do have one, right?), or (4) make
your dependency a system dependency and specify a local path. (1) would
be nice so everyone else can use it but might take a while, so you'll
probably need to do (2) or (3) short-term. (4) should generally be
avoided, but is mentioned for completeness.
Chris
> -----Original Message-----
> From: Rohnny Moland [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 03 August, 2006 08:31
> To: [email protected]
> Subject: using apt (annotation processing) with maven 2
>
> Hi,
>
> I wonder if any have got the ant apt plugin to work with
> maven 2? Just trying to do something like this:
>
> <tasks>
> <apt srcdir="${basedir}/src/main/java"
> destdir="${basedir}/src/main/resources/component"
> classpath="${project.compileClasspathElements}"
>
> preprocessdir="${basedir}/src/main/java"
> debug="on"
> deprecation="off"
> optimize="on"
> includeAntRuntime="no"
> nocompile="false"
> factory="com....tools.ConfigProcessorFactory">
> </apt>
> </tasks>
>
>
> But I get a task not found exception because ant cannot find
> the ant-apt.jar (I just put in in m2/lib).
>
> Any good ideas? Or if someone knows some apt maven tool that _works_.
>
>
> Thanks in advance,
> Rohnny
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]