I am using IntelliJ to work with Flink project and then I would like to use archetype (flink-quickstart-java).
However, after I clicked Add archetype, and entered all parameter, there is no new archetype for me to select for creating my own project.
Is there anything needed to be configure?
In my case, I restarted intellij after creating the archetype, and it appeared as expected.
Go to File > Settings > Build, Execution, Deployment > Build Tools > Maven > Repositories.
Select every URL
Update
I was able to add the archetype using the Add Archetype button:
This is the configuration that I used:
Related
Maven on the intellij was unavailable(think removed).I can not make new maven project or import dependency form pom.xml using: right click->maven->reImport.No maven option exist when right click.
Maybe Maven integration is disabled.
Windows: Navigate File > Settings > Plugins
MacOS: Navigate Preferences > Plugins
Then switch to Installed tab, search for maven and click enable button.
https://www.jetbrains.com/help/idea/managing-plugins.html
It looks like the installation iscorrupted.
Remove the .IntellijXX or .IdeaICXX settings folder, which can be found under in the current user directory and after restarting Intellij, it should recreate everything fixing the problem.
Apart from getting the Maven option on right click on a project, there is a Maven option on the right hand side of intellij (As shown below, and highlighted). Click on the circle arrows icon for re-importing maven dependencies.
Usually if you open settings and search for the term "maven" you should be able to see under "Build, execution deployment" - "Maven" with its corresponding settings. The Maven Home directory should point to a valid maven installation. For example:
(unix
$ /home/xy/intellij/plugins/maven/lib/maven3
If that doesnt work, try to reinstall intellij by either through intellij (windows software remove) or removing the config files in your home directory
(unix)
$ /home/xy/.intellijXY
(windows)
%USERPROFILE%\.IdeaICXX
In the file menu select settings -> plugins.
search for maven, select maven, select enable. Restart intellij.
Once restarted you will now have the option to start new maven project and maven functionality will be accessible in all your previous projects.
Tried a few solutions but this is the only thing that worked. In short make sure maven is ON for you.
Try navigating to the pom.xml file and open as a project.
Maven is not integrated
Navigate to File > Settings > Plugins
Search for 'maven' here and add it
Click on enable and restart the intellij
You will be able to find 'maven'
I am developing an idea plugin, and it is an intellij idea project.
I want to use gradle to manage the dependency.
How to config?
There is now a Gradle plugin for building IntelliJ Platform Plugins. In order to use it, you will need to add the following snippet to your build.gradle file.
plugins {
id "org.jetbrains.intellij" version "0.0.31"
}
apply plugin: 'org.jetbrains.intellij'
For more information, please see this guide to help you get started.
Ok, there are multiple ways to create an IntelliJ project, "templates" if you like, and unfortunately you can only pick one of them (IntelliJ plugin or gradle).
Thankfully, it's easy to configure a project for gradle in IntelliJ.
First, create a new project from the IntelliJ Platform Plugin template. You don't need to choose any Additional Libraries and Frameworks. This will give you a project structure including META-INF/plugin.xml and the Project SDK should be something like IDEA IU-129.451.
From here, simply create a new file named build.gradle at the top level of your project, including for example this line:
apply plugin: 'java'
Now, close the project. You can now use File -> Import Project..., choose the build.gradle file that you just created, and import the project. Accept the defaults for importing and hit OK.
The project is now opened with both gradle and intellij plugin enabled!
Notice that the source root src has disappeared and you will need to right click on src in the Project pane and select Mark Directory As -> Source Root.
To prepare the plugin for deployment, there is still the menu option in the Build menu for that - if you want to automate that part via gradle, good luck and please let us know how it's done ;)
I use IntelliJ IDEA Ultimate 14 and Gradle 1.2. I manage the project from the console, but I need to debug some of the code from the IDE.
When I try to make the project, this error window appears. When I try to debug the project,
Error: Unable to make the module: idappcli, related Gradle configuration was not found.
Please, re-import the Gradle project and try again.
is written in the message window. How can I add the regular output paths to the project?
Try by opening the gradle task view and then click the refresh button. For me it solved the problem.
I also had a similar problem,
Go to : View -> Tool Windows -> Gradle.
Then press in Refresh Icon
This fixed the issue "Please, re-import the Gradle project and try again." for me (IntelliJ Ultimate 17.3.3):
(1) Detached Gradle project:
(2) Closed the project and (3) re-opened it via File > Open recent. IntelliJ will promt to import the now unlinked Gradle project. (4) Imported it and selected "Use auto-import" in the dialog.
I had the same problem with my Intellij IDEA version 2016.2 (Mac)
The solution was: In Intellij, Click on "View" then "Tool Windows" then "Gradle" then click on
I had to make sure the Use auto-import and the Use default gradle wrapper (recommended) were both checked.
File > Other Settings > Default Settings > Build, Execution, Deployment > Build Tools > Gradle
I faced the similar issue when i update my IntelliJ Idea.
To fix it i ran the below command in terminal and it fixed my problem.
gradle cleanIdea idea
For most people the refresh of Gradle that has already been suggested might solve the issue.
For the others I figured out, that deleting the .idea direcotory and reimporting the project might help.
It can be that your resources directory is not added to classpath when creating a project via Spring Initializr. So your application is never loading the application.properties file that you have configured.
To make a quick test if this is the case, add the following to your application.properties file:
server.port=8081
Now when running your application you should see in the spring boot console output something like this:
INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): **8081** (http) with context path ''
If your port is still default 8080 and not changed to 8081, your application.properties files is obviously not loading.
You can also check if your application runs with gradle bootRun from command line. Which most likely will be work.
Solution:
Close IntelliJ, then inside your project folder delete the ".idea" folder
Reimport your project to IntelliJ like following: "Import Project" -> "select ONLY your build.gradle file to import". (IntelliJ will automatically grab the rest)
build and run your application again
See official answer by IntelliJ Support:
IDEA-221673
This works for me:
Close the IntelliJ Idea
Delete 'gradle' and '.gradle' folders from the project root
Start IntelliJ Idea and import the project as gradle
In my case the root cause was a missing proxy configuration. Once I configured it properly I was able to Refresh gradle projects and it finally downloaded missing files and set up the project correctly.
File > Settings > Appearance & Behaviour > System Settings > HTTP proxy
then
View > Tool Windows > Gradle
and Synchronize button
I went into the IntelliJ Gradle preferences:
Menu: Preferences > Build, Execution, Deployment > Build Tools > Gradle
And under Project Level Settings, switched the radio button to "Use default gradle wrapper (recommended)"
Hit the make button, and was in business!
#user1339 I also had the same problem. Please, read this question Building war with Gradle, Debugging with IntelliJ IDEA. It'll be very helpful for you. And recommendation for the 'Make' task. As message said, I should try to re-import the Gradle project and try again. In my case this advice became very helpful.
I recommend to try to 'Build > Rebuild Project'.
I mean is there a possibility to run some maven command to add new module to existing project , or manually create folder and needed changes to pom.xmls ?
If you are using archetypes, mvn archetype:generate will create subproject's POM and structure, and will also set it as a module of the current project.
If you are working with Eclipse (m2eclipse) you can add a maven-module via Eclipse (NetBeans and IntelliJ should work the same way) otherwise you have to do that manually...editing the pom and create the folder and put stuff into the new module.
To add to #khmarbaise's answer,
If you are using Idea, right click on your project's name on (Project view perspective) and New > Module. Select maven and follow the wizard.
If you want to create a new module in eclipse then do follow below steps:
Right click on root project. and select maven -> New maven module project
[1]: https://i.stack.imgur.com/DdPcP.png
but parent project must be pom project like add pom in your pom.xml of root project if you face any error.
I recently set up a j2ee development environment under Ubuntu: Eclipse (Helios) with the maven plugin (m2eclipse).
When I try to create a maven project, it tells me to select an "Archetype".
Then, I select an Archetype with a GroupId : "org.apache.maven.archetypes" and the
ArctifactId : "maven-archetype-quickstart" (I tried also with the followinf artifactIds
"maven-archetype-mojo" "maven-archetype-j2ee-simple", ....).
Then, it creates a standard maven directory structure.
I added the "javax.perssitence" Maven Dependency that load the "persistence-api-1.0.jar".
But I can't find the "src/main/ressources" and "src/test/ressources" to access to the "persistence.xml" file.
Is it a bug? Should I create it manually?
Thank you for your answers ;)
No, it's not a bug, just create them manually and update the project configuration under Eclipse (via right-click on the project and Maven > Update Project Configuration)