felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3170) scr-maven-plugin : incremental build mode for eclipse development?
Date Mon, 17 Oct 2011 22:07:10 GMT

    [ https://issues.apache.org/jira/browse/FELIX-3170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129252#comment-13129252

Stuart McCulloch commented on FELIX-3170:

You could consider switching over to Java annotations, rather than javadoc annotations. For
example, bndlib 1.43.0 has some (non-standard) component annotations:



And the draft of forthcoming updates to the OSGi spec http://www.osgi.org/download/osgi-early-draft-2011-09.pdf
contains a proposal for standard Java annotations for Declarative Services (RFC 0172). A preview
of these annotations will soon be available in a new bndlib, which will be included in the
next maven-bundle-plugin release.

The benefit of using runtime Java annotations is that you can then get incremental compilation
by virtue of the Eclipse compiler. To see this in action, try updating to the latest 2.4.0-SNAPSHOT
of the maven-bundle-plugin and import your project into Eclipse using the latest version of
m2e (came bundled with 3.7, but also available on the Eclipse Marketplace). Make sure you
have the latest Tycho configurators installed... go to About Eclipse->Installation Details->Installed
Software, you should see:

   Tycho Project Configurators	org.sonatype.tycho.m2e.feature.feature.group
Sonatype, Inc.

If you don't have this installed, go to Preferences->Maven->Discovery->Open Catalog
and find the Tycho entry, select the checkbox and press the Finish button.

With the latest m2e + tycho and the latest maven-bundle-plugin snapshot you can do some cool
stuff. For example you can add "<unpackBundle>true</unpackBundle>" to your maven-bundle-plugin
configuration to get it to automatically unpack any extra files generated by bnd. That way
as you edit the class file and add Java annotations, such as @Component, m2e will trigger
a refresh of the manifest and unpack the updated component XML.
> scr-maven-plugin : incremental build mode for eclipse development?
> ------------------------------------------------------------------
>                 Key: FELIX-3170
>                 URL: https://issues.apache.org/jira/browse/FELIX-3170
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven SCR Plugin
>            Reporter: Andrei Pozolotin
> Hello;
> I am using scr-maven-plugin in eclipse 3.7 with m2e incremental mode;
> project has some 1000 java files and 100 scr components;
> on every java file save, eclipse runs JDT builder and then maven invokes SRC plugin;
> as project progressed, the responsiveness of eclipse continued to dwindle down,
> now to 3...5 seconds delay on each java file edit;
> 1) is it feasible to support incremental build in scr plugin?
> for this, plugin would have to:
> a) keep scr components parse/build cache
> b) support a new goal, when only a single file with scr annotations is requested for
> but still produces complete scr xml;
> 2) has anyone devised a better solution to this?
> thank you;
> Andrei.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message