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 103490 - Sorting <ant ...> calls in 'deps-module-jar' target according to project settings
Summary: Sorting <ant ...> calls in 'deps-module-jar' target according to project sett...
Status: RESOLVED DUPLICATE of bug 42683
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
Depends on:
Reported: 2007-05-08 16:15 UTC by fordfrog
Modified: 2010-11-05 13:52 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description fordfrog 2007-05-08 16:15:34 UTC
It would be great if <ant ...> calls in 'deps-module-jar' target in
build-impl.xml were sorted according to the order as they appear in project's
libraries settings instead of alphabetically. The reason is developers could use
the order in libraries settings of project to optimize the build speed of the
project. I'll describe it on my current problem.

I have a main project that uses about 50 small to large libraries. Some of the
libraries also depend on other libraries from this set. If I have in all those
projects checked 'Build projects on classpath' then the build takes about 15
minutes because several libraries are checked to be built several times which is
very inefficient. When I disabled 'Build projects on classpath' in all libraries
and left it checked just in the main project, the building doesn't work as the
order of the build of the libraries is alphabetical which doesn't work in this
case. I modified build-impl.xml of the main project in that way that I ordered
<ant ...> calls in 'deps-module-jar' target in the order of dependency. After
this modification the build takes about 40 secs. Unfortunately sorting the
projects in the libraries settings has no influence on how are the related <ant
...> calls ordered in 'deps-module-jar' target.

So it would be really great if <ant ...> calls in 'deps-module-jar' target (and
possibly also 'deps-ear-jar') were ordered according to the order of referenced
projects in libraries settings of project instead of alphabetically.
Comment 1 Jesse Glick 2007-05-22 23:09:36 UTC
If you want to set a different order, you can do so directly in project.xml, and
build-impl.xml will use that order. The root problem is rather issue #42683.
Comment 2 fordfrog 2007-05-23 13:10:09 UTC
Do you mean the <references> node? <web-module-libraries> node has no influence
on the order afaik.
Comment 3 Jesse Glick 2007-05-23 18:16:51 UTC
Yes, the <references> node. Should work in Java SE projects, anyway. I know less
about web projects.
Comment 4 lolo_101 2010-11-04 16:54:46 UTC
I understand this is not a high-priority enhancement. However sometimes a subproject is build, then the build of the next subproject cleans it, delaying the overall build and even make it fail in some circumstances.

Intuitively, subprojects should be built in the order specified in the project properties panel, no one should have to edit project.xml by hand.

I permit myself to reopen this RFE. Don't hesitate to tell if this is wrong.
Comment 5 Jesse Glick 2010-11-04 20:24:51 UTC
(Never update the Version field forward.)

(In reply to comment #4)
> sometimes a subproject is [built], then the build of the next subproject cleans it

No clue what you're talking about here; building one project should not clean another. Attach a complete, self-contained test case for evaluation.
Comment 6 lolo_101 2010-11-05 10:44:35 UTC
Ok, ok. It's my bad.

I was trying to craft a test project to reproduce the issue because I have an actual project which fails to build and I cannot attach it as is.

Then I found what caused the failure : one of the subproject has the "build projects on classpath" unchecked. Hence it didn't rebuild it's dependencies that was cleaned by the previous step.

I checked the box and now everything works fine... I'm very sorry for the disturbance.
Comment 7 Jesse Glick 2010-11-05 13:52:05 UTC
No problem.

*** This bug has been marked as a duplicate of bug 42683 ***