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.
If the project uses different build script name than the default one (build.xml), the profiler does not work with it.
Will try to address this in M7 if possible.
Self assign
Postponing to M8
The profiler is only accepting the build script in NB's project directory, but I used to store it elsewhere, which is no problem to integrate in a NB's freeform 'project.xml'. So, it would be very helpful to define the (name AND path) of the build script in a profiler property that's read within the project.xml's 'profiler' node (currently 'data' - which I can't find in the corresponding xml-schema?!) or the 'general-data' node. Sample 'project.xml': <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://www.netbeans.org/ns/project/1"> <type>org.netbeans.modules.ant.freeform</type> <configuration> <data xmlns="http://www.netbeans.org/ns/profiler/1" profile-file- target="profile-single" profile-target="profile" version="0.4"/> <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> <name>MyProject</name> <properties> <!-- HERE is the entry point for all project initialization (including the build script's location)! --> <property-file>nbproject/project.properties</property-file> ... BTW, I worked around the problem with a second build script importing the original one, so 'Profile Main Project' works.
*** Issue 60810 has been marked as a duplicate of this issue. ***
Fixed in Milestone 8
Fine. I read about it in m8 "What's new". But: How to do it? Can You please give a hint on that topic, I haven't found anything in the docs.
Evrything should work automatically. If your specify a custom build script name/location in the freeform project, and Run project works with this build script, so will the Profile project.
Doesn't work ("Cannot determine build script for project ...") although in "Project|Properties" the correct (absolute) path to the project's build.xml is displayed. Any further hint? Please look again at my project.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://www.netbeans.org/ns/project/1"> <type>org.netbeans.modules.ant.freeform</type> <configuration> <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> <name>MyProject</name> <properties> <!-- HERE is the entry point for all project initialization (including the build script's location)! --> <property-file>nbproject/project.properties</property-file> <!-- Here: ${ant.script}=[path-to-the-real]/build.xml is defined, so that it can be used in action definitions. --> ... <ide-actions> <action name="run"> <script>${ant.script}</script> <target>run</target> </action> ...
Last time I tried this was in NB 4.1 long time ago. Tried again with NB 5.0 Beta and Milestone 9 yesterday. Profiler still looks for build.xml
*** Issue 65130 has been marked as a duplicate of this issue. ***
Fixed in M10/NB 5.0 Beta 2. The profiler now receives the build script file directly from the freeform project via its (new) API.
Does not work in 5.0 Beta 2 and M10; message "Cannot determine build script for Project: XYZ" I have a similar setup as fuege has described. Except that the build file name comes via a property in the property file. The rest of NB 5.0 does not mind this. Why is the Profiler code struggling to find the build file name since ver 4.1 ? !! Has a scenario where the build file name comes via an inline property setting or via a property file been tested with M10 ?
In fact I am not sure why the profiler even cares about the build file name. The way the rest of NB5.0 seems to work is by reading the project.xml. For e.g. the Run Project context menu action, loads the project.xml and just runs whatever the "run" action is mapped to ? The mapping can be hardcoded file-path or a file referenced via a property name. Why is the implementation of "Profile Project" and "Profile Single" different from the rest ? Why can't it just have "action to target" mappings in the ide-target-file.xml like the rest of NB ?
The profiler, starting with M10, *does* use the same approach as the rest of IDE. Before M10 there was no API in Freeform project to determine the value of the build script, and the profiler was approximating the build script location by reading the project.xml directly (which was failing exactly because it was an approximation reading file format that was not open). In M10, this should not fail anymore. If you attach more details and/or your project.xml, we'll be able to help. Without more details I cannot do anything.
Sviyer, please provide more info about your setup.
Closing this issue as unreproducible. Please reopen if you can add more details.
Verification of old issues.
Closing old issues
Reverting to original Target Milestone value changed by mistake. Sorry for inconvenience.