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 13294 - Compiling a jarContent with unmounted source silently creates a jar missing that source
Summary: Compiling a jarContent with unmounted source silently creates a jar missing t...
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: jarpackager (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P1 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-29 02:01 UTC by John Baker
Modified: 2003-07-23 02:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baker 2001-06-29 02:01:39 UTC
A jar's contents are removed when
following these steps:


1  Mount a new filesystem Afs
2   Create a package, a
3   Add java class, A.java
4   Compile package
5   Create new jar content, ajar,  containing package a
6   Compile jar content
   
   
   Afs
     a
       A.java
       
     ajar  
     
   
7 Mount new filesystem Bfs
8  Create a new package, b
9  Add main java program, B.java
10 Edit B.java and add  statement, import a.*;      
11 Select ajar and copy paste it to base of filesystem Bfs
    
    Bfs
      b
        B.java
        
      ajar
  
12 Dismount filesystem Afs  
13 Select filesystem Bfs and do Build

Result

Output window says "finished" nothing seemed to be compiled
no B.class file 

ajar.jar now only contains Manifest.

In step 13, if "Build-all" is done then the java file
is compiled, but the jar is emptied.
Comment 1 John Baker 2001-06-29 03:51:11 UTC
Creating the second program is unnecessary.

Simply mount filesystem Bfs and copy the jar from Afs to Bfs.
Next unmount Afs,
select ajar.jar and compile it 

ajar.jar is now empty.
Comment 2 Mike Schilling 2001-06-29 20:06:05 UTC
A warning message is printed.  Unfortuantely, it's printed to the output tab of 
the output window.  Since the compiler window is selected during jar 
compilation it's effectively invisible.
Comment 3 Mike Schilling 2001-06-29 20:08:04 UTC
The warning is now printed to both output and compiler tabs.
Comment 4 John Baker 2002-08-28 21:40:56 UTC
The jar file retains its contents. Jar recipe is marked with a red
badge. This bug had been fixed.

Note that ajar.jar file is also copied to bfs, can be mounted and
B.java will compile.  If the filesystem is selected and a build is
done the jar recipe will also be compiled and this will fail.  If the
jar recipe is deleted then the jar is also deleted, despite ajar.jar
still appearing as a mounted jar archive when in reality it no longer
exists. Consequently, B.java won't compile.
Comment 5 John Baker 2002-08-28 21:42:28 UTC
verified as fixed using 3.3.2
Comment 6 John Baker 2003-07-23 02:13:51 UTC
Reopening to try to mark as verified.
Comment 7 John Baker 2003-07-23 02:14:53 UTC
resolving as fixed.
Comment 8 John Baker 2003-07-23 02:15:12 UTC
verified
Comment 9 John Baker 2003-07-23 02:15:57 UTC
closing - now issue appears as verified.