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 164990 - Ant target attribute 'unless' property value is set wrong
Summary: Ant target attribute 'unless' property value is set wrong
Status: NEW
Alias: None
Product: soa
Classification: Unclassified
Component: Composite Application (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Venkat Chellasamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-12 18:15 UTC by mrerickiws1
Modified: 2009-05-23 02:14 UTC (History)
2 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 mrerickiws1 2009-05-12 18:15:56 UTC
In build-impl.xml build files, I have noticed that the 'unless' attribute on an Ant target is not being set correctly.

I am using the latest version of NetBeans 6.1.

On the target element, the 'unless' attribute is set to use a property value, not the property name:
   <target name="some-name" depends="dependency-list" unless="${property-name}"> ... </target>
it should be:
   <target name="some-name" depends="dependency-list" unless="property-name"> ... </target> (no dollar sign and curly
braces)

This may also be an issue with the 'if' attribute as well. 'if' uses the property name, not the property value as well.

This causes the target to be executed when it shouldn't be executed. So far, I have seen this problem with the
no.dependencies property. I have seen this problem across multiple projects and project types (BPEL, EJB, SA).
Comment 1 Milos Kleint 2009-05-13 08:51:33 UTC
reassigning to ejbjar project type, as it's one of the mentioned ones. after fixing please reassign to the other types.
Comment 2 Petr Jiricka 2009-05-13 13:27:12 UTC
When I create a plain EJB project from scratch, I don't see any problem like that. Can you please attach the exact code
snippet of build-impl.xml that illustrates this problem?

Do you use your EJB project as a part of a SOA application? If you do, then I believe SOA enhances the EJB project's
build script, so this could be fully a SOA-related problem.
Comment 3 Petr Jiricka 2009-05-13 17:21:53 UTC
Based on the info I got from the reporter privately, the property in question is ${project.related-proj_BPEL}. So this
is SOA-related, reassigning.
Comment 4 Petr Jiricka 2009-05-16 09:56:01 UTC
Here is the full info from the reported and a snippet of build-impl.xml:

    <target name="-deps-jar-dist" depends="init" unless="${no.dependencies}"> 
        <ant target="dist_se" inheritall="false" dir="${project.related-proj_BPEL}"/> 
    </target>

    <target name="-deps-clean" depends="init" unless="${no.dependencies}"> 
        <ant target="clean" inheritall="false" dir="${project.related-proj_BPEL}"/> 
    </target>

This snippet belongs to a BPEL project that is part of a web service. There are EJB and Service Assembly projects as
well for this web service.

The 'related-proj' web service project also consists of BPEL, EJB & Service assembly projects.