IntelliJ SpringBoot dependency problems - maven

I'm trying to follow several tutorials on how to use Spring Boot, however I keep running into issues where none of my dependencies are working properly. Below is an image displaying my problem.
I've tried making sure that I installed Maven correctly, however I imagine there is something that I'm doing wrong. I think that I have Maven in the proper Paths but, but I can't tell why it would still be providing the errors that it does. I've followed what it stated to do for Windows users, and have as follows.
Whenever I run mvn -version I am getting the following.
Can anyone help guide me in order to properly have Maven working on IntelliJ?

If you are using IntelliJ IDEA then I suggest using Spring Initializr which would create sample application with correctly configured maven setup is you choose Maven Project for Type:
http://blog.jetbrains.com/idea/2015/03/develop-spring-boot-applications-more-productively-with-intellij-idea-14-1/

Are you using Gradle or Maven to import required dependencies? If not, follow the guides here:
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/
If you have them setup, try to click one of the error and then click the red light bulb icon, see what it suggests you to do.

Related

Intellij complaining about JDK location

First Image
Second Image
As I attached 2 images, I am having trouble running my spring boot gradle project written in groovy.
As soon as I open the project, intellij tries to build the project and it fails saying Gradle Sync failed.
Since it is complaining about java home in the jdk setting, I was trying to change the path as my intellij expects. but as soon as I change it, it tells me that it cannot find android sdk location. and I have no idea why it cares about android sdk. This project is about spring batch job using gradle and groovy.
I have been searching why it happens for days now and online is talking about ardroid studio solution. and those solution do not apply to my problem.
Can someone help me with this issue please?
Thank you in advance.
It looks like you are running Android Studio instead of IntelliJ IDEA.
The former doesn't support projects other than targeted for Android, so your project will not work there.
Make sure you run IntelliJ IDEA. You can get it at https://www.jetbrains.com/idea/download/index.html.

Maven without the mouse

I thought maven was a way to build a project without relying on your IDE. I've been following instructions that involve my IDE only to find the project only works from within the IDE.
I happen to be using intellij but I wish I didn't even have to tell you that. Am I wrong or is there a way to build a maven project using keystrokes not "click this, then that" mouse instructions that change lord knows what in the IDE. A way that will work within an IDE but not be dependent on that IDE?
I'm hoping I have been following some instructions that simply didn't have this as a goal. Is there a way to build a maven project that will work just as well in intellij as eclipse? If so how do I find it? Is there a keyword I need to know to search for?
I'm probably misunderstanding something but I hope I've made my goal of having my project only depend on maven itself clear.
You can build a maven project from its directory using -
mvn clean install
Of course this requires Maven installed on the machine you are running it from.
Please look further into the documentation here as well.

Unindex maven repository https://repo.grails.org/grails/core in Intellij with Grails 3.0

I am using IntelliJ IDEA 15.0.1 and I am trying to create a Grails 3.0 application and ran into issues.
While trying to create a Grails 3.0 project I get the following.
After doing what it does I also noticed that the Grails Tool Window is on the upper left is gone. When I open the repositories list and click on update I get the following error:
I have seen some other questions that it says to click on 'Disable....' but i do not think so...
Will not i need the grails core repo at some poing during development?
How come the Grails Tool Window disappeared? How to make it come back?
To resolve this problem i changed (the file is build.gradle)
"https://repo.grails.org/grails/core/"
for
"http://repo.grails.org/grails/repo/"
So close and open your project again.
For what it's worth, if you are using gradle for all of your projects, you can remove maven from your development machine entirely. then, add 'apply plugin: "maven" ' to your build.gradle files. then, you can completely ignore your IDE's messages about Unindexed remote maven repositories. gradle will take care of it for you.

Struts1 with IntelliJ IDE

I have developed struts1 application with Eclipse. I had to change my IDE into IntelliJ. I need to develop a new application integrating struts1 and Spring. I found some interesting tutorials from,
struts-spring-integration-example
and spring-and-struts-integration/
Since above examples were developed using Eclipse IDE, I might wonder is there is any better (easy) way of doing it using Intellij .
Please mentioned any tutorials or better way to doing this.
What did you try? I got Spring working in IntelliJ using Maven and copying other working projects. I hope that also can work for you. Configure Maven for IntelliJ, if you can get spring working with IntelliJ try make it work from the command prompt with maven + your app server (I can recommend jetty) and then you can open the Spring/Maven project in IntelliJ and it will work.

No AspectJ getter/setter -- upgrade Roo from 1.1.5 to 1.2.1

I am upgrading current project from Roo 1.1.5 to 1.2.1.
I have noticed there are some new features in Roo 1.2.1 to facilitate JPA functionality, i.e. #RooEntity to #RooJpaActiveRecord, but I thought when I open Roo shell in STS it could handler that conversion automatically...I can still achieve that manually, however, after I change the annotation name, no matter I use poll now or re-build the project, all the getter/setter/finder/entityManager are error out due to no AspectJ injection, actually I can see the aspectJ files are generated, STS just cannot identify them with the entity java file. So suddenly the whole project falls apart.
Please, geniuses on the stack, let me know how to fix that. Many thanks in advance.
I have figured out the solution:
Simply speaking: make sure running the project as a Maven project.
How: Right click project->Configure->Convert to Maven Project. Then run Right click project -> Maven -> Update Project Configuration.
Maven will build the project once again with aspect injection. I think the problem is previously my project is compiled under Spring Tools -> Update Maven Dependencies where if the STS/AspectJ Tool stop working, then the project will suffer from missing aspect injection(still thinking it is could be a remaining bug of STS, this issue may be very specific but still STS fail the job).
Sorry I have to answer my own question
Make sure you clean your project eclipse style. That is run Project->Clean.

Resources