You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stuart McCulloch (Commented) (JIRA)" <ji...@apache.org> on 2011/10/18 00:07:10 UTC

[jira] [Commented] (FELIX-3170) scr-maven-plugin : incremental build mode for eclipse development?

    [ 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:

   http://www.aqute.biz/Blog/20091020
   http://www.aqute.biz/Bnd/Components

   http://search.maven.org/#artifactdetails%7Cbiz.aQute%7Cbndlib%7C1.43.0%7Cjar

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	0.6.0.201110151902	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;
> SITUATION:
> 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;
> QUESTIONS:
> 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 processing
> 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