I've loaded a playframework project into intellij. I have an external jar in the project (Which is in my lib folder) but for some reason intellij isn't detecting it.
The jar is also included in the SDK's for platform settings. In any other project I have in intellij it detects this JAR no problem. Anyone have any idea what I'm doing wrong?
While doing in development in idea you have to add the lib folder as a dependency to the module. It worked for me when I added the manual dependency
File->Project Structure-> Modules -> (select your module if multiple) -> dependencies
Then I just clicked 'add' to add the lib folder. Your project would start detecting the jars.
Intellij Documentation to add external jars.
Related
I cloned a project from GitHub, but IntelliJ doesn't see it as a Plug-in development project. Can I attach a Plug-in nature to it?
I'm using IntelliJ 2018.1
Delete the old module in Project Settings, create a new IntelliJ Platform Plugin module and mark directories as sources, test, etc.
I have a multi-module project that uses maven. Is there a way I can point IntelliJ to maven target/ folder so when I start Debug it won't rebuild the project from scratch and re-upload a whole project via JRebel all over again.
Basically, use target/ as a build folder. Changing compile output path didn't work as I expected it to not compile classes that were compiled by mvn already.
The IntelliJ Run/Debug configurations can specify which actions happen before launching the application.
By default for say web applications, this would display
Build
Build x artifact
You may remove both entries if you are happy with building via maven before launching the application.
Regarding the JRebel side of it - it should certainly not be updating the classes on the second compile assuming nothing changed. The classes have their hashes checked before a reload. This is assuming maven and IntelliJ are using the default javac compiler. If either is configured to use ecj compiler, it's best to let JRebel only see classes built with the same compiler.
Pointing on an external library in Intellij,
is there a way to know why it was imported?
link it to a gradle import?
Reading Google instructions, I found that I have to import and reference the Play Service library into the project.
So I created a project, copied google-play-service_lib project, imported it as a library project, went to the main project and added this library as a Module dependency. However, I still have an error that IntelliJ IDEA does not recognize package com.amazon.device.ads.*.
So I had to add a library dependency as well, although this library already exists in the /lib directory of Play Service library project.
Am I doing something wrong or we're actually requested to add both dependencies in IntelliJ IDEA? If yes, is this maybe a bug in IntelliJ IDEA 13? I can't remember of having to do the same in earlier versions of IntelliJ IDEA (I have been using it for three years).
This is how it looks in the end and it works only this way! Check the last two dependencies.
I'm working on multiple Gradle projects with internal and external dependencies, and so far I am happy that thanks to Gradle's dependency management I can modify a library project without affecting every application that uses the library.
When I need to modify a library project and test it using an application project that uses it, I need to do the following,
Modify the library project and commit to SCM
Trigger CI to build the library project and push it to my Gradle repository
Update the application project's build.properties to refer to the new version of library project
Iterate the above steps until everything works and there is no bug
So it became quite combersome now. Can I configure IntelliJ IDEA so that
All my Gradle projects are in one window, like the screenshot below, which is Twitter's Finagle imported using its pom.xml. Sadly IntelliJ's JetGradle plugin doesn't seem to understand Gradle subprojects.
When build.properties's dependencies are my subprojects, read dependency from local snapshot, otherwise download them from the Gradle repository
Thanks.
If you want to open all projects in a single IDEA window, you'll have to aggregate them into a multi-project build, at least until IDEA 13 hits the market. Before IDEA 13, it's better to use Gradle's IDEA integration. Once you have a multi-project build, all you need to do is to add allprojects { apply plugin: "idea" } to the root build script, run gradle (cleanIdea) idea, then open the generated IDEA project.
Currently in IntelliJ IDEA 2019.2 you can add the gradle subprojects like so
Open Gradle Tool Window via View > Tool Windows > Gradle menu
Click on "Link Gradle Project" button (the plus sign)
Select the build.gradle file corresponding to the subproject
Go to File > Project Structure > Modules > NameOfSubproject
Navigate to main/java and click on Mark as: Sources
Mark the main/resources as Resources
Restart IntelliJ IDEA
The sources of the subproject will be recognized by IntelliJ and you can use Navigate Class action for the classes in the subproject