Hi,

in the past weeks I've been working on a new version of the SCR
tooling for Maven and Ant which basically is a complete rewrite of the
code.
The rewrite was necessary as the code has grown over time and was very
tightly coupled to qdox which we now dropped completely.
So this is the first big difference. As discussed and voted, the new
version does not support the javadoc based annotations anymore, just
pure java annotations.
The second difference is, the annotations now have class as retention
policy which allows to scan the annotations by scanning the class file
instead of trying to parse source code.

Apart from that, your project should run with the new version without
any further changes...that's at least the theory. I've run the new
version on Apache Sling and a larger internal project and confirmed
that the generated descriptors are the same, except where the old
version is buggy :)
The configuration of the Maven plugin has changed a little as some
options simply have been removed and the maven plugin by default just
runs on projects of type "jar" and "bundle" - like the maven bundle
plugin. This can be changed through configuration.
There is still a plugin concept, so you could develop your own
annotations - however the interfaces have changed. So that code would
need adaption. As the old interfaces used qdox classes we couldn't
just keep them. The new interfaces are not tied to any library we use
for scanning. I've done that for the Apache Sling annotations.

Finally, I've added support for the annotations from the OSGi DS spec,
but haven't tested this yet.
I
 guess with my tests, I covered a good portion of the functionality,
but as this is a complete rewrite I'm pretty sure that I introduced
new bugs.

Therefore this is a call for everyone interested to give the new
version a try. Just check it out from svn trunk and see if your
project still builds. Especially the ant support needs some testing as
I haven't done this at all yet.

And we have a problem with the byte code generation and Java 7 (see
https://issues.apache.org/jira/browse/FELIX-3568). Maybe someone has a
good idea?

And this is also not anticipating any decision wrt implementing "real"
annotation processors and use those. If we go down that road, the new
implementation makes that much easier as well.

Comments/Feedback/Bug reports welcome

Regards
Carsten
-- 
Carsten Ziegeler
[email protected]

Reply via email to