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.
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.
Do you mean the <references> node? <web-module-libraries> node has no influence
on the order afaik.
Yes, the <references> node. Should work in Java SE projects, anyway. I know less
about web projects.
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.
(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.
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.
*** This bug has been marked as a duplicate of bug 42683 ***