Since I did not see a reply...
Yes, you would need to set some kind of default ant.basedir variable in
your build.xml and pass it via maven.
You can pass properties:
https://maven.apache.org/plugins/maven-antrun-plugin/run-mojo.html
Better rewrite as much of it as possible into Maven plugin executions.
It will also make your build faster and more reliable.
- Ben
On 15/08/2025 15:47, Joseph Kesselman wrote:
I have an old ant build (xalan-test) which has custom tasks and tools that made
bad assumptions about the build having been invoked from the basedir.
I could rewrite them all to explicitly fetch)be passed the basedir and result
file paths relative to it, but since my focus is on the maven build that will
be triggering this, that's an annoying digression. Or, to put it another way,
ugh, not right now, please; the test framework could benefit from
rationalizing/updating but that's a different work item.
The best alternative I see is to switch from using the <antrun> task to using
<exec> to invoke ant via a command line that includes the needed changedir. But then
I think I run into platform sensitivities in invoking that command/script/whatever. Unless,
perhaps, I rattle off another flavor of Java exec helper tool.
I'm sure I'm not the first to have run into current directory sensitivity. Does
anyone have a better workaround?
--
/_ Joe Kesselman (he/him/his)
-/ _) My Alexa skill for New Music/New Sounds fans:
/ https://www.amazon.com/dp/B09WJ3H657/
Caveat: Opinionated old geezer with overcompensated writer's block. May be
redundant, verbose, prolix, sesquipedalian, didactic, officious, or redundant.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]