1 8 package org.apache.avalon.phoenix.tools.xdoclet; 9 10 import java.net.URL ; 11 import xdoclet.TemplateSubTask; 12 import xdoclet.XDocletException; 13 14 22 public class ManifestSubTask 23 extends TemplateSubTask 24 { 25 private static final String DEFAULT_TEMPLATE_FILE = 26 "/org/apache/avalon/phoenix/tools/xdoclet/manifest.xdt"; 27 private String m_manifestFile; 28 29 public ManifestSubTask() 30 { 31 System.out.println( "WARNING: manifest generation has " + 32 "never been required by Phoenix and is considered, " + 33 "a deprecated practice." ); 34 setupParams(); 35 } 36 37 public void setManifestFile( final String manifestFile ) 38 { 39 m_manifestFile = manifestFile; 40 setDestinationFile( m_manifestFile ); 41 } 42 43 private void setupParams() 44 { 45 setSubTaskName( "manifest" ); 46 final URL resource = getClass().getResource( DEFAULT_TEMPLATE_FILE ); 47 setTemplateURL( resource ); 48 setDestinationFile( "manifest.mf" ); 49 setOfType( "org.apache.avalon.phoenix.Block" ); 50 setAcceptAbstractClasses( false ); 51 } 52 53 protected void engineStarted() throws XDocletException 54 { 55 System.out.println( "Generating Manifest file: " + getDestinationFile() ); 56 } 57 } 58 | Popular Tags |