I'm trying to import a GitHub project, specifically, this one : timtiemens/secretshare using IntelliJ Idea.
The git import works fine, at which point the IDE builds the project using gradle, which works fine.
However, when I actually open the project, only the gradle directory in the project is opened, ie, .../secretshare/gradle. The other directories, like src, are just not there in the IDE, even though they're present in the project folder - I can see them with explorer.
Just Delete the idea files created by inteillj
Run gradlew idea
Open the project again and choose use gradle wrapper settings.
Related
I have an existing maven project which I downloaded from GitHub.
If I run mvn clean install from the root of the project everything works fine (a jar file is created in target folder and it executes works OK).
But when I go to Eclipse and import this project as Existing maven project I get multiple (395 to be precise) Java Problem errors (like The method is undefined etc.).
The only thing that I notice is when I run maven from command line it creates .m2 folder inside the project folder while maven from Eclipse creates .m2 inside my C:\Users\username folder.
I'm using Eclipse 2019-06, Java 8 and apache-maven-3.6.1.
P.S. Same errors appear when I import this project to Intellij IDEA 2019.2.
Olga, don't worry. Import the project into Eclipse. Then wait some minutes. If the errors do not vanish, try "ALT + F5". If this still does not help, build the project from within Eclipse ("Run As -> Maven build"), do "ALT + F5" again.
Eclipse often takes some time to fully "understand" the project, i.e. synchronise the POM and the files to its internal mechanisms.
When trying to open a maven project through the pom.xml, IntelliJ shows the windows: Open project, when I click open as project I can see the window: scanning maven projects. I can't get to the window open in current window or new window.
When I try to open a non-maven project, it opens it. When I try to open a maven project as a normal project it doesn't seem to do anything.
I have successfully opened a project as maven project through cloning it from Git, bit it gives me errors that it can't import the maven dependencies.
I can do mvn --version, mvn clean compile etc.
I have tried to open projects without the .idea folder and with the .idea folder. That didn't work.
I have reinstalled IntelliJ already.
EDIT: I am using IntelliJ version: 2018.2.4 Ultimate.
EDIT2: I just noticed that the blue color that usually appears by a pom.xlm is different, see screenshot.other color?
To import a maven based project in intellij Idea follow the following steps:
Open intellij idea,
Goto File menu,
Click on New,
Click on Project from existing sources,
Select file or directory to import,
Select POM file ,
Click on OK,
Finalize the other steps,
wait till the import loading gets completed(Sometime it takes much duration to complete)
Your project will get loaded with files and folder on left side.
Do you have an exception in your firewall so IntelliJ can make http requests?
I am trying to work with a partner using a git repo. He uses netbeans but I use eclipse. I am having problems when I import the project into eclipse, the project has no classpath folder in eclipse so it cannot run and it is not highlighting errors in the code.
My question is is there anyway to work on the same git project with two different IDEs? And if so, how do I get eclipse to recognize the netbeans project folder to create its own .classpath.
I am quiet new to git but for now I have set up a repository on Bitbucket. The repository contains my libGdx Project which is gradle project containing 3 sub-projects (Android, Desktop and Core).
So now it is my aim to clone this to eclipse using EGit. Everything works until i have to choose a wizard for the Import of the projects.
After i added the repo i use Import > git to Import a Project from the added repository
Here i have to choose the wizard
If i choose "Import existing Projects" the program tells me that no Projects are found.
After that i tried the "Use the New Project wizard" but it confuses me and actually i want to Import a gradle Project and not create a new one.
The last Option "Import as General Project" gives me just Folders and files, so eclipse doesn't notice the existing Projects. Like i said i'm quiet new to git so i appreciate every help ! :)
Thanks :)
The wizard intends to create the project settings files for Eclipse (.project and .settings/).
It seens like you don't have them in your git repository (I don't think you should). That why Eclipse asks you to create a new "project".
the best way is "Import -> Gradle project" (you need to have gradle plugin installed in eclipse first)
But is you don't want to use gradle plugin you need first to generate eclipse file. To do so, type "gradle eclipse" in your working directory (see https://docs.gradle.org/current/userguide/eclipse_plugin.html) and then import existing project into your eclipse workspace.
Another thing, it seems that your workspace is in the same folder as sources (.metadata folder), you should create your eclipse workspace in another directory.
I have just started using the built in GIT functionality of Eclipse and I have everything set up and working, my problem as of now is that I realized my project that I imported from GIT is not reporting errors in my Java like the local copy would. I've tried the following,
Project -> Clean
When I right click on the property files of the folder I can't seem to choose a Java Builder.
It depends on how you import your Java (Git managed) project into the Eclipse workspace.
See "Importing a GitHub project into Eclipse" as an example.
The key is for your Eclipse project to reference the sources in the git repo folder (kept outside the Eclipse workspace folder, in any place you want).