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.
I think it should be possible to add an "Web Project with Existing Ant Script" as a J2EE module to my J2EE Enterprise application. As for now I cant unless I edit the buildscripts manuallly. This would be quite useful when working on an web application in another ide, for example Sun Studio Creator.
Can you describe the changes that you had to do? It looks almost as a bug to me, maybe we can fix it in 4.1. Thanks.
Anyway, I think this is a defect. I expect the problem to be in web freeform not providing artifact with the right flavor. I will have to check..
To make it worh I first created an ordinary web applications in my enterprise project and then my "Web Project with Existing Ant Script". (This step is for keeping the buildfiles intact. If I add or remove rows the IDE wont update the scripts anymore.) Then I added the first, (dummy-web), to my ee application and changed the web project references to my other web-app: project.dummyweb-war=../realweb-war reference.dummyweb-war.dist-ear=${project.dummyweb-war}/dist/realweb.war Then I changed the names of the target ant-targets in build-impl and finally I updated application descriptor to contain my realweb.war.
It is not possible to fix it for 4.1 release. This issue consists of two parts: 1. the way how it is recognized that the project can be added to the Enterprise application should be reimplemented and should be based on project artifact type 2. web freeform project provides only jar artifact type. There is no way how to provide war artifact type in current implementation - missing API. This needs to be discussed and implemented for next release.
Just my 2c - for consistency's sake if we're going to implement this for free-form web modules we should also implement it for EJB modules.
*** Issue 65570 has been marked as a duplicate of this issue. ***
According to last Radko's comments and Marek's comment in issue 65570 FreeForm WebProject has to provide AntArtifacts for it's .war files. So first turn has to be done in webproject -> reassigning. If I misunderstand throw it back, thanks.
OK, I'll look how web artifact can be added to web freeform.
Reassigning to Milan who did the same for EJB freeform (issue #79798).
This might be a little problem, because EAR allows to add only projects that implement J2eeModule and WebFreeform doesn't. Is it intentional?
Created attachment 33491 [details] patch
I've attached patch that assumes J2eeModule in lookup of the web freeform project. The fix is not complete so I've provided only this attachment. If you decide that web freeform will implement J2eeModule, please commit the patch. Probably WebModules class could implement the interface.
Can that be done? I believe this was also discussed in the context of other bugs/features, and one problem we discovered is that it would be necessary to introduce the target server concept for freeform projects, which is probably the right thing to do, but not doable for NetBeans 5.5.
Setting tentatively TM to 5.5.
I did deeper evaluation of this issue and found out that the problem is wider. Web ff project doesn't provide export element for its war output file. Output war file is only added to compilation unit as <build-to> but no export element is created for that. AntArtifact is then not created for the project and build output cannot be added to EAR project. The fix would be to generate <export> element when user adds war file as project output. AntArtifact needs to be of type WebProjectConstants.ARTIFACT_TYPE_WAR_EAR_ARCHIVE (ejb ff project uses EjbProjectConstants.ARTIFACT_TYPE_J2EE_MODULE_IN_EAR_ARCHIVE, IMO both project types could use some shared constant). It might work (guessing just from source) just by providing correct <export> element. If not web ff project then would provide LookupMerger that provides just correct AntArtifactProvider.
I added this as a subissue of the 89477 umbrella (freeform project enhancements). Isn't this an enhancement rather than a defect? I don't think this can be done for 6.0, can it?
Not sure, it looks more like a defect to me. But we could debate about its priority: is this really a P3 when it didn't have any duplicates or votes in more than two years? As for doing for 6.0: it seems to require: 1. implementing a J2eeModule for the web module. Not sure how complete the implementation needs to be. What about the target server and instance? We would need to store them somewhere in project.xml, which would likely need a new schema (one is already in progress because of the WEB-INF-outside-of-web issue). 2. adding export elements for the output war files. This requires knowing the build target mappings and the output files. These are stored in the general freeform and Java data and there is no API for obtaining them. We would need to parse project.xml. Doing this for 6.0 looks too much work for too little gain to me.
moving opened issues from TM <= 6.1 to TM=Dev
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team