Setup - Windows‎ > ‎

STS IDE



Setup STS IDE


Download or use spring-tool-suite-3.0.0.RELEASE-e4.2-win32-x86_64.zip from http://www.springsource.org/downloads/sts-ggts

Note: do not download the .exe, it has some issues and doesn't start up on 64 bit platforms.

To install, simply unzip the package to your desired location.

To start using the STS IDE , execute the STS.exe file at <spring-tool-suite-3.0.0.RELEASE-e4.2-win32-x86_64>\springsource\sts-3.0.0.RELEASE




right click on the explorer and select "import".



select the "Existing projects ..." option and click next.


select the folder where you have downloaded mycloudportal from GitHub. STS will automatically recognize the project "mycp" inside it. click finish.

NOTE: DO NOT select "copy projects into workspace"




The import process may pop up a compatibility issue, select "No"




your project is setup in STS..



click on project-->Properties. and check if all is well.




make sure builders lists the ant script " ant script to copy resource and lib folder content" and fileSync Builder.

Tomcat setup in IDE






right click on the servers pane and select new-->server.




Select Apache--> tomcat v6.0 Server and click Next




enter the path in which tomcat is installed , make sure the correct JRE is selected and click next.




do not select anything here and click Finish. To work with hotdeploy your app should not be deployed, otherwise you will end up wastign your development time whenever STS decides to deploy the app. The next tutrial on FileSync is goind to take care of this.



double click the tomcat server on server pane, this will open server configuration.



select the "use tomcat installation", this will make sure STS deploys your app on to the installed server rather than the built in server.






click on Publishing and select "never publish automatically"

change the timeouts as per your needs.





Make sure you click on save before going forward.



go to your local tomcat installation folder and make sure you have nothing but ROOT folder under webapps folder.







make sure your ROOT folder is empty since the next step fileSync will copy files here.


your tomcat setup is complete now, next setup filesync plugin in STS.



Filesync install




If file-sync plug-in is not installed , install it by going to hep --> install new software





add the http://andrei.gmxhome.de/eclipse/ plugin url

select the FileSync option and click next.

Check the project builders




go to project-->properties and Look at builders and make sure all is checked.







click on File Synchronization, check Enable.

Add the folder to be synced in your project which is webapp under main.

Set the default target for the folder which is your ROOT folder in tomcat and click OK.

Clean,build & Deploy




do a right-click on the project and select "refresh"






now first, do a project clean






then , do a project--> build Project





finally, do another "refresh"




ON the servers tab, right click on tomcat and select start.





The tomcat server should deploy ycloudportal and start fine.






Open a browser and enter http://localhost


From now on, it is plain java web development processes. you should be knowing what files to change where.

Because of file-sync, the moment you change any files, it will take care of the syncing between STS and tomcat.

if you want to add a new entity or update an existing one, change the DB in mysql directly and do a DB reverse engineer in spring roo.once the project is cleaned,built and refreshed, you can start following your normal java development methods in STS.

to do roo reverse engineering follow the below steps.

Introspect & revere engineer

Now you need to introspect the existing DB and reverse engineer the db tables .

You may end up with the following problem

roo> database introspect --schema no-schema-required

Spring Roo automatic add-on discovery service currently unavailable

JDBC driver not available for 'com.mysql.jdbc.Driver'

roo>





The solution is to execute the following

osgi  start --url file:///C:/Users/charu/.m2/repository/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar

or the path to mysql connector jar file.

And then the following

database introspect --schema no-schema-required

reverse engineer the db now ,

database reverse engineer --schema rootest  --excludeTables jbpm4_* --package ~.domain

































Comments