Depends on what you use tobago's APT plugin for, but this works for us:
<plugin>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>maven-apt-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
<configuration>
<factory>
org.trails.hibernate.HibernateAnnotationProcessorFactory
</factory>
<force>true</force>
<nocompile>true</nocompile>
<generated>target/generated-sources/java</generated>
<A>
configFile=\${basedir}/src/main/resources/hibernate.cfg.xml,
destFile=\${basedir}/target/generated-sources/resources/hibernate.cfg.xml
</A>
<target>1.5</target>
<!--
<excludes>
<exclude
implementation="java.lang.String
">**/*Point*.java</exclude>
</excludes>
-->
</configuration>
</plugin>
Also, note that if you don't have jaxen as dependency, APT might just
silently fail:
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
Kalle
On 3/26/07, leonid_ilyevsky <[EMAIL PROTECTED]> wrote:
Is there any progress in using apt with maven2?
I saw one message suggesting org.apache.myfaces.tobago. I couldn't figure
out how to make it to do anything at all.
Are there any examples anywhere?
Without maven, apt works fine for me, but I want it as a part of the maven
build.
Another question: in general, is there a way (maybe some generic plugin)
to
just call any unix command during the build? This also could solve my
problem.
--
View this message in context:
http://www.nabble.com/apt---annotation-processing-tool-tf3468198s177.html#a9676982
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]