-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
IntelliJ imports all libraries as provided dependencies #125
Comments
if I try to import the |
When running the |
rather than running the "lauchermain", use the Gradle "run" task. You can What version of IntelliJ and what version of Java are you running? The error message you have provided indicates that it is not finding Scott Walton On Sun, Dec 27, 2015 at 2:29 AM, rburgst notifications@github.com wrote:
|
Hi, using I am using IntelliJ Ultimate 14.1.6 on Mac OSX El Capitan. |
This appears to be a systemic problem found in Gradle's IntelliJ plugin. I can't tell for sure if IntelliJ relies completely on it to import a Gradle project. There's nothing that we can do on the Griffon side to fix it unless the IntelliJ Gradle plugin exposes a hook to tweak dependencies. workaround: manually update the generated files by defining the right scopes. You can do this too within IntelliJ using the project dependencies panel. |
did that but found to do the |
great. Are those missing directories undefined? I thought IntelliJ would pick them up as the build-helper plugin defines them. |
Running with IntelliJ Ultimate 15.0.2 on Windows, I do have a couple of If I first open the Gradle tool window, immediately after opening the new You may find, when you change the dependencies in the build.gradle, you Scott Walton |
I typically use Gradle, so when I import the generated pom.xml into I suspect that there's a step in IntelliJ you need to complete to get the Scott Walton |
the problem is not getting the gradle build to import, it doesn't properly parse all dependencies and imports them with the wrong scope. this prevents the app from properly running when running them with the native IntelliJ runners. More importantly it prevents you from using the builtin IntelliJ test functionality. Running everything through the gradle jobs is possible but you are missing out on most of the benefits of the IDE. |
If you use the IntelliJ gradle view to run the tasks they all work (for me It could be IntelliJ 14 vs 15, but I used 14 that way for quite some time I do see that you mention "hot swapping" and that is something I've never Scott Walton |
I found this quite annoying, since a work-around has to be applied for all team members, as well as on all computers I work. If the project needs to be reimported, the work-around also has to be reapplied. We have a different work-around that doesn't require redoing this "all the time". It does require a bit more initial work, but when done it works all the time and for everyone. To achieve this, we create a multiproject gradle build and change the griffon project to a subproject. This requires some adjustments to the generated griffon project. When that is working, we add a new 'launcher' subproject, that depends on the griffon project. Within these we add a simple launcher class for the application. This automatically get the correct classpath and can thus be executed from IntelliJ IDEA, giving you all the expected IDE benefits. |
Turns out the culprit was |
I have created a simple test application with lazybones (just as described in the tutorial).
When I then import the project into IntelliJ by opening the
build.grade
file, then most of the dependencies have theprovided
scope.If you then try to launch the application (by running
Launcher.main()
) you getSteps to replicate:
create the project
import the generated project into intellij by choosing File->Open and select the generated
build.grade
file.The text was updated successfully, but these errors were encountered: