Mon, 8 Jan 2024 13:49:41 -0600, /Neil Aggarwal/:

I am trying to put my Maven command in a batch file so I can click on the icon to run it.
[...]
If I try putting call before the mvn command:

call mvn exec:exec -Dexec.executable="java"
-Dexec.args="-Djava.library.path=C:\OneDrive\Dev\Jacob -cp %%classpath
com.fiscalassets.tax.PrintForm1098s application.properties.FiscalAssets"

pause

I get an error:

Error: Could not find or load main class com.fiscalassets.tax.PrintForm1098s

Caused by: java.lang.ClassNotFoundException: com.fiscalassets.tax.PrintForm1098s

but the pause works.

Anyone know what is happening here?

I'm speculating you may need to double escape the % like (%-tripled):

  -cp %%%classpath

See: https://ss64.com/nt/call.html#advanced

--
Stanimir

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to