java - Is there any way to excute a batch file from maven configuration? -


I have a .bat file that executes some prerequisites for building my Maven project

Is there any way to do this work with Maven?

p> I saw another question about something similar, but my problem was not resolved.

The next and flexible way to execute a batch file as part of the most straightforward Maven build process And have to use the work. To run a Windows executable as an example, consider the following code:

   & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Signing & lt; / Id & gt; & Lt; Step & gt; Package & lt; / Step & gt; & Lt; Goals & gt; & Lt; Goal & gt; Run & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Configuration & gt; & Lt; Functions & gt; & Lt; Exec executable = "$ {env.WIN7BASE} \ bin \ autosave \ inf2cat.exe" & gt; & Lt; Arg row = "/ drv: $ {project.build.directory} \ classes / os: Vista_X86" /> & Lt; / Executive & gt; & Lt; Exec executable = "$ {signtool}" & gt; & Lt; Arg line = "sign / v / a / t http://timestamp.verisign.com/scripts/timestamp.dll $ {project.build.directory} \ classes \ $ {project.name} .cat" /> & Lt; / Executive & gt; & Lt; / Functions & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt;  

Comments