maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <ctubb...@apache.org>
Subject Re: API for annotation scanning in a mojo?
Date Fri, 15 Jul 2016 22:44:36 GMT
You could also use something like reflections[1] or scannotation[2]:

[1]: https://github.com/ronmamo/reflections
[2]: http://scannotation.sourceforge.net/

On Fri, Jul 15, 2016 at 10:47 AM Matt Benson <gudnabrsam@gmail.com> wrote:

> Paul,
>   If you decide that scanning of classfiles is what you want to do, Apache
> Commons Weaver [1] provides the opportunity to do this and create, modify
> or delete classfiles or other resources in the target directory.
> Additionally logging is supported; there is of course a
> commons-weaver-maven-plugin [2]. As for working this into your own mojo, I
> suppose you could program against Commons Weaver's core framework [3].
>
> HTH,
> Matt
>
> [1] http://commons.apache.org/proper/commons-weaver/
> [2] http://commons.apache.org/proper/commons-weaver/#maven
> [3] http://commons.apache.org/proper/commons-weaver/#core
>
>
> On Fri, Jul 15, 2016 at 2:23 AM, Christofer Dutz <
> christofer.dutz@c-ware.de>
> wrote:
>
> > Hi Paul,
> >
> >
> > Have you thought about writing a Java annotation processor and hooking
> > that up in the compiler plugin? I think this is exactly what I would use
> if
> > I want to do something like that.
> >
> >
> > <
> >
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths
> > >
> >
> >
> >
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessors
> >
> >
> > Chris
> >
> > ________________________________
> > Von: Paul Benedict <pbenedict@apache.org>
> > Gesendet: Mittwoch, 13. Juli 2016 23:13:41
> > An: Apache Maven Users
> > Betreff: API for annotation scanning in a mojo?
> >
> > Is there any existing API in any of these projects [1] for scanning
> > annotations? I am writing a Mojo and want to scan either the project's
> > source files or binary files -- haven't decided. The answer will depend
> on
> > what APIs are available to me.
> >
> > [1] https://maven.apache.org/ref/3.3.9/index.html
> >
> > Cheers,
> > Paul
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message