question marks in project explorer and version errors in pom.xml using Spring STS for Jhpister generated application - maven

I have generated spring-boot and angularjs based application using jhipster and imported as existing Maven Project in Spring STS.
The application is running fine but I did not understand what are those question marks (?) in the project explorer are? and also red marks in pom.xml for versions indicate?.
But still the application is running fine. I am not sure whether these issues cause problems in future and how can I get rid of them?

The question marks are coming from the version control integration and indicate that those files are not yet committed to version control.
The squiggle lines in the pom should reveal more information if you hover over them.

Related

Really removing a package from a Spring Boot / Maven / IntelliJ project

I'm building a web server using Spring Boot, Kotlin and IntelliJ and am learning a lot. I added Thymeleaf but decided later than it didn't meet my needs, removed it from the POM and rebuilt the project.
On startup, Thymeleaf was still looking for the /templates/ folder (which I'd also removed), even though Thymeleaf was no longer a part of the project, supposedly. A project-wide search (shift-ctrl-F) for thyme, case-folding, found nothing, so I closed the project and used the GNU find command-line utility to search for thyme in the project hierarchy. That found references in project.iml and some .xml files under .idea/libraries. I removed those, re-opened and rebuilt the project, and it no longer mentioned /templates/ or Thymeleaf on startup.
So my question is: what would have been the 'official' non-hacky way of removing the Thymeleaf package from my project? I am now wondering what other unwanted libraries are in the project, and how I should remove them.

How to create a Java EE 7 Maven IntelliJ Project

I am new to Stack Overflow because of my frustration to build a working Java EE 7 Project with Maven and IntelliJ ultimate.
I learned a lot about JPA and JSF in the last weeks and am thrilled to put my knowledge to use but unfortunately I am not able to create a working project structure as I get all sorts of errors along the way. I haven't found a single up to date tutorial which is working on the entire Internet.
My greatest achievement is creating a Maven project, and run the index page on a Jboss Wildfly (11) server.
I know Maven (3) requires a certain structure to work, I read that it is the one in picture 1.
Picture 1
Furthermore I know that I can add framework support by right clicking the project name and that I can add facets or modules by selecting files and project structure.
I would be very thankful if someone could explain the right creation of such a project. I already wasted double digit hours and lost a lot of fun.
I had to create a Maven Project with IntelliJ. After that I added JavaEE Application under Framework Support and checked the boxes for JSF and Web Application under Java EE aswell.
Now this doesn't work alone, I had to put this in the right structure Maven requires. I moved the META-INF Folder to main/src/resources. After renaming the web Folder to webapp, I moved it to src/main.
To check, go to Project Structure/ Facets and check if the paths are set correctly.
After adding a local Wildfly 11 Server Artifact (war), IntelliJ starts the default browser and I get to the index page.
The Project Structure
I recommend you take a look at JetBrains page, they have a lot of tutorials on how to use their products. Here how to create new Maven project:
https://www.jetbrains.com/help/idea/maven.html#maven_create_project
Also, here you have information how an example pom.xml file looks like and how to build it:
https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
When you develop your project you can add dependencies to the pom.xml file

JSP with IntelliJ

Since a while I started to use IntelliJ instead of Eclipse. I created my project from Eclipse (where it was working) in IntelliJ and I can start the Spring Boot Application. As a Front-end I use JSP files, but when I open the project in my browser it shows only the HTML code, not the actual website. Can anyone help me with this problem?
I am aware that this thread is 3 years old, but since I'm currently working on something similar (spring boot + web application + jsp + intellij ultimate as IDE), wanted to share my experience...
created spring web application using spring initializr (provided
inside intellij IDEA)
created webapp folder under src/main
opened project structure window (ctrl-shift-alt), selected modules under project settings
in the middle window pane, selected Web
added newly created folder (src/main/webapp) under "web resources
directory"
applied changes
After that, in my "left click - new" drop down menu, jsp files were also provided...
My current Intellij IDEA Ultimate version is 2020.1
Hope this helps...
I also faced similar kind of issue earlier. I have solved it by adding the following dependency.
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
I have created a project sometime ago to cover this issue. The link to the project is mentioned below. Please refer it. I wish it will help you.
Spring Boot Maven Webapp

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.

STS M2E 'Plugin execution not covered by lifecycle configuration" Error - Flex-Mojos

I am trying to write my pom.xml for a multimodal flex application. I have been using this resource as an example:
http://www.sonatype.com/books/mvnref-book/reference/flex-dev-sect-creating-with-archetype.html
I am using M2E v1.01 but I am faced with a number of 'Plugin execution not covered by lifecycle configuration" errors. As far as I can see - there are no m2E connectors available to resolve this and I have tried all the Maven advice I can find - to include:
Clean
Update dependencies
Update project configuration
The problem only occurs if the project is declared as swc or swf package. My next move to ask Eclipse to 'permanently mark goal as ignored' - which seems a little brash.
Any advice would be appreciated.
Thanks in advance.
With STS 2.8.0, we have upgraded m2eclipse to be version 1.0. However, this can cause a bit of trouble with existing projects. I wrote a blog on this a couple of months ago.
http://blog.springsource.org/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/
Essentially, the new architecture for m2eclipse requires that each maven plugin you use must be mapped to one Eclipse plugin to handle the plugin's execution inside of Eclipse. This obviously causes problems since not every maven plugin author has the knowledge or time to create also create and maintain an Eclipse plugin.
By marking the plugin as ignored, you are saying that the plugin should never be executed inside of Eclipse (implying that whenever you need it to be executed, you will do so from the command line). Once marked as ignored, you can then change it to execute, which means that it should always be executed whenever the associated lifecycle is performed in Eclipse. This may cause performance problems, and so only do it if you know the risks.
If all this is too much for you, then STS provides a downgrade option to revert to an older version of m2eclipse. Go to the Dashboard extensions page. Unfortunately, you will have to manually revert all changes to your .project and .classpath files (we provide an auto-upgrade mechanism, but not a downgrade mechanism...presumably everything is in version control).
Any questions or problems should be sent to the STS forums:
http://forum.springsource.org/forumdisplay.php?32-SpringSource-Tool-Suite
You can check this alpha connector "Flex Maven Integration for Flash Builder" on the eclipse marketplace: http://marketplace.eclipse.org/node/648556.

Resources