This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157283 - Declaratively load lookup items for Maven packaging types
Summary: Declaratively load lookup items for Maven packaging types
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
Depends on: 150194 205607
  Show dependency tree
Reported: 2009-01-22 01:52 UTC by Jesse Glick
Modified: 2011-11-30 16:03 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-01-22 01:52:48 UTC
Since packagings effectively serve as project subtypes for Maven-based projects, it is silly to use


for all Maven-based projects and then force the LookupProvider impl to insert or remove entries according to the packaging.

Smarter would be for NbMavenProjectImpl.LazyLookup to call

  LookupProviderSupport.createCompositeLookup("Projects/org-netbeans-modules-maven/Lookup", baseLookup),

and recreate this if the packaging is changed. (*) This would make it simpler to make LookupProvider's for Maven
projects, and possible in some cases to use @ProjectServiceProvider. For example, J2seLookupProvider could probably go
away entirely, replaced with

@ProjectServiceProvider(service=PrerequisitesChecker.class, projectType="org-netbeans-modules-maven/jar")
public class RunJarPrereqChecker implements PrerequisitesChecker {...}

(*) The above would let packaging-registered LookupMerger's merge also entries from the generic registration, but not
vice-versa. It could be inverted if there is a need for generically-registered LMs to merge specifically-registered base
items but not vice-versa.
Comment 1 Jesse Glick 2010-07-30 00:51:49 UTC
core-main #5c65b7a0589a
Comment 2 Quality Engineering 2010-07-31 03:30:34 UTC
Integrated into 'main-golden', will be available in build *201007310001* on (upload may still be in progress)
User: Jesse Glick <>
Log: #157283: @ProjectServiceProvider for specific Maven packaging types.
Comment 3 Jaroslav Tulach 2010-08-02 08:56:06 UTC
Long time awaited fix is here! Thanks.
Comment 4 Jesse Glick 2010-08-02 14:54:55 UTC
Note that there were some Maven project services I did not convert due to the complexity of the code, especially J2eeLookupProvider. Some others are currently registered for all Maven projects but are perhaps applicable to only certain packaging types, but I am not sufficiently knowledgeable about the domain (relating to web services) to say; @PSP registrations are generally harmless but LookupProvider's may be performance problems. You can inspect layers.txt#Projects/o-n-m-maven/Lookup/ for details.