Where do you put your source files?

52 views
Skip to first unread message

Dan Cancro

unread,
Nov 6, 2012, 3:30:34 PM11/6/12
to scooter-...@googlegroups.com
Do you 

A) edit the files directly in [scooter installation directory]/webapps/your_particular_project or do you 
B) have a build script that copies them from a separate source directory to this directory?

If B, then are you still able to merely refresh the browser to see changes, and is there a best way to implement this build script?

John Chen

unread,
Nov 6, 2012, 8:17:33 PM11/6/12
to scooter-...@googlegroups.com
Both A) and B). For B) you do not need to copy files to scooter directory.
 
If you choose A), your project is located directly inside the scooter home directory. And you can run your project with the following command:
> java -jar tools/server.jar blog 9090
 
If you choose B), your project is not installed inside scooter home directory. You can run your project with this following command:
> java -jar tools/server.jar /home/user123/blog 9090
Your code is not going to be copied to scooter installation directory.
 
A) is good for personal desktop during development. B) may be used on a center server box and everyone/application uses the same scooter version. That would be easiter for upgrade and disk space saving. Thus good for hosting type of deployment.
 
In either case, you should be able to edit the file and refresh browser to see changes as long as you use DEVELOPMENT environment.
 
At the time of generating a war file in order to send it to production team, you can use these commands:
For A): > ant war -DappPath=webapps\blog
For B): > ant war -DappPath=/home/user123/blog

Dan Cancro

unread,
Nov 12, 2012, 6:09:54 PM11/12/12
to scooter-...@googlegroups.com
Is it true that I can also run a scooter application from within Eclipse where the source files are wherever I want them to be?

John Chen

unread,
Nov 12, 2012, 7:54:50 PM11/12/12
to scooter-...@googlegroups.com
You can load scooter application as a regular Java project to Eclipse as the generated application comes with a .class file and a .project file. But you still need to start the web server from a console screen.

But I think you can create a dynamic web project in Eclipse and deploy your scooter-powered application as a war file to tomcat within Eclipse. I haven't tried, but I think it is doable.
Reply all
Reply to author
Forward
0 new messages