1 25 26 package org.objectweb.jonas.ant.jonasbase; 27 28 import java.io.File ; 29 30 import org.apache.tools.ant.BuildException; 31 32 import org.objectweb.jonas.ant.JOnASBaseTask; 33 34 38 public class Services extends JTask implements BaseTaskItf { 39 40 43 private static final String INFO = "[JOnAS] "; 44 45 48 private static final String SERVICES_PROPERTY = "jonas.services"; 49 50 53 private String serviceNames = null; 54 55 58 public Services() { 59 super(); 60 } 61 62 66 public void setNames(String serviceNames) { 67 this.serviceNames = serviceNames; 68 } 69 70 73 private void checkProperties() { 74 if (serviceNames == null) { 75 throw new BuildException(INFO + "Property 'dataSource ' is missing."); 76 } 77 } 78 79 82 public void execute() { 83 checkProperties(); 84 85 String jBaseConf = getDestDir().getPath() + File.separator + "conf"; 87 changeValueForKey(INFO, jBaseConf, JOnASBaseTask.JONAS_CONF_FILE, SERVICES_PROPERTY, serviceNames, false); 88 89 } 90 91 } | Popular Tags |