Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@locus.apache.org Received: (qmail 22081 invoked from network); 11 Nov 2008 03:51:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2008 03:51:06 -0000 Received: (qmail 75915 invoked by uid 500); 11 Nov 2008 03:51:13 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 75901 invoked by uid 500); 11 Nov 2008 03:51:13 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 75890 invoked by uid 99); 11 Nov 2008 03:51:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Nov 2008 19:51:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [205.166.66.15] (HELO newman.medrad.com) (205.166.66.15) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 11 Nov 2008 03:49:55 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [jira] Commented: (JSPWIKI-423) Plugins should use annotations instead of jspwiki_module.xml Date: Mon, 10 Nov 2008 22:50:21 -0500 Message-ID: <417C1D2F5EA7B549B7DCA208AA911E3A027BF58F@newman.na.medrad.com> In-Reply-To: <1292456076.1226373104183.JavaMail.jira@brutus> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [jira] Commented: (JSPWIKI-423) Plugins should use annotations instead of jspwiki_module.xml Thread-Index: AclDq0hoX4r12LFFSiiz5uE4iZRUmQAAqCYw References: <1402181818.1226243204175.JavaMail.jira@brutus> <1292456076.1226373104183.JavaMail.jira@brutus> From: "Volkar, John M." To: X-Virus-Checked: Checked by ClamAV on apache.org Discussion out side of JIRA is okay right? ---- I'm frankly quite surprised at the seeming jump on the annotation bandwagon. I *like* annotations and all, but I fail to see exactly how they improve things over simply adding a few abstract methods to WikiPlugin such as: getMinVersion() getMaxVersion() Or=20 getWhateverIsNeeded()=20 Since the basic rule for a plugin is that all significant construction work should be done in the init method, and a no arg constructor is required to be available, I fail to see why simply new'ing it and calling a few getters is not sufficient.=20 And frankly I don't like getters for the version stuff, why not just let the PluginManager ask a plugin if its compatible... WikiPlugin candidate =3D new SomeRandomPlugin() < Maybe I should crawl back under my rock; I seem to have missed much discussion. Regards, John Volkar -----Original Message----- From: Andrew Jaquith (JIRA) [mailto:jira@apache.org]=20 Sent: Monday, November 10, 2008 10:12 PM To: jspwiki-dev@incubator.apache.org Subject: [jira] Commented: (JSPWIKI-423) Plugins should use annotations instead of jspwiki_module.xml [ https://issues.apache.org/jira/browse/JSPWIKI-423?page=3Dcom.atlassian.ji= r a.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D126464= 5 3#action_12646453 ]=20 Andrew Jaquith commented on JSPWIKI-423: ---------------------------------------- A few quick thoughts: * It's true, Stripes 1.5 does not scan the entire classpath anymore... and this is definitely a feature because it speeds up startup * The Stripes approach for locating optional classes is to specify what packages contain Stripes "extensions". This is done by having ResolveUtil search a comma-separated list of packages in a servlet init-param, e.g., "com.ecyrd.jspwiki.action,net.sf.stripes". * JSPWiki could do the same thing (but configure the packages to search via jspwiki.proprties, I'd expect)=20 Also, could we think a little more creatively about the annotation name? "ModuleData" just leaves me cold. I'd suggest something a little more suggestive of the classes it annotates. For example, "WikiExtension" or "WikiModule" is a lot better. > Plugins should use annotations instead of jspwiki_module.xml > ------------------------------------------------------------ > > Key: JSPWIKI-423 > URL: https://issues.apache.org/jira/browse/JSPWIKI-423 > Project: JSPWiki > Issue Type: Improvement > Components: Plugins > Reporter: Janne Jalkanen > Assignee: Janne Jalkanen > Fix For: 3.0 > > > Use of annotations makes it much easier to keep a plugin up to date. Please see org.apache.jspwiki.api.ModuleData annotation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.