Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':farmBeforeIntegrationTest' #21

Closed
wcrowell opened this issue Jun 8, 2016 · 4 comments

Comments

@wcrowell
Copy link

wcrowell commented Jun 8, 2016

The build on May 29th might have broke the farmIntegrationTask:

…
:farmBeforeIntegrationTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':farmBeforeIntegrationTest'.
> Cannot get property 'file' on null object

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':farmBeforeIntegrationTest'.
…
Caused by: java.lang.NullPointerException: Cannot get property 'file' on null object
      at org.akhikhl.gretty.ProjectUtils.getFileFromConfiguration(ProjectUtils.groovy:166)
      at org.akhikhl.gretty.ProjectUtils$getFileFromConfiguration$7.callStatic(Unknown Source)
      at org.akhikhl.gretty.ProjectUtils.getDefaultWebAppConfigForMavenDependency(ProjectUtils.groovy:173)
      at org.akhikhl.gretty.ProjectUtils$getDefaultWebAppConfigForMavenDependency$6.call(Unknown Source)
      at org.akhikhl.gretty.FarmConfigurer.getWebAppConfigForMavenDependency(FarmConfigurer.groovy:69)
      at org.akhikhl.gretty.FarmConfigurer$_resolveWebAppRefs_closure7.doCall(FarmConfigurer.groovy:153)
      at org.akhikhl.gretty.FarmConfigurer.resolveWebAppRefs(FarmConfigurer.groovy:118)
      at org.akhikhl.gretty.FarmConfigurer$resolveWebAppRefs$4.call(Unknown Source)
      at org.akhikhl.gretty.FarmStartTask.getStartConfig(FarmStartTask.groovy:41)
      at org.akhikhl.gretty.FarmBeforeIntegrationTestTask_Decorated.getStartConfig(Unknown Source)
      at org.akhikhl.gretty.StartBaseTask.getLauncherConfig(StartBaseTask.groovy:141)
      at org.akhikhl.gretty.StartBaseTask.action(StartBaseTask.groovy:39)
…

I noticed org.akhikhl.gretty.ProjectUtils.groovy was modified on May 29th for this change:
#4 added overlay support to farms #18

[(https://github.com//pull/18/files)]

I reverted back to the 1.2.5 version of Gretty using the classPath attribute for webapp in my farm task and it works:

webapp "org.jasig.cas:cas-server-webapp:$cas_version", contextPath: '/cas', inplace: true, classPath: ["${project.projectDir}/etc/jars/cas-server-support-rest-4.2.1.jar"]

This line fails with 1.2.6-SNAPSHOT of Gretty using dependencies with the exception above:

webapp "org.jasig.cas:cas-server-webapp:$cas_version", contextPath: '/cas', inplace: true, dependencies: [ "org.jasig.cas:cas-server-support-rest:4.2.1" ]
@saladinkzn
Copy link
Owner

saladinkzn commented Jun 8, 2016

Yep, I confirm it.

I tryed too hard to prevent possible break with war in farm and made dependency case broken.

I'll publish a fix today

@saladinkzn
Copy link
Owner

saladinkzn commented Jun 8, 2016

I've published build that should resolve this issue. Feel free to comment if you found an issue in it.

@wcrowell
Copy link
Author

wcrowell commented Jun 8, 2016

That worked. You can close this issue. Thanks!!!!

@wcrowell wcrowell closed this as completed Jun 8, 2016
@saladinkzn
Copy link
Owner

I'll add simple test in #24 to prevent this in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants