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 121535 - run-single does not check dependencies
Summary: run-single does not check dependencies
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: RELNOTE
: 133674 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-09 07:13 UTC by tkellerer
Modified: 2008-04-30 08:03 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 tkellerer 2007-11-09 07:13:29 UTC
Using j2seproject: 

When I modify a class, and then switch to my main-class and do a run-single, the modified class will not be re-compiled
(thus executing the old .class file). 

This happens even when "Track Java Dependencies" is enabled.

The daily builds from about 2-3 weeks ago (end of October) did not have that problem

This is with JDK 6, Windows XP (daily build from November 4th and November 8th)
Comment 1 Jesse Glick 2007-11-09 09:11:30 UTC
Yes, by popular request. See issue #116230. If you want to do a build first, do a build first. (If you always want this,
override the run-single target in build.xml to depend on compile.)
Comment 2 tkellerer 2007-11-09 09:42:37 UTC
So what is the purpose of the "Track Java Dependencies" property then? 
If it does nothing it should be removed.
Comment 3 Jesse Glick 2007-11-09 12:33:46 UTC
It is used for full builds (F11).
Comment 4 tkellerer 2007-11-10 16:49:21 UTC
So, how would I overwrite run-single in order to call "compile" before it?
Comment 5 Karthikeyan Rajeswaran 2007-11-10 20:16:59 UTC
From http://www.netbeans.org/issues/show_bug.cgi?id=78725 :
   ...Would be nice to have one by default (and a -pre-run-single as well)
   ...You are talking about Java SE projects I guess.
   It is true there is no such hook target. Nevertheless you can simply write...

Baed on the above, something like the following may work:
   <target name="run-single">
     <!-- my stuff, then -->
     <antcall target="PROJNAME-impl.run-single"/>
   </>
Comment 6 Karthikeyan Rajeswaran 2007-11-11 18:21:27 UTC
This issue has been resolved on a thread in nbusers list:
   http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=103446
   
   ...In build.xml you will have to have a target such as this:
   <target name="run-single" depends="compile,JavaApplication1-impl.run-single"/>
   My project name is JavaApplication1, and run-single was first defined in build-impl.xml from the project. It's name
attribute is always the project name with -impl added onto the end. At least this is what I see in NB6. That target ends
up compiling everything and making sure it is all compiled to run a single file. Then it calls the real run-single target.
 
   ...Thanks, works fine...

Regards
Thomas

Comment 7 Jesse Glick 2007-11-12 23:03:15 UTC
Possible release note, I don't know.

Generally there ought to be a page in wiki listing build customizations of general interest and which NB releases they
have been tested on.
Comment 8 Jiri Prox 2008-04-30 08:03:39 UTC
*** Issue 133674 has been marked as a duplicate of this issue. ***