cescoffier / maven-play2-plugin

A Maven Plugin to build Play2 applications
Apache License 2.0
49 stars 41 forks source link

integration with play 2.0.4 in Windows #28

Closed takaczapka closed 12 years ago

takaczapka commented 12 years ago

Hello,

play2-maven-plugin with play 2.0.4 doesn't fail the build on Windows if play application doesn't compile or tests are failing. This is because the plugin calls play.bat behind the scenes, but play.bat doesn't exit with correct error code. To overcome this problem you have to update play.bat file replacing last line:

endlocal

with

exit /b %errorlevel%
endlocal

Thanks, Maciej

cescoffier commented 12 years ago

Is this not a bug in play framework itself ?

takaczapka commented 12 years ago

It depends how you look at it. Play guys might not consider it as a problem as they might not expect anyone to call play.bat in programmatic way.

The very similar story is with runtime settings - as the plugin calls .bat file, maven runtime parameters (for example proxy, debug, or other -D...=... parameters) are not passed forward, hence you have to edit play bat files (play.bat/build.bat) yourself in some circumstances.

This is not a bug per se, but I reckon it's something to bear in mind in case of troubleshooting.

cescoffier commented 12 years ago

Oh ok,

I will add a FAQ entry about this.

WDYT ?

On 30 nov. 2012, at 17:59, takaczapka notifications@github.com wrote:

It depends how you look at it. Play guys might not consider it as a problem as they might not expect anyone to call play.bat in programmatic way.

The very similar story is with runtime settings - as the plugin calls .bat file, maven runtime parameters (for example proxy, debug, or other -D...=... parameters) are not passed forward, hence you have to edit play bat files (play.bat/build.bat) yourself in some circumstances.

This is not a bug per se, but I reckon it's something to bear in mind in case of troubleshooting.

— Reply to this email directly or view it on GitHub.

takaczapka commented 12 years ago

sounds good to me.

cescoffier commented 12 years ago

FAQ entry added: http://cescoffier.github.com/maven-play2-plugin/maven/snapshot/faq.html#WindowsExitError

Thanks !