Batch stops and prompts me

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
nicdo77
Posts: 2
Joined: 14 May 2010 05:23

Batch stops and prompts me

#1 Post by nicdo77 » 14 May 2010 05:27

Hello

I have a little problem
I created a batch i named mvncp.bat, helping me to launch a sequence of maven commands
The batch is liek this

Code: Select all

mvn clean
mvn package


Problem is, the batch stops after the first line and prompts me. Im expecting it to execute the second instruction automatically but that is not what it does.

Code: Select all

[b]C:\workspaces\Bra_Cat_SplashTool_Core>mvncp.bat[/b]

[b]C:\workspaces\Bra_Cat_SplashTool_Core>mvn clean[/b]
[INFO] Scanning for projects...
[INFO] snapshot com.buongiorno.gpp.wwf.portlets:cat-dependencies:1.0.0-ALPHA-SNAPSHOT: checking for updates from buongio
rno
Downloading: http://artifactory.buongiorno.com/artifactory/repo/com/buongiorno/gpp/wwf/portlets/cat-dependencies/1.0.0-A
LPHA-SNAPSHOT/cat-dependencies-1.0.0-ALPHA-SNAPSHOT.pom
[INFO] snapshot com.buongiorno.wwf:wwf-platform:2.4-ALPHA-SNAPSHOT: checking for updates from buongiorno
Downloading: http://artifactory.buongiorno.com/artifactory/repo/com/buongiorno/wwf/wwf-platform/2.4-ALPHA-SNAPSHOT/wwf-p
latform-2.4-ALPHA-SNAPSHOT.pom
[INFO] snapshot com.buongiorno:group-base:5.0-SNAPSHOT: checking for updates from buongiorno
Downloading: http://artifactory.buongiorno.com/artifactory/repo/com/buongiorno/group-base/5.0-SNAPSHOT/group-base-5.0-SN
APSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building com.buongiorno.bra.cat:wwf-splashTool:war:1.0.0.0-ALPHA-SNAPSHOT cvs $Name:  $
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri May 14 13:17:38 CEST 2010
[INFO] Final Memory: 9M/16M
[INFO] ------------------------------------------------------------------------
[b]C:\workspaces\Bra_Cat_SplashTool_Core>[/b]



Nicolas

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

Re: Batch stops and prompts me

#2 Post by avery_larry » 14 May 2010 08:38

is mvn a script or executable? If it's a script, then you need to call it

call mvn clean
call mvn package


Otherwise it's probably something with the way mvn exits. You could try the start command:

start /wait "" mvn clean
start /wait "" mvn package

nicdo77
Posts: 2
Joined: 14 May 2010 05:23

Re: Batch stops and prompts me

#3 Post by nicdo77 » 18 May 2010 04:25

Sorry i forgot to answer and thank you.
Indeed it worked as you said, so thanks a lot :-)
Im new to batch scripts and i have to say i like this!

Post Reply