[forge-dev] [JBoss JIRA] Closed: (SEAMFORGE-92) Centralize the plugin setup process
Lincoln Baxter III (JIRA)
jira-events at lists.jboss.org
Tue May 3 14:06:18 EDT 2011
[ https://issues.jboss.org/browse/SEAMFORGE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lincoln Baxter III closed SEAMFORGE-92.
---------------------------------------
Assignee: Lincoln Baxter III
Fix Version/s: 1.0.0.Alpha4
Resolution: Done
Resolved by scanning for any plugin with a @Command("setup") and providong a list of completion options.
[plugin-example] Runner.java $ setup
scaffold richfaces beans arquillian shade plugins setup prettyfaces persistence
[plugin-example] Runner.java $ setup p
plugins prettyfaces persistence
[plugin-example] Runner.java $ setup persistence
? [provider=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAProvider)]:
HIBERNATE OPENJPA ECLIPSELINK
? [provider=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAProvider)]: HIBERNATE
? [container=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAContainer)]:
JBOSS_AS6 JBOSS_AS7 GLASSFISH_3 CUSTOM_JDBC CUSTOM_JTA CUSTOM_NON_JTA
? [container=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAContainer)]:
***INFO*** Aborted.
[plugin-example] Runner.java $
> Centralize the plugin setup process
> -----------------------------------
>
> Key: SEAMFORGE-92
> URL: https://issues.jboss.org/browse/SEAMFORGE-92
> Project: Seam Forge
> Issue Type: Feature Request
> Components: Brainstorming, Builtin Plugins, Plugin API
> Affects Versions: 1.0.0.Alpha2
> Reporter: Lincoln Baxter III
> Assignee: Lincoln Baxter III
> Fix For: 1.0.0.Alpha4
>
>
> Many plugins have to implement a setup method which prevents them from correctly using @RequiresFacet or packaging types - because the setup method cannot be called unless the @RequiredFacets are installed, which may not be the case before setup() is executed. Plugins should be able use a @Observes or @Produces method to tie into a centralized setup system, which executes the plugin setup function sans arguments, and ignoring requirements.
> {code}$ setup myplugin{code}
> {code}
> public void setup(@Observes SetupPlugin<MyPlugin> event, ...)
> {
> // do setup here
> }
> {code}
> {code}
> @Produces public SetupPlugin<MyPlugin> setup(...)
> {
> // do setup here
> }
> {code}
> or perhaps something simpler, but this would need to implement some kind of parameter injection
> {code}
> @Setup
> public void setup(...)
> {
> // do setup here
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-dev
mailing list