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 91501 - Ear project should return AntArtifactProvider thru Lookup
Summary: Ear project should return AntArtifactProvider thru Lookup
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-22 19:33 UTC by _ gmpatil
Modified: 2007-03-23 20:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff of changes in EarProject.java (1.09 KB, text/plain)
2007-01-04 20:13 UTC, Roderico Cruz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gmpatil 2006-12-22 19:33:17 UTC
Mostof the Ant based project system are providing AntArtifactProvider thru lookup.
org.netbeans.modules.j2ee.earproject.EarProject is not returning instance of
AntArtifactProvider thru lookup(AntArtifactProvider).

AntArtifactProvider implementation similar to one in
org.netbeans.modules.j2ee.ejbjarproject.EjbJarProject will be helpfull in making
ear project part of the Composite App project.
Comment 1 Lukas Jungmann 2006-12-24 00:07:04 UTC
What type[1] of AntArtifact does the Composite App project expects? Is this
defined somewhere? If so, can I ask you to point us to it otherwise something
similar to issue 88528 should be filed against compappproject.

[1]: see javadoc for org.netbeans.api.project.ant.AntArtifact.getType()
Comment 2 _ gmpatil 2007-01-02 23:50:47 UTC
We need AntArtifact of type "ear" from Earproject's AntArtifactProvider which
corresponds to existing ant target "dist" and "clean" of EarProject build-imp.xml.
Ex: 
helper.createSimpleAntArtifact(EarProjectConstants.ARTIFACT_TYPE_EAR,
"dist.ear", evaluator(), "dist", "clean")
 
Since Composite Application Project needs EarProject to expose constants (like
EarProjectConstants.ARTIFACT_TYPE_EAR), I think we need to add our requirement
either to issue 88528 or treat this issue (91501) as a separate one for EarProject.

Comment 3 Roderico Cruz 2007-01-03 01:48:24 UTC
Reassigning to me--Rico
Comment 4 Roderico Cruz 2007-01-04 20:08:52 UTC
Changing priority to P1 because this is needed for Gavotte.
Comment 5 Roderico Cruz 2007-01-04 20:13:38 UTC
Created attachment 37055 [details]
Diff of changes in EarProject.java
Comment 6 Roderico Cruz 2007-01-04 20:14:34 UTC
Fixed in trunk.
Comment 7 Roderico Cruz 2007-01-04 22:59:19 UTC
This has been reviewed and accepted by Vince Kraemer. Ported this to release551.
Comment 8 Radko Najman 2007-01-05 14:08:48 UTC
Reviewed and agreed too.
Comment 9 _ gmpatil 2007-03-22 23:17:40 UTC
Checked with latest 5.5.1 build, lookup is still returning null for
AntArtifactProvider.

Ex: AntArtifactProvider prov =
(AntArtifactProvider)project.getLookup().lookup(AntArtifactProvider.class);
Variable "prov" is null.

Method EjbJarProject.createLookup() may need to instantiate
AntArtifactProviderImpl(). 
Ex:    return Lookups.fixed(new Object[] {
            new Info(),
            aux,
            spp,
            new ProjectEarProvider(),
            new AntArtifactProviderImpl(),

Comment 10 Radim Roska 2007-03-23 09:29:54 UTC
issue is not resolved. according to last comment from Girish Patil.
Comment 11 Petr Jiricka 2007-03-23 13:20:39 UTC
Well, looks like in NetBeans 5.5.1, this was not fixed properly. Class
AntArtifactProviderImpl is there, but it's not used anywhere. Assigning to
Tomas. However, NetBeans 6.0 codebase looks correct. 

It's now too late to fix this in NetBeans 5.5.1, so is it sufficient if this is
fixed in NB 6?
Comment 12 _ gmpatil 2007-03-23 20:04:30 UTC
Fixed in NB 6.0. This will work for me. Thanks
Comment 13 _ gmpatil 2007-03-23 20:06:09 UTC
Verified NB6/Hula build 70319_11