Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Why does batch file not launch the next command?  (Read 2970 times)

0 Members and 1 Guest are viewing this topic.

sipungora

    Topic Starter


    Rookie

    Why does batch file not launch the next command?
    « on: September 12, 2008, 05:35:43 PM »
    Hi,

    I'm trying to build my project and copying jar into destination with batch file.  ;D
    Unfortunately after mvn clean install jar will not be copied. Why? And how can I solve this problem? ???
    After mvn clean install there is copy source destination in batch file, but the last one will not be run. >:(

    Thanks beforehand,
    regards, sipungora.

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: Why does batch file not launch the next command?
    « Reply #1 on: September 12, 2008, 08:10:14 PM »
    Very difficult (impossible?) to tell without viewing your code.

    One good deed is worth more than a year of good intentions.

    sipungora

      Topic Starter


      Rookie

      Re: Why does batch file not launch the next command?
      « Reply #2 on: September 13, 2008, 02:53:41 AM »
       ;D
      Code: [Select]
      mvn clean install
      copy target\a.jar D:\srv\app /y/v

      Dusty



        Egghead

      • I could if she would, but she won't so I don't.
      • Thanked: 75
      • Experience: Beginner
      • OS: Windows XP
      Re: Why does batch file not launch the next command?
      « Reply #3 on: September 13, 2008, 03:37:45 AM »
      Sorry, my knowledge of maven is lacking. 

      Can you ensure that the jar is being written, I have read that your first line fails (here.).

      Perhaps it would be better for you to address your query to one of the mvn forums here.

      Good luck
      One good deed is worth more than a year of good intentions.

      sipungora

        Topic Starter


        Rookie

        Re: Why does batch file not launch the next command?
        « Reply #4 on: September 13, 2008, 06:28:46 AM »
        Eauch code line alone can easy be run and returns a correct results.  :) But together first line can only be run, then nothing happens.  :-\

        fireballs



          Apprentice

        • Code:Terminal
        • Thanked: 3
          Re: Why does batch file not launch the next command?
          « Reply #5 on: September 13, 2008, 06:43:34 AM »
          if that's the case maybe the first line hasn't finished executing before the second tries to. how about a wait inbetween the two?

          Code: [Select]
          ping /n 5 127.0.0.1>Nul
          FB
          Next time google it.

          Dusty



            Egghead

          • I could if she would, but she won't so I don't.
          • Thanked: 75
          • Experience: Beginner
          • OS: Windows XP
          Re: Why does batch file not launch the next command?
          « Reply #6 on: September 13, 2008, 05:47:36 PM »
          Would putting both commands on one line separated by && be successful?

          Quote
          mvn clean install && copy target\a.jar D:\srv\app /y/v



          One good deed is worth more than a year of good intentions.