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 60086 - The profiler should support projects with custom build script names.
Summary: The profiler should support projects with custom build script names.
Status: CLOSED WORKSFORME
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: iformanek
URL:
Keywords:
: 60810 65130 (view as bug list)
Depends on: 67207
Blocks:
  Show dependency tree
 
Reported: 2005-06-15 18:33 UTC by iformanek
Modified: 2007-02-20 18:10 UTC (History)
3 users (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 iformanek 2005-06-15 18:33:57 UTC
If the project uses different build script name than the default one 
(build.xml), the profiler does not work with it.
Comment 1 iformanek 2005-06-15 18:36:39 UTC
Will try to address this in M7 if possible.
Comment 2 iformanek 2005-06-16 09:25:29 UTC
Self assign
Comment 3 iformanek 2005-06-20 09:33:34 UTC
Postponing to M8
Comment 4 fuege 2005-06-27 03:49:42 UTC
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.
Comment 5 iformanek 2005-07-13 15:35:32 UTC
*** Issue 60810 has been marked as a duplicate of this issue. ***
Comment 6 iformanek 2005-07-13 15:37:45 UTC
Fixed in Milestone 8
Comment 7 fuege 2005-08-17 03:15:01 UTC
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.
Comment 8 iformanek 2005-08-17 11:50:31 UTC
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.
Comment 9 fuege 2005-08-17 15:45:39 UTC
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>

...

Comment 10 sviyer 2005-10-07 21:04:37 UTC
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
Comment 11 iformanek 2005-10-21 15:50:29 UTC
*** Issue 65130 has been marked as a duplicate of this issue. ***
Comment 12 iformanek 2005-11-07 18:30:07 UTC
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.
Comment 13 sviyer 2005-11-19 09:59:41 UTC
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 ?


Comment 14 sviyer 2005-11-19 11:23:20 UTC
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 ?





Comment 15 iformanek 2005-11-21 08:25:27 UTC
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.
Comment 16 iformanek 2005-11-22 17:59:18 UTC
Sviyer, please provide more info about your setup.
Comment 17 iformanek 2005-12-02 17:45:02 UTC
Closing this issue as unreproducible. Please reopen if you can add more details.
Comment 18 ehucka 2006-10-09 12:12:04 UTC
Verification of old issues.
Comment 19 Alexander Kouznetsov 2007-02-20 10:27:33 UTC
Closing old issues
Comment 20 Alexander Kouznetsov 2007-02-20 18:10:49 UTC
Reverting to original Target Milestone value changed by mistake. Sorry for
inconvenience.