Install and Uninstall Joomla extensions by Ant

Overview

Using this Apache Ant extension you can automatically install/uninstall joomla extensions instead of doing a lot ofmanual work in Administrator->Extensions->Install/Uninstall area. This is very useful for setting up a continiousintegration process or for managin multiple Joomla site instances. At this moment this extension is only tested forJoomla 1.5. To start use this extension you shoud be familiar with Apache Ant basics and have installed And on yourdevelopment environment.

Installation

Download Joomla-Ant extension and all dependent libraries if required. Put extension jar and unpacked dependencies tosome place where Ant can find them. On windows systems it is usually $ANT_HOME/lib folder. On Linux system youcan put them under .ant/lib folder under your home directory.

Install Joomla extension by Ant

Go to your working directory and create simple Ant build.xml file. Define joomla-specific tasks in it:

build.xml
View source
  1. <project> <taskdef name="joomla-install-extension" classname="com.joomboss.InstallExtensionTask"/> <taskdef name="joomla-remove-extension" classname="com.joomboss.RemoveExtensionTask" /> </project>

Now create target for installing extension package:

build.xml
View source
  1. <target name="deploy"> <joomla-install-extension source="com_your_component.zip" url="http://your-joomla-site.com" adminlogin="admin" adminpassword="admin_password" ftplogin="ftp_login" ftppassword="ftppassword" /> </target>

Now you can type ant deploy in your working folder, and this command will install your extension to joomla site.

joomla-install-extansion task attributes

  • source - path to extension archieve in local filesystem (required)
  • url - URL to Joomla site (required)
  • adminLogin - Joomla Administrator's login (required)
  • adminPassword - Joomla Administrator's password (required)
  • ftpLogin - Site FTP login. Optional attribute, but it is required on most unix systems to be able to perform file operations
  • ftpPassword - Site FTP password. Optional attribute, the same as ftpLogin.

Uninstall Joomla extension

Create following target in your Ant build file:

build.xml
View source
  1. <target name="undeploy"> <joomla-remove-extension name="Name of your Extension" type="component" url="http://your-joomla-site.com" adminLogin="admin" adminPassword="admin_password" ftpLogin="site_ftp_login" ftpPassword="site_ftp_password" /> </target>

Run ant undeploy from your working directory. This will uninstall your Joomla extension.

joomla-remove-extension task attributes.

  • url - URL to Joomla site (required)
  • name - Extension name (exactly the same as it displayed in Extension Manager) (required)
  • type - Extension type - can be component, module, plugin or template. Default is component.
  • adminLogin - Joomla Administrator's login (required)
  • adminPassword - Joomla Administrator's password (required)
  • ftpLogin - Site FTP login. Required on most unix systems to be able to perform file operations
  • ftpPassword - Site FTP password.

 

 

 

 
Copyright © 2011-2012 JoomBoss. All rights reserved. Terms of Service/Disclaimer.