I'm new to IntelliJ. What is the best (and recommend method) for importing project into IntelliJ. Is there a maven plugin for doing this?
More specially I'm interesting in importing this project.
https://github.com/nathanmarz/storm-starter?source=c
Thanks.
UPDATE 1 - When I try to use File -> open (the m2-pom.xml file) it just opens the xml file (as shown in the screenshot below.
It looks like that project has a pom file named m2-pom.xml. You should import that as a maven project. Assuming it's using standard repositories, you'll immediately be able to compile the code with maven.
You can select Open in the menu, and then choose that file and it should load the project.
Be aware this seems to be a clojure project. You might want to research the La Clojure plugin to see how/if it can import clojure projects with it. It looks like the steps I gave will work, but the code may not run very easily for you without the La Clojure plugin.
You could either import the Maven project inside of IntelliJ (File -> Import Project...), or you could simply use the Maven IDEA plugin. All you do is execute mvn idea:idea inside of the Maven directory, and a project file will be generated. This file may be opened as a project inside of IntelliJ.
EDIT: #maba warns not to use the Maven IntelliJ plugin.
Related
I'm trying to import Eclipse Project to IntelliJ while keeping them synced, because I want to use IntelliJ as an IDE but keep Eclipse project in the way it is now and if it anything, directly upload my programming assignments (as an Eclipse project). In other words, I want to edit Eclipse project with IntelliJ IDE, that's all.
After some searching, I discovered that you can do that in IntelliJ Like that:
Import project -> [Choose .project File] -> Keep project and module files in [some other directory] & Link created IntelliJ IDEA modules to Eclipse project files -> [Select project to import, "Empty Karel Project" in my case]
However, no .java files in my project whatsoever. That's where I need help. Am I missing or misinterpreting something? By the way, Eclipse Integration plugin is enabled.
Project files after importing:
IntelliJ IDEA allows you to import projects from Eclipse in two ways. If you do not need backwards compatibility, you typically instruct IntelliJ IDEA to create a new set of native project files. Otherwise, you can instruct IntelliJ IDEA to keep project files in sync so that you can work on the project from both environments.
Click Import Projectfrom the Quick Start window or select the File → Import Project ...menu item. Next, select the .classpath file or .project file to import and confirm.
And for other ways you can refer below link
https://confluence.jetbrains.com/pages/viewpage.action?pageId=59944389
I am quite new to Java, although I worked with some projects. I use IntelliJ IDEA, and I have issue with my web project.
Whenever I RUN the project from IntelliJ and when it's made and built - my localizations texts are not shown, but everything is ok if I use mvn install and deploy the war file manually.
What I found is that jars built with IntelliJ don't have MANIFEST.MF generated and couple of other files.
This is IntelliJ jar
This is jar when I run mvn install from console:
Can somebody help with this, why this happens? I have same maven used for compiling as I use for console run:
If you have a Maven project, then you can choose one on the tasks on the right of the editor.
jar or package should generate a JAR file.
Maven is a software tool that helps manage a project and automate builds. By default, however you have to select Maven as the desired type of project when you go to create a new project.
Basically, create a Maven project! :)
why do I need to apply: mvn eclipse:eclipse command?
are they equivalent to application container/server?
Is there a file for which customizing is necessary besides web.xml?
when you create a web project using maven, like maven-archetype-webapp. It creates the folder structure as recommend by Maven for a webapp like shown here .
Now when you try to import these folders in Eclipse, it still would look like folders but eclipse cannot understand the nature of these folders. Eclipse relates folders and contents within them to an Eclipse dynamic web project only through its .project , .settings files
So in order for your maven project to be understood by Eclipse, you run the goal mvn eclipse:eclipse. After executing this goal, maven generates the .project, .settings files necessary for eclipse to understand the project as Web project.
This is however optional. You can still import the project as Maven projects within eclipse and continue to use them but you cant rely on Eclipse's features like clean/ build / build automatically.
Though I use eclipse, I dont rely on Eclipse's build feature. I have installed Maven eclipse plugin and that allows me to run maven goals and commands within Eclipse which is as good as running Eclipse's build feature. Hope this helps.
I have a GWT project, which builds under Eclipse, but I am trying to migrate it to IntelliJ.
I appear to have imported it correctly, downloaded all the required libraries using maven / pom.xml, but when I try to make the project, I get the following error:
java: package com.infoshare.clearcore.shared.model does not exist
If I browse the sources, it is there, but using any of the IDE "goto" options fail.
The picture below shows the project structure, which has two modules one with the failing (auto generated) source code, and the other with the "com.infoshare.clearcore.shared.model" code. Is there some way I can tell the compile to look in both modules, or do I have to restructure the code?
How did you import the project? The best way I found to import Maven projects is simply to open the root pom.xml using File > Open, then IntelliJ will detect the project and import it automatically.
Eveything should be configured properly. in particular, the target folder should be displayed in another color, because the IDE knows it contains generated files (which is not the case in your current screenshot).
I am trying to add java code from a Maven project (called docx4java) which I checked out from svn to an existing Eclipse project (called DocumentManager). I have tried the normal way, that I thought would work, i.e.:
Right Click on eclipse project>Properties>Java Build Paths> Projects > Add (here I add the Maven project) and >Libraries (here I specify Native Library location e.g. docx4/trunk/docx4/src/) but I still can't get the 'Maven' classes to be recognised in eclipse. I get the message
import docx4j.src.main.java.org.docx4j.convert.out.flatOpcXml.FlatOpcXmlCreator cannot be resolved
I have tried adding a test project that was compiled in Eclipse and that works fine, Eclipse seems to recognise it i.e. import org.me.TestProject works fine.
How can I get the code from the Maven project docx4java to work in the Eclipse compiled project DocumentManager?
You can generate eclipse poject files (which you can just import into your Workspace) using the maven eclipse plugin
Take a look at these ecplise plugins for a more direct integration of maven into eclipse
You should create a eclipse project for docx4java as #Attila has commented. Once that is done, you should have two projects on your workspace: docx4java and DocumentManager. At this point, what you are doing now (adding a project reference to the Java Build Paths) should work.
It seems that the source path is not configured correctly, this is why the compiler cannot find your "Maven classes".
docx4java.src.main.java...
Maven has a different directory structure and you have to tell Eclipse where to find your sources.
For a "vanilla" eclipse project, remove the standard eclipse build path src and add the maven source path src/main/java (or whereever you added the code), the compiler should correctly pick up your sources.
Note that you still have to add all jars mentioned in the dependencies section of the maven pom.xml file. Otherwise it won't compile, even if it finds your added java classes.
(Addendum: I would recommend to use maven in your existing project as well.)