Home arrow Web Authoring arrow Page 2 - Deploying your Site with PHPEclipse, continued
WEB AUTHORING

Deploying your Site with PHPEclipse, continued


Eclipse simplifies the process of deploying your site to a web server. You can even use Ant, traditionally thought of as a Java tool, to help you in the deployment. This article, the second of two parts, explains how. It is excerpted from PHPEclipse: A User Guide, written by Shu-Wai Chow (Packt Publishing, 2006; ISBN: 1904811442).

Author Info:
By: PACKT Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
March 16, 2006
TABLE OF CONTENTS:
  1. · Deploying your Site with PHPEclipse, continued
  2. · Running an Ant Script
  3. · Ant Tools
  4. · What This Book Covers

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Deploying your Site with PHPEclipse, continued - Running an Ant Script
(Page 2 of 4 )

 

To run an Ant Script, select the build.xml file in the Navigator view. Select the Run | External Tools | Run As | Ant Build menu option. Eclipse will automatically trigger the build file. The results of our execution will be output in the Console view.

  Buildfile: /Library/WebServer/Documents/ ShelterSite/build.xml
  startPublish:
  getFilesFromCVS: 
       [cvs] cvs checkout: Updating ShelterSite
        [cvs] U ShelterSite/.project
        [cvs] U ShelterSite/CatAction.php 
        [cvs] U ShelterSite/ViewCats.php
        [cvs] cvs checkout: Updating ShelterSite/classes
        [cvs] U ShelterSite/classes/clsCat.php
        [cvs] U ShelterSite/classes/clsCatView.php
        [cvs] U ShelterSite/classes/clsDatabase.php
        [cvs] U ShelterSite/classes/clsPet.php
        [cvs] cvs checkout: Updating ShelterSite/styles
        [cvs] U ShelterSite/styles/shelter.css
  startFTP:
        [ftp] sending files
        [ftp] 7 files sent
  cleanUp:
   
[delete] Deleting directory /tmp/ShelterSite
  BUILD SUCCESSFUL
  Total time: 8 seconds

If there are any errors during the execution, they will also output here to help you troubleshoot.

Avoid Putting FTP Passwords in Build Files

You may want to avoid putting passwords in build files, since they are simple text files. To do this, reference them with a dollar sign and bracket: ${ftpPassword}. When you execute the file, pass in an argument. To pass Ant arguments in Eclipse, go to the Run | External Tools | External Tools… menu option. Ant files have configuration profiles much like debugging configurations. This window will pull up the configuration for a particular Ant file. Highlight the build file you wish to work with and in the Main tab's Arguments area, type in –DftpPassword="YourSecretPassword" where ftpPassword is the name of the variable you specified in the build file and the enclosing quotes hold your password. Note the dash at the beginning of the argument and that there is no space after the D flag and the variable name.


blog comments powered by Disqus
WEB AUTHORING ARTICLES

- Top WordPress Plugins for Social Media
- How to Install WordPress on WAMPP
- More of the Best Wordpress Plugins for Comme...
- Top Wordpress Plugins to Fight Spam
- More of the top Drupal modules for SEO
- Top Drupal Modules for SEO
- More Top Wordpress Plugins for SEO
- Website Optimization Tips
- Backup and Restore a Drupal Website and Data...
- 5 Best Web Font Services
- Web Font Embedding Services
- Joomla Site Administration
- Create PHP Pages that Use WordPress Templates
- Top Joomla Extensions for Social Networking
- Drupal Modules for Site Navigation

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials