2

when I execute maven like this (from cygwin):

mvn clean deploy -pl cjr-extract-ws -am -Denv=test -DdeployExtractWS=true

it does exactly what it needs to do (build the cjr-extract-ws module with dependencies and deploys it)

But when I have it as single line in a 'deployWS.sh' file and run:

./deployWS.sh

From cygwin, for some reason it outputs (among a lot of other output) this:

[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ cjr-extract-ws ---
[INFO] Skipping artifact deployment

and (guess what) skips deployment...

why???

I have

<properties>
    <maven.deploy.skip>true</maven.deploy.skip>
</properties>

properties in other pom's (like 'parent' for example (and 'business')) but not in the cjr-extract-ws' pom.

Yu Hao
  • 119,891
  • 44
  • 235
  • 294
SanThee
  • 2,301
  • 3
  • 23
  • 35
  • Does your script have !#/bin/bash on top? Also, try using using call before the actual mvn command -> call mvn clean deploy -pl cjr-extract-ws -am -Denv=test -DdeployExtractWS=true – Vasco Lameiras Apr 29 '16 at 10:36
  • neither the declaration nor the 'call' keyword did the trick; call is even not recognized by cygwin – SanThee Apr 29 '16 at 11:54
  • 1
    This answer solved my issue as well: http://stackoverflow.com/questions/4091800/the-same-bash-script-in-command-line-doesnt-work-when-run-from-a-file?rq=1 – SanThee Apr 29 '16 at 13:59
  • Thanks for letting me know, I was finding this issue quite intriguing – Vasco Lameiras Apr 29 '16 at 14:01

1 Answers1

-1

Since the question became notable (and hasn't been formally answered) I guessed I could do the honor :)

This question has an answer here.

Enjoy!

SanThee
  • 2,301
  • 3
  • 23
  • 35