Coverage Report - org.mule.tools.anttasks.MulePackage
 
Classes in this File Line Coverage Branch Coverage Complexity
MulePackage
0%
0/11
N/A
1
 
 1  
 /*
 2  
 * $Id$
 3  
 * --------------------------------------------------------------------------------------
 4  
 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
 5  
 *
 6  
 * The software in this package is published under the terms of the CPAL v1.0
 7  
 * license, a copy of which has been included with this distribution in the
 8  
 * LICENSE.txt file.
 9  
 */
 10  
 package org.mule.tools.anttasks;
 11  
 
 12  
 import org.apache.tools.ant.taskdefs.Zip;
 13  
 import org.apache.tools.ant.types.ZipFileSet;
 14  
 
 15  
 import java.io.File;
 16  
 
 17  
 /**
 18  
 * Ant task to package a mule application
 19  
 *
 20  
 * XML format:
 21  
 *
 22  
 * <taskdef name="mulePackage" classname="org.mule.tools.anttasks.MulePackage"/>
 23  
 *
 24  
 * <mulePackage applicationFile="file">
 25  
 * <config (fileSet)/>
 26  
 * <classes (fileSet)/>
 27  
 * <lib (fileSet)/>
 28  
 * </mulePackage>
 29  
 */
 30  0
 public class MulePackage extends Zip
 31  
 {
 32  
     /**
 33  
 * Specify the Mule application file to install
 34  
 */
 35  
     public void setApplicationFile(File applicationFile)
 36  
     {
 37  0
         setDestFile(applicationFile);
 38  0
     }
 39  
 
 40  
     /**
 41  
 * add config files at top level
 42  
 * @param fs the zip file set to add
 43  
 */
 44  
     public void addConfig(ZipFileSet fs)
 45  
     {
 46  0
         super.addFileset(fs);
 47  0
     }
 48  
 
 49  
     /**
 50  
 * add files under lib
 51  
 * @param fs the zip file set to add
 52  
 */
 53  
     public void addLib(ZipFileSet fs)
 54  
     {
 55  
         // We just set the prefix for this fileset, and pass it up.
 56  0
         fs.setPrefix("lib/");
 57  0
         super.addFileset(fs);
 58  0
     }
 59  
 
 60  
     /**
 61  
 * add files under classes
 62  
 * @param fs the zip file set to add
 63  
 */
 64  
     public void addClasses(ZipFileSet fs)
 65  
     {
 66  
         // We just set the prefix for this fileset, and pass it up.
 67  0
         fs.setPrefix("classes/");
 68  0
         super.addFileset(fs);
 69  0
     }
 70  
 
 71  
 }