-
Syntax for execution
smn exec:java -Dexec.maincloss="com.nt.module MainClassName"
Execution: D:\maven\GenerateSqrRoot>mun exec;java -Dexec.mainClass="com.nt.SqrRoot”
\naven\GeneratesqrRoat>mun exec: java ~Dexec.nainclass="con.nt-SarRoot™
(Enro] Scanning for projects.
FINE
FINO:
INFO] Building GeneratesqrRoot 1.0-SNAPSHOT
FINE:
INFO.
[xNro] --~ exec-maven-plugin:1.4.0:java (defauTt-cli) @ GeneratesgrRoot
ater nunber to find ies square root:
Let’s explore more ways to run the same project.
Now, if you want to execute the execijava goal as part of your standard build, you'll need to bind the goal
to a particular phase of the default lifecycle. To do this, declare the phase to which you want to bind the
goal in the execution element:
‘A Practical Approach To Learn Maven,
4,Naresh Technolsies maven by Mr. Natara & Team
For is werneed to spechy cphose> iphase of your choke Me paclage, test cic) and goa tape |
pom.xml. So, the changed pom.xml looks like the following.
In pom.xml
bul
arousing colehous moje ouslt>
cortectzerecmover pig fertoce>
verion>14.0/resion>
stomp erecsonchts