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 251142 - Don't call into dependant projects when their artifacts exist
Summary: Don't call into dependant projects when their artifacts exist
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-13 08:19 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:13 UTC (History)
1 user (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 Jaroslav Tulach 2015-03-13 08:19:28 UTC
I am working with Graal sources 
http://hg.openjdk.java.net/graal/graal
from NetBeans IDE and it is a pain.

They can modular system with dependencies between projects, but are using classical J2SE Ant project type (generated from some meta info by)

$ mx.sh netbeansinit

Even when things are up-to-date any action on the project (build, run) takes enormously long as it calls into all dependant projects. We have eliminated this in NetBeans own projects by skipping execution on projects that seem to be built. I believe I can do it with:

        <target name="-post-init">
            <pathconvert property="comma.javac.classpath" pathsep=",">
                <path path="${javac.classpath}"/>
            </pathconvert>
            <restrict id="missing.javac.classpath">
                <filelist dir="${basedir}" files="${comma.javac.classpath}" />
                <not><exists/></not>
            </restrict>
            <property name="missing.javac.classpath" refid="missing.javac.classpath"/>
            <condition property="no.dependencies" value="true">
                <equals arg1="${missing.javac.classpath}" arg2=""/>
            </condition>
            <property name="no.dependencies" value="false"/>
        </target>

I believe this should be the default for all J2SE projects. In case somebody really wants deep build (only build, I don't think deep clean makes any sense), there could be "Build with Dependencies" action like on Maven projects that would call ant build -Dno.dependencies=false overriding any automatic checks.
Comment 1 Jaroslav Tulach 2015-03-13 08:23:00 UTC
Discussed with Tomáš and also on Graal mailing list:
http://mail.openjdk.java.net/pipermail/graal-dev/2015-March/002957.html
Comment 2 Tomas Zezula 2015-03-13 09:42:51 UTC
I will take a care.
Comment 3 Jaroslav Tulach 2016-05-25 06:13:35 UTC
I fixed the problem in a different way.