How to create .bat file in maven project

1,024 views
Skip to first unread message

Saikumar Korada

unread,
Sep 26, 2018, 5:19:42 AM9/26/18
to Selenium Users
How to create .bat file in maven project

Suresh babu

unread,
Sep 26, 2018, 7:27:50 AM9/26/18
to seleniu...@googlegroups.com
Hi,

Your folder structure should be as below
Project—>lib folder—> add all jars here
Project—> bin—>empty folder
Project—>src->test cases—> testcases here

Add the below command in notepad and save the file with .bat (ex: run.bat)

Java -classpath /tmp/project/lib*:/tmp/project/bin org.testng.TestNG/project/testNg.xml


Regards,
Suresh.

On Wed, 26 Sep 2018 at 2:49 PM, Saikumar Korada <saikumar...@gmail.com> wrote:
How to create .bat file in maven project

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4034dcd6-cea4-406e-b3f2-22b1ea3b0514%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saikumar Korada

unread,
Sep 26, 2018, 9:14:59 AM9/26/18
to seleniu...@googlegroups.com
Hi Suresh,

We are using maven project in that we are using all the dependencies in pom file. Here where is the concept of adding jars.

On Wed, Sep 26, 2018, 6:07 PM Suresh babu <sureshk...@gmail.com> wrote:
Boxbe This message is eligible for Automatic Cleanup! (sureshk...@gmail.com) Add cleanup rule | More info
Hi,

Your folder structure should be as below
Project—>lib folder—> add all jars here
Project—> bin—>empty folder
Project—>src->test cases—> testcases here

Add the below command in notepad and save the file with .bat (ex: run.bat)

Java -classpath /tmp/project/lib*:/tmp/project/bin org.testng.TestNG/project/testNg.xml


Regards,
Suresh.

On Wed, 26 Sep 2018 at 2:49 PM, Saikumar Korada <saikumar...@gmail.com> wrote:
How to create .bat file in maven project

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4034dcd6-cea4-406e-b3f2-22b1ea3b0514%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Suresh babu

unread,
Sep 26, 2018, 10:23:19 AM9/26/18
to seleniu...@googlegroups.com
Can u give a try with below commands in bat file

Call mvn clean
(Or)
mvn test

Thanks,
Suresh.


Suresh babu

unread,
Sep 26, 2018, 10:33:08 AM9/26/18
to seleniu...@googlegroups.com
Can u give a try with below commands in bat file

Call mvn clean
(Or)
mvn test

Ex:
Set projloc= path of your project 
cd %projlocation%
Call mvn clean (here command may vary)

Saikumar Korada

unread,
Sep 26, 2018, 4:38:27 PM9/26/18
to seleniu...@googlegroups.com
I didn't get.

On Wed, Sep 26, 2018, 8:36 PM Suresh babu <sureshk...@gmail.com> wrote:
Boxbe This message is eligible for Automatic Cleanup! (sureshk...@gmail.com) Add cleanup rule | More info
Can u give a try with below commands in bat file

Call mvn clean
(Or)
mvn test

Thanks,
Suresh.



For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

sanjeev kumar

unread,
Oct 16, 2018, 12:42:39 AM10/16/18
to Selenium Users
make sure that you have added the surefire plugin in maven pom.xml file.

Save the command 'mvn -test 'SuitesXmlFiles='testng.xml''' with bat file

⇜Krishnan Mahadevan⇝

unread,
Oct 16, 2018, 12:45:05 AM10/16/18
to seleniu...@googlegroups.com
>>>>>make sure that you have added the surefire plugin in maven pom.xml file.

Maven surefire plugin would be by default available to all maven projects via the super pom because all pom files inherently extend from the super pom. 


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply all
Reply to author
Forward
0 new messages