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 182236 - (Re)Load action causes some of the targets to be called twice
Summary: (Re)Load action causes some of the targets to be called twice
Status: RESOLVED FIXED
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: msmirnov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 15:58 UTC by msmirnov
Modified: 2010-03-31 06:32 UTC (History)
0 users

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 msmirnov 2010-03-17 15:58:29 UTC
Below is the output (targets names only) of build.xml script when (Re)Load action is called:

init-platform-properties:
init-ri-properties:
init-device-properties:
init-keystore:
compile:
create-descriptors:
create-static-pages:
unpack-dependencies:
do-pack:
do-sign:
pack:
build:
init-platform-properties: <- duplicated
init-ri-properties: <- duplicated
init-device-properties: <- duplicated
init-keystore: <- duplicated
build-dependencies: <- does nothing but calling -init again
unpack-dependencies: <- duplicated
do-pack: <- duplicated
Packager:
do-sign: <- duplicated
pack: <- duplicated
load-dependencies:
load-bundle:
Comment 1 msmirnov 2010-03-17 16:03:01 UTC
Suggested fix:

Remove "depends" attribute from <target name="load-bundle">, because it seems that "build" target is executed before it anyway, so there's no need to run initialization and packager again. So instead of 

    <target name="load-bundle" depends="-init,load-dependencies">
        <waitfor>
            <http url="${javacard.device.cardmanagerurl}"/>
        </waitfor>
        <jc-delete failonerror="no"/>
        <jc-unload failonerror="no"/>
        <jc-load failonerror="yes"/>
    </target>

build-impl.xml should contain:

    <target name="load-bundle">
        <waitfor>
            <http url="${javacard.device.cardmanagerurl}"/>
        </waitfor>
        <jc-delete failonerror="no"/>
        <jc-unload failonerror="no"/>
        <jc-load failonerror="yes"/>
    </target>

In such case there's no duplication.
Comment 2 msmirnov 2010-03-17 16:11:27 UTC
Suggested fix:

Remove "depends" attribute from <target name="load-bundle">, because it seems that "build" target is executed before it anyway, so there's no need to run initialization and packager again. So instead of 

    <target name="load-bundle" depends="-init,load-dependencies">
        <waitfor>
            <http url="${javacard.device.cardmanagerurl}"/>
        </waitfor>
        <jc-delete failonerror="no"/>
        <jc-unload failonerror="no"/>
        <jc-load failonerror="yes"/>
    </target>

build-impl.xml should contain:

    <target name="load-bundle">
        <waitfor>
            <http url="${javacard.device.cardmanagerurl}"/>
        </waitfor>
        <jc-delete failonerror="no"/>
        <jc-unload failonerror="no"/>
        <jc-load failonerror="yes"/>
    </target>

In such case there's no duplication.
Comment 3 msmirnov 2010-03-17 16:15:11 UTC
Sorry for comment duplication.
Comment 4 _ tboudreau 2010-03-31 06:25:19 UTC
Mikhail - you mentioned that this was fixed?
Comment 5 msmirnov 2010-03-31 06:32:39 UTC
Right. This issues is fixed as described in Suggested Fix above.