On Wed, May 8, 2019 at 6:25 AM Jaroslav Tulach <[email protected]> wrote: > the Ant support can run with any installed version of Ant, not just the > bundled one.
Yes, this is why NB module code does not directly link against Ant classes except via a small dynamically loaded bridge used when actually running builds. On Wed, May 8, 2019 at 1:33 AM Damjan Jovanovic <[email protected]> wrote: > [I] patched > java/java.freeform/src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.java > to use it to extract Ant targets, search the child XML nodes of the > "compile" target for the "javac" task, and extract more information (eg. > Java version) from it. It worked, but the node attributes I get are from > before Ant's variable substitution, ie. something like "${java.version}" > instead of "1.7". > > Then I patched [1] to perform variable substitution on targets It is not clear to me what you are trying to accomplish here, though I can make some educated guesses and I suspect you are going against the intent of the freeform project type. Really I do not recommend use of `java.freeform` projects at all. If you use Ant as your build tool, and would prefer to write your own build scripts rather than having NB generate and manage them, then in most cases you are much better off using the (relatively) newer `autoproject.java` module, currently in the `contrib` repo I think. No significant GUI configuration or NB-specific metadata files—just open your project, run a “priming” build, and the IDE is ready to go. It would be great if someone could get the `autoproject.*` modules (a) moved into the main repo, (b) installed by default, (c) offered in the UI as the preferred option instead of `*.freeform`. Note that I recommend Maven projects for new development, and some people will guide you to Gradle. Ant is basically legacy. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
