Need to write a batch file to build project using maven

Posted on 2011-04-21
Last Modified: 2012-05-11
I am building and Deploying a multi module project. I need to write a batch file to build and deploy the project.
I am trying something like followng in my bat file:

cd "C:\Projects\java\com.radsdk.protocols"
mvn install
cd "C:\Projects\java\com.radsdk.framework"
mvn install

But I am not able to execute this. It installs one module but do nothing for the another module. I am new to Maven. Is there any better way to bulid and deploy application using maven?
Question by:MeenuNagpal
    LVL 86

    Accepted Solution


    call mvn install

    LVL 20

    Expert Comment

    by:Amitkumar Panchal

    Also try the following by adding it in your batch file.

    pushd "C:\Projects\java\com.radsdk.protocols"
    mvn install
    pushd "C:\Projects\java\com.radsdk.framework"
    mvn install

    Author Closing Comment

    This worked perfectly fine for me
    LVL 86

    Expert Comment


    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    JVM encoding. How to change encoding. 27 55
    json format text only 4 50
    ArrayLists in ArrayLists/HashMaps? 4 30
    mapShare challenge 13 41
    VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now