I have wanted to learn Spring MVC and I took look at javavids - YouTube, I wanted to follow along with this series but I have multiple problems/issues First I rebuild the Global repo in Maven Repositories
Solved
then I created Maven project but structure in videos was
but I have this instead
Solved
OK now I want to add plugins to pom.xml but getting this dialog in videos it shows :
UPDATE
I don't get any plug-in to select from
Solved
I also have compiler compliance
when I set compiler to java 1.7 then I get
Solved
and at last when I tried to update STS 3.6.3 It freezes and shows
OK
I have proxy settings as
Update
I make changes and add dependency according to this Answer
I get this error:
Now I don't see resources which can help me to get these remaining issues resolved!
any help is highly appreciated.
Spring Tools 4.13. 1 is scheduled to be released in early Feb 2022. Enjoy!
2. RELEASE, STS is available at no cost and free for all development purposes; no strings attached. It is licensed under a commercial license, which you can review here.
Getting started. Visit the site https://spring.io/tools/sts/all and download the STS 3.8 release for Windows, Linux, or macOS. In our case, we will be opting for the Windows version. It is also available in 32-bit or 64-bit operating systems.
First maven default compiler level is set to 1.5. In order to set it to 1.7 either configure maven-compiler-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
or add the following properties.
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
After setting java version press Alt+F5 to update maven project.
In order to search for dependency or plugins go to Window -> Preferences -> Maven and check Download repository index update on startup
Restart STS, wait for index updates to complete.
Regarding your project structure check do have <packaging>war</packaging>
in your pom.xml. By default it will be jar
type.
then I created Maven project but structure in videos was
You be able to switch the perspective in the ide (eclipse). In the video that is the Java EE-Perspective.
That what you got is the Spring-Perspective, don't worry about that.
Window -> Open Perspective
OK now I want to add plugins to pom.xml but getting this dialog
Ok, what is wrong with that?
If you searching for a dependency on MVN Repository there you got all informationen to fill out the informations you see in the dialog. Otherwise you can open the pom
-file and paste the dependency directly.
I also have compiler compliance
Assuming that you are using the m2e plugin in Eclipse, you'll need to specify the source and target versions as 1.7 for maven-compiler-plugin.
specify it with this:
<properties>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
</properties>
And update your project Right click on project -> maven -> update project (Alt F5)
The network seems to be ok. Are you on a privat or office network?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With