Why does Eclipse New Maven Project not list Spring Boot Starters? - eclipse

I have the latest version of Eclipse and am creating a basic Spring Boot Web project.
When I use the New -> ... -> New Maven Project and use the dialog to browse Maven Central for the Spring-Boot-Starter-Web artifact it isn't listed.
Why is Eclipse not listing it?
The configured repository is https://repo1.maven.org/maven2 (Maven Central) which is where Spring-Boot-Starter-Web is meant to reside. (https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web/2.2.4.RELEASE)
I know how to use https://start.spring.io/ to create a spring boot start application so my question is not about how to create one.
What I want to know is what is it about Eclipse, or Maven, that prevents the Spring Boot Starters showing up. I am concerned that there may be plenty of other artefacts that are not visible here and would like to understand the rational for this so I can anticipate what may not be visible.
I appreciate I'm assuming here that a logical reason exists and apologises if it has more to do with how Eclipse feels about things to do with Spring Framework.

You can add in Eclipse from the Help -> Eclipse Marketplace the Spring tools plugin (probably you'll find a newer version of the plugin):
After install it, you'll be able to create a Spring Boot project managing the dependencies at creation time. Select Spring Boot -> Spring Starter Project:
Then you can select which maven dependencies to add:

it lists certain Maven archetype which Spring Boot starters aren't.
It's that simple.
Also, if you have archetypes (e.g. your company makes its own) you can add them to the list of archetypes known to your IDE.

Related

is maven required to develop spring based project?

I am developing (Single developer) a Spring based project for a Traveling based website.
and this is my first Spring based project, I want to use Maven in my project, because hosting sites like Cloud Bees expecting maven based project for deployment.
Is Maven required to develop Spring based project in Single developer environment.
FYI I am using eclipse IDE.
No it is not required.
You can develop in Spring using Ant or Maven or Gradle etc. or nothing at all.
Although it might be easier to do it with Maven (for library management)
It is not required per se, but you will run into some serious pain down the road if you don't use Maven or Gradle.
The first and foremost reason to use Maven or Gradle is to be able to very simply run tasks that occur ofter (like building a war or running the tests) and to be able to declaratively obtain the required dependencies (which in the case of a typical Spring application are plentiful).
If you are just starting to use build tool, I would suggest you take look at Gradle instead of Maven.

Maven Eclipse Integration

I have recently started out on Maven. I am trying to integrate Maven+eclipse(Juno)+tomcat7.
I have downloaded m2e-wtp plugin for eclipse and created a Maven project whose structure follows a standard Maven project structure. It is also configured a dynamic web project.
It is a multi module project with two modules of flex(f1 AND f2) and one module of webapp(w).I have configured all the plugins correctly and there is no problem with configuration of POMs.
What I want to achieve is :
When I clean and Build project in Eclipse using Project-->Clean,Eclipse does not build the war in target folder of my web application project (w). I also does not copy any of the flex resources to target folder. However,
When I run the project as maven build by right-clicking the web application project and running it as a "maven install" it creates everything as expected.
My question is that if it is possible to achieve what I mentioned in point (1)? Or the only correct way to do this is the way mentioned in point (2).
I am also not able to deploy the generted files in step 2 automatically in tomcat.
Do I need to use another maven plugin for this?
Please note that this i my first experience with Maven + eclispe. I have followed certain tutorials. So, Please be lenient while voting negatively.
From what I know it is not possible to force Eclipse to use Maven directly (I would gladly be proven wrong).
Eclipse does not use Maven to build (1). Using the m2e plugin, it is possible to run maven to perform the build as you discovered (2).
If you are looking for that kind of tight integration you can look at NetBeans or IntelliJ who are using Maven natively.
EDIT:
About (3) there is a Tomcat-Maven-Plugin that can deploy the WAR file created on a running tomcat instance. Check the Usage page for more details.

Where to download Spring Roo 1.2.4 runtime?

I'm running Eclipse Juno 4.2 (upgraded from Indigo 3.7), with the Spring Tool Suite tools installed. A while ago I had installed Spring Roo 1.2.2.RELEASE, and configured the Roo plugin to point to the 1.2.2.RELEASE runtime.
I would now like to upgrade to Spring 1.2.4.RELEASE, but cannot find the runtime anywhere. I've looked on the Spring site, but cannot seem to find a download link to it anywhere.
So a few questions:
1) Is the runtime still required as a separate download and do I still need to configure Eclipse to point to it separately?
2) Where can I download the runtime from?
3) Why do I need the separate runtime? Why is STS/Eclipse not smart enough to use the Roo artifact that is included in my maven project?
I still don't why I need the separate runtime to configure Eclipse, however, I did finally find a download link for the latest ROO packages: http://docs.spring.io/downloads/nightly/release-download.php?project=ROO

Best practice for create web project in Eclipse/STS that supports maven and spring 3+

I recently completed the SpringCore training but never got this answer. I want to know the best possible way to create Dynamic Web Project in STS/Eclipse that supports Maven and Spring 3+
Is it to use the wizard and create a Dynamic Web Project then add Maven support and Spring Behavior?
Is it to use the wizard and create a Maven project and use archetype webapp then add Spring support?
Is it to use the wizard and create a Spring project add the Java EE project facet and Maven Support?
Is it something totally different?
I choose to create first dynamic web project, then add spring behavior and finally to build the project i am using maven.. which is really a powerfull tool.

How to build Spring Roo project without maven?

How to build Spring Roo project without maven?
P.S. I use STS to create Roo project. I use maven for dependency management. Thanks to m2eclipse I have all libraries on eclipse classpath.
I have other non-Maven referenced. So maven fails to build.
You can't. Well, I suppose you could manually create an Ant-based build file that would do the same thing, but why?
One of the purposes behind Roo is that it helps manage the dependencies and build processes necessary for your chosen data persistence architecture. Maven is currently the standard build tool for doing just that, and you get its best practices implemented for you by creating the project via Roo.
Alternatively, if you're just trying to import a Roo-created project into Eclipse try ...
roo> perform eclipse
...
That will generate Eclipse project files that you can import.
This is about using custom maven artifacts.
Create a custom Maven repository, place your referenced jars in there and include them as dependencies in your pom.xml file.
Learn some Maven, it would really help - specially when working with Roo.