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.
Build 20050419-1108 1) Have 4.0 WebApp which uses project/external JAR or library (as broken references) 2) Project's context menu | Resolve Reference Problems 3) Resolve all reference problems 4) ERROR: build-impl.xml doesn't contain resolved references, i.e. those JAR files will not be part of WAR file.
Similar problem arises when moving project using a library from Library manager from another computer. See these steps: 1) Have WebApp which uses a library from Library Manager Note: see that nbproject/private/private.properties contains file references like: libs.MyStruts.classpath.libfile.1 2) Move it to different computer 3) Start IDE on new computer 4) Open WebApp project 5) Resolve broken reference (i.e. create library in Library Manager) Note: see that nbproject/private/private.properties still DOESN'T contain file references like: libs.MyStruts.classpath.libfile.1 6) Clean and Build 7) ERROR: build fails with error (because of missing library files references) library-inclusion-in-archive: D:\NetBeans\...\Web Application2\nbproject\build-impl.xml:378: Warning: Could not find file D:\NetBeans\...\Web Application2\${libs.MyStruts.classpath.libfile.9} to copy. Workaround for both test cases is: open project's properties and press OK.
More information about 4.0 application scenario: I1) Have 4.0 WebApp which uses Java Project, external JAR file and library from Library Manager (which is not in 4.1 Library Manager) I2) Open 4.0 WebApp in 4.1 I3) Project's context menu | Resolve Reference Problems I4) Upgrade dialog appears -> Upgrade Note: nbproject/private/private.properties - doesn't contain library files references: libs.Struts.classpath.libfile.1 - contains old references to JavaProject JAR and external JAR I5) Resolve references = browse external JAR, browse Java Project, create library in Library Manager Note: nbproject/private/private.properties - still doesn't contain library files references (it's ERROR) - contains new references to JavaProject JAR and external JAR (it's OK) nbproject/build-impl.xml - stays unchanged (it's ERROR) I6) Resolve Missing Server problem I7) Clean and build ERROR: - ant target succeess, - but created WAR file doesn't contain any JAR (nor external nor from Java project nor from library) I8) Open project's Properties -> press OK. Note: nbproject/private/private.properties - contains additional javac.debug=true and javadoc.preview=true (is it error that it is not added in step I5?) - contains additional library files references (it's OK) nbproject/build-impl.xml - additional content: - target library-inclusion-in-manifest contains all JAR files references (basename and copy) - target library-inclusion-in-archive contains all JAR files copy
Is this also an issue for other J2EE projects like EJB or Ent App?
I added call to WPP after the references are resolved, this should refresh the references in private properties correctly. If works in the example I got from Karel (I create a fake Struts library with 2 jar file for testing). I agree this is a candidate for merge into release41 if my fix works in all cases Karel has. Radko and/or Marku, please review. Thanks. I can see the same problem in ejb project. I will see if the same fix can be applied there.
Created attachment 21745 [details] diff
Verified by QE in trunk build 20050420-0434.
I reviewed the proposed fix and agree with it.
I reviewed the fix and it seems to be OK to me.
BTW: the fix is still not ideal (see issue 58103 for remaining problems). Although I agree that this solution is good enough for 4.1.
Pavle, could you please integrate the fix into release41 branch? Thanks.
merged to release41 Checking in src/org/netbeans/modules/web/project/ui/WebPhysicalViewProvider.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/WebPhysicalViewProvider.java,v <-- WebPhysicalViewProvider.java new revision: 1.26.2.2; previous revision: 1.26.2.1 done
Reopening - the fix in release41 branch doesn't work. The commit place is different from trunk commit.
BTW: Fixes of issue 58078 and issue 58079 are OK.
In the release41 branch, the call to WebProjectProperties.save() was introduced in the BrokenServerAction.checkMissingServer() instead of the BrokenLinksAction.run() method. I will fix it.
Integrated the correct fix in release41: Checking in WebPhysicalViewProvider.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/WebPhysicalViewProvider.java,v <-- WebPhysicalViewProvider.java new revision: 1.26.2.3; previous revision: 1.26.2.2 done
Verified in custom release41 build.
Verified in 200504291131 release41 build.