-
Notifications
You must be signed in to change notification settings - Fork 174
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
Could not find any version :) #32
Comments
I just fixed it - please try again. |
There is another error (maybe it's related to previous): apply from: 'https://raw.githubusercontent.com/akhikhl/gretty/master/pluginScripts/gretty9-0.0.20.plugin'to apply plugin: 'org.akhikhl.gretty'the following error pops up when trying to refresh gradle project (build project files): Error:Cause: groovy.lang.MissingMethodException: No signature of method: org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultResolutionStrategy.eachDependency() is applicable for argument types: (org.akhikhl.gretty.SpringBootResolutionStrategy$_resolveDependencyVersions_closure3_closure4) values: [org.akhikhl.gretty.SpringBootResolutionStrategy$_resolveDependencyVersions_closure3_closure4@6087b587] Possible solutions: eachDependency(org.gradle.api.Action) No signature of method: org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.DefaultResolutionStrategy.eachDependency() is applicable for argument types: (org.akhikhl.gretty.SpringBootResolutionStrategy$_resolveDependencyVersions_closure3_closure4) values: [org.akhikhl.gretty.SpringBootResolutionStrategy$_resolveDependencyVersions_closure3_closure4@6087b587] Possible solutions: eachDependency(org.gradle.api.Action) |
Which version of gradle and IntelliJ IDEA? |
I've tried gradle version 1.11, 1.12 on IntelliJ IDEA 13.1.3 apply from: 'https://raw.githubusercontent.com/akhikhl/gretty/master/pluginScripts/gretty9-0.0.20.plugin' because it works. |
OK, I'll have a look at the problem. |
Thanks! |
I just tried importing helloGretty project into IntelliJ IDEA 13.1.3 with Gradle 2.0. It imports compiles and runs without errors. |
Any new information on this? |
When upgrading to gradle 2 I get the following error in IDEA 13.1.3: Error:Cause: org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver cannot be cast to org.gradle.api.internal.file.copy.CopySpecInternal It seems like there's an error caused by the ide. (http://forums.gradle.org/gradle/topics/gradle_v2_0_fails_to_refresh_projects_using_intellij) |
I've updated the IDEA to 13.1.4, now it's working with gradle-2.0. Great! Now I get another exception when trying to run the app: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':appRun'. > Unable to find a single main class from the following candidates [ ... classnames with main function ... ] why is it happening? |
On 07/29/2014 11:42 AM, Gabor Bota wrote:
Best regards, |
I've uploaded the stctrace to pastebin: http://pastebin.com/Jug0HgLe |
The error is apparently caused by multiple main classes seen by spring-boot:
|
You can specify conrete main class (for spring boot) via: gretty {
springBootMainClass = 'package.ClassName'
} |
So I should define the jetty main class there? |
do you have |
I don't have a spring-boot enabled project. I have not modified anything at all besides changing to apply plugin: 'org.akhikhl.gretty' from gretty9-0.0.20.plugin. |
I've defined springBoot=false in gretty config (in the build file). |
Please have a look at this line: https://github.com/akhikhl/gretty/blob/master/libs/gretty/src/main/groovy/org/akhikhl/gretty/StartBaseTask.groovy#L36 This is the only place where SpringBootLauncher is instantiated, and it is clearly instantiated in your case, judging from stacktrace. Take a look at the condition there: SpringBootLauncher is only used if function ProjectUtils.anyWebAppUsesSpringBoot returns true. Now take a look at these lines: As you see, gretty assumes you are using spring boot as soon as your project depends on artifacts of group 'org.springframework.boot'. Now, the main question: if you do |
I've created a pastebin for the output: http://pastebin.com/F6ZFcGzF It seems like the jsonrpc4j lib is using springboot, but I don't think this should be a problem. |
I think I should learn some more Groovy and fix some errors by myself shortly :) |
Very good that you found it :) Could you, please, try excluding spring-boot dependency like this: configurations {
compile.exclude group: 'org.springframework.boot'
} |
It's working now, but it does not seem like a solution, it's rather a hack in my opinion... Am I wrong with this? Anyway this configuration will stay in the buildfile as long as the project doesn't need sprint-boot... Thanks for the help! |
Well, if your project depends on spring-boot, that should normally mean you are building spring-boot application.
Your opinion? |
I think that it should ony test for first level dependencies for springboot by default - so a dependency of a library would not be detected. This would be good, because build won't break on gretty version upgrade. (Is it unavoidable to scan in the whole dependency tree, not just in the first level? Answering my question, in a multi-project build testing the first level would be a problem, because what if the root project's first dependencies doesn't contain spring boot) If scanning only first level dependencies couldn't work, the method you wrote is a good solution imho. |
Where did you get com.github.briandilley.jsonrpc4j:jsonrpc4j:1.2.1 ? |
Hi akhikhl , I have some problem about below error. Execution failed for task 'appRunDebug' Please help me... |
Hi akhikhl, I have same problem that Execution failed for task 'appRunDebug' Please help me too |
Do you use gradle-2.14? Revert to 2.13 if you do. I need some time to port jacocoHelper to version that is compatible with gradle 2.14 |
So here's the exact error after adding
apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'.
Any ideas what's the problem?
The text was updated successfully, but these errors were encountered: