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 216684 - Please add a -pre-deps-jar ant target to allow hooking before subprojects are built
Summary: Please add a -pre-deps-jar ant target to allow hooking before subprojects are...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-11 14:57 UTC by i30817
Modified: 2012-08-11 15:46 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
IDE log (143.68 KB, text/plain)
2012-08-11 14:57 UTC, i30817
Details

Note You need to log in before you can comment on or make changes to this bug.
Description i30817 2012-08-11 14:57:23 UTC
Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Linux version 3.2.0-29-generic running on amd64
Java; VM; Vendor = 1.7.0_03
Runtime = OpenJDK 64-Bit Server VM 22.0-b10

I want to populate the libraries dir with ivy as described in http://wiki.netbeans.org/FaqIvy
the code there suggests using -pre-compile and -pre-compile single hooks to call the ivy:retrieve task.
However, if your project depends on other projects in the class path, you probably want to call that once. My clumsy solution was to put in all dependencies on the ivy.xml of the parent project and call that on -pre-init, which works because the dependencies are populated before the other projects are built.

However, this has the problem of being called for all ant targets. In particular it is also called for ant clean, which is a problem for me since i am using debuild -S (which calls ant clean with fakeroot). As it is using fakeroot, ivy user.home changes to /root and retrieve fails since /root is not writable (by fakeroot). The solution is obviously not to call ivy:retrieve when calling the clean target, but that requires another target then pre-init. Something like a -pre-deps-jar
Comment 1 i30817 2012-08-11 14:57:29 UTC
Created attachment 123005 [details]
IDE log
Comment 2 i30817 2012-08-11 15:46:58 UTC
I added a '-pre-deps-jar-init' hook to build-impl.xml
seems to work ok (not called on clean), should really be a default.