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 # : 200807291401 ] [ JDK VERSION : 1.6.0_07 ] I have a big project based on https://genesis.dev.java.net/ and for 6.5 all of my builds the jars are generated. For previous versions it didn't happen. Maybe it is something about Compile on Save misbehaviour? All my packages are marked as outdate, as below: XXX.YYYY added as XXX.YYYY/ is outdated. But, if I run the target on console, everything is ok, no jars are generated.
Michel, could you describe the scenario in more details? Why P1? http://wiki.netbeans.org/BugPriorityGuidelines jlahoda, could it be Compile on Save?
My project when I compile using NetBeans 6.5, some of my jars are regenerated. If I use ant on command line or nb 6.1, this not happen. I had no idea why is happen, but the jars are just regenerated if something is changed. There is something in nb 6.5 changing the folders just before the build. If I have nb 6.5 and 6.1 opened in the same time, I can rebuild the application several times on 6.1, and the problem don't happen, so, I understand that there is no 'background' operations running, it is just before the build, at least it is my impressions. What kind of info I can provide for you? Product Version: NetBeans IDE Dev (Build 200808111401) Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22 System: Linux version 2.6.24-19-generic running on i386; ISO-8859-1; pt_BR (nb) Userdir: /home/hmichel/.netbeans/dev
I found the problem. The problem is the ANT 1.7.1 with NetBeans 6.5. If I change my NetBeans 6.5 to work with ANT from NetBeans 6.1 everything works great. Any idea about it? If I use the ANT 1.7.1 from 6.5, even from command line, the problem happen. Regards
AFAIK, there are no plans to rollback the ant to 1.7.0. Could you look at the http://www.apache.org/dist/ant/RELEASE-NOTES-1.7.1.html When/where are the jars created? After Save or when you use Clean&Build?
I tried this: -checked-out the sources from https://genesis.dev.java.net/ -tried to build ("ant") the "ant-tasks" subproject, from command line (no IDE involved), using ant 1.7.0. Each time I built the subproject, I got a new output jar. So, I am not sure if this is in any way related to the IDE. Could you please described what exactly are you trying to do? When Compile on Save is enabled, the first time user Runs the project, the output folder is populated with IDE-generated .class files. The .class files have intentionally broken timestamps, so that if the project is built from the command line, the .class files are regenerated. But this should happen only once. J2SE Projects force "clean" in this case (only once again, if you do "build", "build", "build", only the first one should be forced "clean" due to compile on save, and only if the project has been Run using the compile on save before).
I am using a free form project. The problem happen just when building the application. I tried it with a small application but the problem don't happen. I am trying to create a project to simulate it. For now, I am using the ant 1.7.0 from 6.1 (I change my default ant at nb 6.5), and I really think that the problem is on ant. (the ant on NetBeans is a modified version?) I saw that ant 1.7.1 have some optimizations for large filesets... I will try to investigate it. What really is awkward the fact that jars are rebuild because some folders are out to date. All classes and resources are up to date for ant, but no details about it is shown on output. I already checkout the project again to try it, but no changes on build behaviour. About Compile on Save, I don't thing anymore it is the case, because changing the ant the problem is solved, so, if no change on ant was made, the behaviour should be the same with both ant versions. Any ideas how can I get more details, or how test it is appreciated. Regards
ant seems to be a better place.
It is certainly possible that some internal change in Ant 1.7.1 broke timestamp calculations under some conditions. If you can create a self-contained reproducible test case then it can be investigated.
michel, do you still face this issue with latest builds? There used to be some other bugs fixed in the parsing of the jars. Please, reopen if it happens still
Yes, it is valid yet. But the problem I think is about ant, since I can reproduce it from command line tool, but just for some projects. I will try to create a small use case to reproduce it asap, but no much time to do it, and all the tests I tried before didn't work as I expected. For now I am using Ant from nb 6.1... no way to use ant from nb 6.5.
Hi, I hope I can reproduce it know. First of all, get genesis project from https://genesis.dev.java.net/files/documents/2063/98275/genesis-all-3.1.tar.gz I will attach a example project with the problem. Just unzip it on genesis-3.1/samples folder. Open this nb project on IDE and press F11 some times, and you will see that jars and ear are recreated. But, sometimes just the jar is rebuilt (don't ask me why...). It is a really non deterministic problem, but don't happen before ant 1.7.1. I hope you now can reproduce it and any thing I additional info you need, just let me know. btw, it is a P1 because it is a regression.
Created attachment 70688 [details] Sample broken project
Created attachment 70689 [details] SWT linux to compile the project on Linux. Put it in genesis-3.1/genesis/lib/swt
I attached swt linux lib too because it is a example with swt too. Regards
I will look at it. Certainly not P1, perhaps P3 if few people are affected; the symptom is not that terrible, and you can always choose to use Ant 1.7.0 if you prefer.
Able to reproduce eventually (could not at first). Setting filesonly="true" on <jar> in samples/admin/master_build.xml cures the issue.
I think there is something wrong with the handling of filesonly="false" (the default setting), though it is very difficult to reproduce on your example, and your script is so complex that I can scarcely follow what it is trying to do, much less come up with a minimal test script. I filed https://issues.apache.org/bugzilla/show_bug.cgi?id=45902 with a suggested fix in Ant code, but I don't have enough background to know whether it is really right.
Yes, this works for now. I know that the example is really complex, but it is really hard to reproduce in a "small" sample. BTW, about priority, for my, following the guidelines, any regression is a P1, even with a workaround or for third party API, since a IDE feature is no more working correctly as before. BTW, I had a more complex variant of this script where I put filesonly="true" for some <zip> too. Thanks for your quickly answer.