DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Using SpringSource Tool Suite

Using SpringSource Tool Suite

Peter Martin user avatar by
Peter Martin
·
Feb. 15, 13 · Interview
Like (0)
Save
Tweet
Share
11.58K Views

Join the DZone community and get the full member experience.

Join For Free

I've been a long time Java developer and have always used Eclipse.  Eclipse on it's own though doesn't always come with all the plugins you want.  Eclipse has gotten better over time with adding new plugins, but it used to be kind of painful to add new plugins as you'd have to also satisfy the plugin's dependencies as well.  I have always like to start off using SpringSource Tool Suite.  It comes with plugins for Spring IDE, M2Eclipse for Maven projects, AspectJ tools, the web platform tools.

This post will detail getting started with Spring Source Tool Suite and creating an initial Maven project.  I will detail all the steps necessary.

  1. If you haven't already, get the JDK and not just a JRE.  In Windows, set an environment variable  JAVA_HOME to the directory where the JDK is installed.  In my case I like to install a lot of things in an apps directory.  Many tools do not like a space in the path, so you don't want to put it in Program Files.  In my case JAVA_HOME is set to C:\apps\Java\jdk1.7.0_10.  Next add %JAVA_HOME%\bin to your path.
  2. Download  and install Spring Source Tool Suite (SSTS) for your platform.
  3. The installer will prompt you to install Maven which you should. I also like to install Maven locally on my computer so I can run it from the command line.  Follow the instructions for installing Maven outside of Eclipse.
  4. Once everything is installed, open SSTS.  To get started with Maven, you'll want to ensure you index the Maven Repositories.  The repositories are where many of the libraries you'll want to use are made available.  For instance Apache has a repository.  You can browse it here.  Indexing the repository in Eclipse helps you to search for artifacts you will want to add to your project.
    1. You need to open the Maven Repositories view.  To do so, go to the Window->Show View->Other menu.
    2. In the filter box type Maven.  Maven Repositories will be shown in the list.  Select it and press OK.
    3. Now you will see the Maven Repositories.  There should be one entry called central under Global Repositories which you will see once you expand that view.  Right click on central and select Enable Full Index.  This will take a while.  While updating, the entry will show in italics and the word updating will show within brackets.
  5. Once the repository is finished updating, you are ready to create your first project using Maven.
    1. Go to File->New->Other menu.
    2. In the filter text box, type Maven.  Select Maven Project and click Next.
    3. Leave the defaults on the next screen and click Next.
    4. Now you will be on the screen where you pick your archetype.  In Maven, an archetype is like a template for creating a project.  In this example we will leave the default which is maven-archetype-quickstart.  This archetype is for a simple Java project.  I will use this in future posts that I am going to do about Spring Integration.  From here click Next
    5. Now you will be asked to enter the GroupId, ArtifactId, Version and Package.  The first three are the coordinates that another project would use if they wanted to reference your project. GroupId is similar to a Java Package.  I would usually put com.yourorg.  ArtifactId would be your project name.  Version is used to create different versions for your application.  If it is not an official release, you would typically have -SNAPSHOT appended to the end as it does when you create your first application.  Package I would leave the default.  After entering these, click Finish.
    6. Now you have your first Maven application.  To test your configuration, you can build it in Eclipse.  Right click your project and select Run As -> and the second Maven Build.  This will bring up the Edit Configuration window.  Under Goals, type package.  Then click the Run button.  In the Console window you will notice Maven downloading a bunch of packages.  If you go to the target folder in Maven and refresh it, you should see a new Jar file for your project.

To learn more about Maven, look at their Getting Started Guide.  My next post will start to look at Spring Integration.

Apache Maven Repository (version control)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Better Performance and Security by Monitoring Logs, Metrics, and More
  • A Brief Overview of the Spring Cloud Framework
  • ChatGPT Prompts for Agile Practitioners
  • Top 5 Node.js REST API Frameworks

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: