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 192463 - Projects which are runtime dependencies for testing another project are not built
Summary: Projects which are runtime dependencies for testing another project are not b...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-25 11:53 UTC by aldobrucale
Modified: 2010-11-27 06:25 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 aldobrucale 2010-11-25 11:53:15 UTC
In the properties/libraries pane for a Java SE project, adding another project in the "Run test" tab, it is not built before running the tests.

A possible workaround is adding

<target name="-pre-compile-test">
    <antcall target="-maybe-call-dep">
        <param name="call.built.properties" value="${built-jar.properties}"/>
        <param location="${project.my_runtime_dependency}" name="call.subproject"/>
        <param location="${project.my_runtime_dependency}/build.xml" name="call.script"/>
        <param name="call.target" value="netbeans"/>
        <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
    </antcall>
</target>

but it took me a while to find this.
Comment 1 Tomas Zezula 2010-11-25 15:02:56 UTC
The problem is that you have override the compile target without setting the dependencies (look into the build-impl.xml).
I will enforce the deps-jar in all the -do-compile*
Comment 2 Tomas Zezula 2010-11-25 15:13:54 UTC
Fixed jet-main 8291897458c0
Comment 3 aldobrucale 2010-11-25 16:31:50 UTC
(In reply to comment #1)
> The problem is that you have override the compile target without setting the
> dependencies (look into the build-impl.xml).
> I will enforce the deps-jar in all the -do-compile*

I'm not sure I've understood your answer. The "-do-compile-test" and "-do-compile-test-single" target already depended compile, which in turn depends on deps-jar, so I don't think that the behavior changes after this changeset... The deps-jar target only builds the compile-time dependencies, which is the right thing to do before the compilation step. The solution to my problem would be having the "-pre-test-run" target build the runtime dependencies.
Comment 4 Tomas Zezula 2010-11-25 21:23:34 UTC
In the vanilla project (nothing is overridden) the dependent compile works fine for project on test run cp.
But when the compile is overridden the -do-compile-test (-do-compile-test-single) calls the overridden compile which may not specify the dependency on deps-jar and it's the only place where this dependency is specified.
Comment 5 Quality Engineering 2010-11-27 06:25:11 UTC
Integrated into 'main-golden', will be available in build *201011270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8291897458c0
User: Tomas Zezula <tzezula@netbeans.org>
Log: #192463:Projects which are runtime dependencies for testing another project are not built