git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269066 13f79535-47bb-0310-9956-ffa450edef68master
@@ -58,7 +58,7 @@ Legal: | |||||
<property name="dist.bin" value="${dist.dir}/bin"/> | <property name="dist.bin" value="${dist.dir}/bin"/> | ||||
<property name="dist.lib" value="${dist.dir}/lib"/> | <property name="dist.lib" value="${dist.dir}/lib"/> | ||||
<property name="constants.file" value="org/apache/ant/Constants.java"/> | |||||
<property name="constants.file" value="org/apache/myrmidon/Constants.java"/> | |||||
<path id="project.class.path"> | <path id="project.class.path"> | ||||
<pathelement path="${java.class.path}" /> | <pathelement path="${java.class.path}" /> | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.convert; | package org.apache.ant.convert; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
/** | /** | ||||
* ConverterException thrown when a problem occurs during convertion etc. | * ConverterException thrown when a problem occurs during convertion etc. | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.convert.engine; | package org.apache.ant.convert.engine; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.convert.Converter; | import org.apache.ant.convert.Converter; | ||||
import org.apache.ant.convert.ConverterException; | import org.apache.ant.convert.ConverterException; | ||||
import org.apache.avalon.framework.logger.AbstractLoggable; | import org.apache.avalon.framework.logger.AbstractLoggable; | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.ant.modules.basic; | package org.apache.ant.modules.basic; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
import org.apache.myrmidon.components.manager.ProjectManager; | import org.apache.myrmidon.components.manager.ProjectManager; | ||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.modules.basic; | package org.apache.ant.modules.basic; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
/** | /** | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.modules.basic; | package org.apache.ant.modules.basic; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.tasklet.DataType; | import org.apache.ant.tasklet.DataType; | ||||
import org.apache.ant.util.Condition; | import org.apache.ant.util.Condition; | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.ant.modules.basic; | package org.apache.ant.modules.basic; | ||||
import java.util.Iterator; | import java.util.Iterator; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.convert.Converter; | import org.apache.ant.convert.Converter; | ||||
import org.apache.ant.tasklet.DataType; | import org.apache.ant.tasklet.DataType; | ||||
import org.apache.ant.tasklet.engine.DataTypeEngine; | import org.apache.ant.tasklet.engine.DataTypeEngine; | ||||
@@ -61,11 +61,18 @@ public class Property | |||||
final String name = attributes[ i ]; | final String name = attributes[ i ]; | ||||
final String value = configuration.getAttribute( name ); | final String value = configuration.getAttribute( name ); | ||||
final Object object = getContext().resolveValue( value ); | |||||
Object object = null; | |||||
try { object = getContext().resolveValue( value ); } | |||||
catch( final AntException ae ) | |||||
{ | |||||
throw new ConfigurationException( "Error resolving value: " + value, ae ); | |||||
} | |||||
if( null == object ) | if( null == object ) | ||||
{ | { | ||||
throw new AntException( "Value for attribute " + name + "resolved to null" ); | |||||
throw new ConfigurationException( "Value for attribute " + name + "resolved to null" ); | |||||
} | } | ||||
if( name.equals( "name" ) ) | if( name.equals( "name" ) ) | ||||
@@ -83,7 +90,11 @@ public class Property | |||||
} | } | ||||
else if( name.equals( "value" ) ) | else if( name.equals( "value" ) ) | ||||
{ | { | ||||
setValue( object ); | |||||
try { setValue( object ); } | |||||
catch( final AntException ae ) | |||||
{ | |||||
throw new ConfigurationException( "Error setting value: " + value, ae ); | |||||
} | |||||
} | } | ||||
else if( name.equals( "local-scope" ) ) | else if( name.equals( "local-scope" ) ) | ||||
{ | { | ||||
@@ -10,12 +10,12 @@ package org.apache.ant.modules.core; | |||||
import java.io.File; | import java.io.File; | ||||
import java.net.MalformedURLException; | import java.net.MalformedURLException; | ||||
import java.net.URL; | import java.net.URL; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.ant.tasklet.engine.DataTypeEngine; | import org.apache.ant.tasklet.engine.DataTypeEngine; | ||||
import org.apache.avalon.framework.camelot.RegistryException; | import org.apache.avalon.framework.camelot.RegistryException; | ||||
import org.apache.avalon.framework.component.ComponentException; | import org.apache.avalon.framework.component.ComponentException; | ||||
import org.apache.avalon.framework.component.ComponentManager; | import org.apache.avalon.framework.component.ComponentManager; | ||||
import org.apache.avalon.framework.component.Composable; | import org.apache.avalon.framework.component.Composable; | ||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
import org.apache.myrmidon.components.deployer.TskDeployer; | import org.apache.myrmidon.components.deployer.TskDeployer; | ||||
import org.apache.myrmidon.components.executor.Executor; | import org.apache.myrmidon.components.executor.Executor; | ||||
@@ -90,6 +90,7 @@ public abstract class AbstractResourceRegisterer | |||||
} | } | ||||
protected URL getURL( final String libName ) | protected URL getURL( final String libName ) | ||||
throws AntException | |||||
{ | { | ||||
if( null != libName ) | if( null != libName ) | ||||
{ | { | ||||
@@ -10,7 +10,7 @@ package org.apache.ant.modules.core; | |||||
import java.io.File; | import java.io.File; | ||||
import java.net.MalformedURLException; | import java.net.MalformedURLException; | ||||
import java.net.URL; | import java.net.URL; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.convert.engine.ConverterEngine; | import org.apache.ant.convert.engine.ConverterEngine; | ||||
import org.apache.ant.convert.engine.DefaultConverterInfo; | import org.apache.ant.convert.engine.DefaultConverterInfo; | ||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
@@ -126,6 +126,7 @@ public class RegisterConverter | |||||
} | } | ||||
protected URL getURL( final String libName ) | protected URL getURL( final String libName ) | ||||
throws AntException | |||||
{ | { | ||||
if( null != libName ) | if( null != libName ) | ||||
{ | { | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.ant.modules.core; | package org.apache.ant.modules.core; | ||||
import java.net.URL; | import java.net.URL; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.framework.camelot.DefaultLocator; | import org.apache.avalon.framework.camelot.DefaultLocator; | ||||
import org.apache.avalon.framework.camelot.DeploymentException; | import org.apache.avalon.framework.camelot.DeploymentException; | ||||
import org.apache.avalon.framework.camelot.RegistryException; | import org.apache.avalon.framework.camelot.RegistryException; | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.ant.modules.core; | package org.apache.ant.modules.core; | ||||
import java.net.URL; | import java.net.URL; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.framework.camelot.DefaultLocator; | import org.apache.avalon.framework.camelot.DefaultLocator; | ||||
import org.apache.avalon.framework.camelot.DeploymentException; | import org.apache.avalon.framework.camelot.DeploymentException; | ||||
import org.apache.avalon.framework.camelot.RegistryException; | import org.apache.avalon.framework.camelot.RegistryException; | ||||
@@ -10,11 +10,11 @@ package org.apache.ant.modules.core; | |||||
import java.io.File; | import java.io.File; | ||||
import java.net.MalformedURLException; | import java.net.MalformedURLException; | ||||
import java.net.URL; | import java.net.URL; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.avalon.framework.camelot.DeploymentException; | import org.apache.avalon.framework.camelot.DeploymentException; | ||||
import org.apache.avalon.framework.component.ComponentException; | import org.apache.avalon.framework.component.ComponentException; | ||||
import org.apache.avalon.framework.component.ComponentManager; | import org.apache.avalon.framework.component.ComponentManager; | ||||
import org.apache.avalon.framework.component.Composable; | import org.apache.avalon.framework.component.Composable; | ||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
import org.apache.myrmidon.components.deployer.TskDeployer; | import org.apache.myrmidon.components.deployer.TskDeployer; | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.modules.test; | package org.apache.ant.modules.test; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||
import org.apache.avalon.framework.configuration.Configurable; | import org.apache.avalon.framework.configuration.Configurable; | ||||
@@ -28,7 +28,15 @@ public class ConfigurationTest | |||||
throws ConfigurationException | throws ConfigurationException | ||||
{ | { | ||||
String message = configuration.getAttribute( "message" ); | String message = configuration.getAttribute( "message" ); | ||||
final Object object = getContext().resolveValue( message ); | |||||
Object object = null; | |||||
try { object = getContext().resolveValue( message ); } | |||||
catch( final AntException ae ) | |||||
{ | |||||
throw new ConfigurationException( "Error resolving : " + message, ae ); | |||||
} | |||||
if( object instanceof String ) | if( object instanceof String ) | ||||
{ | { | ||||
m_message = (String)object; | m_message = (String)object; | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.modules.test; | package org.apache.ant.modules.test; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
/** | /** | ||||
@@ -8,7 +8,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.modules.test; | package org.apache.ant.modules.test; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
/** | /** | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.modules.test; | package org.apache.ant.modules.test; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
/** | /** | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.ant.util; | package org.apache.ant.util; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.framework.component.Component; | import org.apache.avalon.framework.component.Component; | ||||
import org.apache.avalon.framework.context.Context; | import org.apache.avalon.framework.context.Context; | ||||
import org.apache.avalon.framework.context.ContextException; | import org.apache.avalon.framework.context.ContextException; | ||||
@@ -42,6 +42,7 @@ public class Condition | |||||
} | } | ||||
public boolean evaluate( final Context context ) | public boolean evaluate( final Context context ) | ||||
throws AntException | |||||
{ | { | ||||
boolean result = false; | boolean result = false; | ||||
@@ -5,26 +5,26 @@ | |||||
* version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
* the LICENSE file. | * the LICENSE file. | ||||
*/ | */ | ||||
package org.apache.ant; | |||||
package org.apache.myrmidon; | |||||
import org.apache.avalon.framework.CascadingRuntimeException; | |||||
import org.apache.avalon.framework.CascadingException; | |||||
/** | /** | ||||
* AntException thrown when a problem with tasks etc. | * AntException thrown when a problem with tasks etc. | ||||
* It is cascading so that further embedded information can be contained. | |||||
* It is cascading so that further embedded information can be contained. | |||||
* ie ANtException was caused by IOException etc. | * ie ANtException was caused by IOException etc. | ||||
* It is RuntimeException as it has to pass through a number of Java-defined | * It is RuntimeException as it has to pass through a number of Java-defined | ||||
* interfaces - ala Runnable and also to aid in ease of indicating an error. | * interfaces - ala Runnable and also to aid in ease of indicating an error. | ||||
* | |||||
* | |||||
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | ||||
*/ | */ | ||||
public class AntException | public class AntException | ||||
extends CascadingRuntimeException | |||||
extends CascadingException | |||||
{ | { | ||||
/** | /** | ||||
* Basic constructor with a message | * Basic constructor with a message | ||||
* | * | ||||
* @param message the message | |||||
* @param message the message | |||||
*/ | */ | ||||
public AntException( final String message ) | public AntException( final String message ) | ||||
{ | { | ||||
@@ -34,7 +34,7 @@ public class AntException | |||||
/** | /** | ||||
* Constructor that builds cascade so that other exception information can be retained. | * Constructor that builds cascade so that other exception information can be retained. | ||||
* | * | ||||
* @param message the message | |||||
* @param message the message | |||||
* @param throwable the throwable | * @param throwable the throwable | ||||
*/ | */ | ||||
public AntException( final String message, final Throwable throwable ) | public AntException( final String message, final Throwable throwable ) |
@@ -5,7 +5,7 @@ | |||||
* version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
* the LICENSE file. | * the LICENSE file. | ||||
*/ | */ | ||||
package org.apache.ant; | |||||
package org.apache.myrmidon; | |||||
/** | /** | ||||
* Abstract interface to hold constants. | * Abstract interface to hold constants. |
@@ -5,7 +5,7 @@ | |||||
* version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
* the LICENSE file. | * the LICENSE file. | ||||
*/ | */ | ||||
package org.apache.ant; | |||||
package org.apache.myrmidon; | |||||
import java.io.BufferedReader; | import java.io.BufferedReader; | ||||
import java.io.File; | import java.io.File; | ||||
@@ -37,11 +37,11 @@ import org.apache.myrmidon.api.TaskContext; | |||||
import org.apache.myrmidon.components.builder.ProjectBuilder; | import org.apache.myrmidon.components.builder.ProjectBuilder; | ||||
import org.apache.myrmidon.components.embeddor.Embeddor; | import org.apache.myrmidon.components.embeddor.Embeddor; | ||||
import org.apache.myrmidon.components.embeddor.MyrmidonEmbeddor; | import org.apache.myrmidon.components.embeddor.MyrmidonEmbeddor; | ||||
import org.apache.myrmidon.launcher.LauncherClassLoader; | |||||
import org.apache.myrmidon.listeners.ProjectListener; | |||||
import org.apache.myrmidon.components.model.Project; | |||||
import org.apache.myrmidon.components.manager.LogTargetToListenerAdapter; | import org.apache.myrmidon.components.manager.LogTargetToListenerAdapter; | ||||
import org.apache.myrmidon.components.manager.ProjectManager; | import org.apache.myrmidon.components.manager.ProjectManager; | ||||
import org.apache.myrmidon.components.model.Project; | |||||
import org.apache.myrmidon.launcher.LauncherClassLoader; | |||||
import org.apache.myrmidon.listeners.ProjectListener; | |||||
/** | /** | ||||
* The class to kick the tires and light the fires. | * The class to kick the tires and light the fires. | ||||
@@ -510,6 +510,7 @@ public class Main | |||||
* @param map the map of names->values | * @param map the map of names->values | ||||
*/ | */ | ||||
protected void addToContext( final TaskContext context, final Map map ) | protected void addToContext( final TaskContext context, final Map map ) | ||||
throws AntException | |||||
{ | { | ||||
final Iterator keys = map.keySet().iterator(); | final Iterator keys = map.keySet().iterator(); | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.myrmidon.api; | package org.apache.myrmidon.api; | ||||
import java.io.File; | import java.io.File; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.excalibur.io.FileUtil; | import org.apache.avalon.excalibur.io.FileUtil; | ||||
import org.apache.avalon.excalibur.property.PropertyException; | import org.apache.avalon.excalibur.property.PropertyException; | ||||
import org.apache.avalon.excalibur.property.PropertyUtil; | import org.apache.avalon.excalibur.property.PropertyUtil; | ||||
@@ -116,6 +116,7 @@ public class DefaultTaskContext | |||||
* @return the resolved property | * @return the resolved property | ||||
*/ | */ | ||||
public Object resolveValue( final String property ) | public Object resolveValue( final String property ) | ||||
throws AntException | |||||
{ | { | ||||
try { return PropertyUtil.resolveProperty( property, this, false ); } | try { return PropertyUtil.resolveProperty( property, this, false ); } | ||||
catch( final PropertyException pe ) | catch( final PropertyException pe ) | ||||
@@ -147,6 +148,7 @@ public class DefaultTaskContext | |||||
* @param value the value of property | * @param value the value of property | ||||
*/ | */ | ||||
public void setProperty( final String name, final Object value ) | public void setProperty( final String name, final Object value ) | ||||
throws AntException | |||||
{ | { | ||||
setProperty( name, value, CURRENT ); | setProperty( name, value, CURRENT ); | ||||
} | } | ||||
@@ -156,7 +158,8 @@ public class DefaultTaskContext | |||||
* | * | ||||
* @param property the property | * @param property the property | ||||
*/ | */ | ||||
public void setProperty( final String name, final Object value, final ScopeEnum scope ) | |||||
public void setProperty( final String name, final Object value, final ScopeEnum scope ) | |||||
throws AntException | |||||
{ | { | ||||
checkPropertyValid( name, value ); | checkPropertyValid( name, value ); | ||||
@@ -182,7 +185,7 @@ public class DefaultTaskContext | |||||
context = (DefaultTaskContext)context.m_parent; | context = (DefaultTaskContext)context.m_parent; | ||||
} | } | ||||
context.put( name, value ); | |||||
context.putValue( name, value ); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -199,7 +202,8 @@ public class DefaultTaskContext | |||||
* @param key the key | * @param key the key | ||||
* @param value the value | * @param value the value | ||||
*/ | */ | ||||
public void put( final Object key, final Object value ) | |||||
public void putValue( final Object key, final Object value ) | |||||
throws AntException | |||||
{ | { | ||||
if( key.equals( BASE_DIRECTORY ) ) | if( key.equals( BASE_DIRECTORY ) ) | ||||
{ | { | ||||
@@ -211,7 +215,7 @@ public class DefaultTaskContext | |||||
} | } | ||||
} | } | ||||
super.put( key, value ); | |||||
put( key, value ); | |||||
} | } | ||||
/** | /** | ||||
@@ -10,6 +10,7 @@ package org.apache.myrmidon.api; | |||||
import java.io.File; | import java.io.File; | ||||
import org.apache.avalon.framework.Enum; | import org.apache.avalon.framework.Enum; | ||||
import org.apache.avalon.framework.context.Context; | import org.apache.avalon.framework.context.Context; | ||||
import org.apache.myrmidon.AntException; | |||||
/** | /** | ||||
* This interface represents the <em>Context</em> in which Task is executed. | * This interface represents the <em>Context</em> in which Task is executed. | ||||
@@ -65,7 +66,8 @@ public interface TaskContext | |||||
* @param filename the filename to resolve | * @param filename the filename to resolve | ||||
* @return the resolved file | * @return the resolved file | ||||
*/ | */ | ||||
File resolveFile( String filename ); | |||||
File resolveFile( String filename ) | |||||
throws AntException; | |||||
/** | /** | ||||
* Resolve property. | * Resolve property. | ||||
@@ -74,7 +76,8 @@ public interface TaskContext | |||||
* @param property the property to resolve | * @param property the property to resolve | ||||
* @return the resolved property | * @return the resolved property | ||||
*/ | */ | ||||
Object resolveValue( String property ); | |||||
Object resolveValue( String property ) | |||||
throws AntException; | |||||
/** | /** | ||||
* Retrieve property for name. | * Retrieve property for name. | ||||
@@ -90,7 +93,8 @@ public interface TaskContext | |||||
* @param name the name of property | * @param name the name of property | ||||
* @param value the value of property | * @param value the value of property | ||||
*/ | */ | ||||
void setProperty( String name, Object value ); | |||||
void setProperty( String name, Object value ) | |||||
throws AntException; | |||||
/** | /** | ||||
* Set property value. | * Set property value. | ||||
@@ -99,7 +103,8 @@ public interface TaskContext | |||||
* @param value the value of property | * @param value the value of property | ||||
* @param scope the scope at which to set property | * @param scope the scope at which to set property | ||||
*/ | */ | ||||
void setProperty( String name, Object value, ScopeEnum scope ); | |||||
void setProperty( String name, Object value, ScopeEnum scope ) | |||||
throws AntException; | |||||
/** | /** | ||||
* Safe wrapper class for Scope enums. | * Safe wrapper class for Scope enums. | ||||
@@ -9,7 +9,6 @@ package org.apache.myrmidon.components.builder; | |||||
import java.io.File; | import java.io.File; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.ant.util.Condition; | import org.apache.ant.util.Condition; | ||||
import org.apache.avalon.framework.ExceptionUtil; | import org.apache.avalon.framework.ExceptionUtil; | ||||
import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||
@@ -17,6 +16,7 @@ import org.apache.avalon.framework.configuration.ConfigurationException; | |||||
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; | import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; | ||||
import org.apache.avalon.framework.logger.AbstractLoggable; | import org.apache.avalon.framework.logger.AbstractLoggable; | ||||
import org.apache.log.Logger; | import org.apache.log.Logger; | ||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.components.model.DefaultProject; | import org.apache.myrmidon.components.model.DefaultProject; | ||||
import org.apache.myrmidon.components.model.DefaultTarget; | import org.apache.myrmidon.components.model.DefaultTarget; | ||||
@@ -164,6 +164,7 @@ public class DefaultProjectBuilder | |||||
* @param task the Configuration | * @param task the Configuration | ||||
*/ | */ | ||||
protected void buildTarget( final DefaultProject project, final Configuration target ) | protected void buildTarget( final DefaultProject project, final Configuration target ) | ||||
throws AntException | |||||
{ | { | ||||
final String name = target.getAttribute( "name", null ); | final String name = target.getAttribute( "name", null ); | ||||
final String depends = target.getAttribute( "depends", null ); | final String depends = target.getAttribute( "depends", null ); | ||||
@@ -9,7 +9,7 @@ package org.apache.myrmidon.components.builder; | |||||
import java.io.File; | import java.io.File; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.framework.component.Component; | import org.apache.avalon.framework.component.Component; | ||||
import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
@@ -15,10 +15,10 @@ import java.util.Iterator; | |||||
import java.util.zip.ZipEntry; | import java.util.zip.ZipEntry; | ||||
import java.util.zip.ZipException; | import java.util.zip.ZipException; | ||||
import java.util.zip.ZipFile; | import java.util.zip.ZipFile; | ||||
import org.apache.ant.tasklet.engine.DataTypeEngine; | |||||
import org.apache.ant.convert.engine.ConverterEngine; | import org.apache.ant.convert.engine.ConverterEngine; | ||||
import org.apache.ant.convert.engine.ConverterRegistry; | import org.apache.ant.convert.engine.ConverterRegistry; | ||||
import org.apache.ant.convert.engine.DefaultConverterInfo; | import org.apache.ant.convert.engine.DefaultConverterInfo; | ||||
import org.apache.ant.tasklet.engine.DataTypeEngine; | |||||
import org.apache.avalon.framework.camelot.AbstractDeployer; | import org.apache.avalon.framework.camelot.AbstractDeployer; | ||||
import org.apache.avalon.framework.camelot.DefaultLocator; | import org.apache.avalon.framework.camelot.DefaultLocator; | ||||
import org.apache.avalon.framework.camelot.DefaultRegistry; | import org.apache.avalon.framework.camelot.DefaultRegistry; | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.myrmidon.components.embeddor; | package org.apache.myrmidon.components.embeddor; | ||||
import java.io.File; | import java.io.File; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.convert.engine.ConverterEngine; | import org.apache.ant.convert.engine.ConverterEngine; | ||||
import org.apache.ant.tasklet.engine.DataTypeEngine; | import org.apache.ant.tasklet.engine.DataTypeEngine; | ||||
import org.apache.avalon.excalibur.io.FileUtil; | import org.apache.avalon.excalibur.io.FileUtil; | ||||
@@ -290,6 +290,7 @@ public class MyrmidonEmbeddor | |||||
* Setup all the files attributes. | * Setup all the files attributes. | ||||
*/ | */ | ||||
private void setupFiles() | private void setupFiles() | ||||
throws AntException | |||||
{ | { | ||||
String filepath = null; | String filepath = null; | ||||
@@ -8,7 +8,7 @@ | |||||
package org.apache.myrmidon.components.executor; | package org.apache.myrmidon.components.executor; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.convert.engine.ConverterEngine; | import org.apache.ant.convert.engine.ConverterEngine; | ||||
import org.apache.avalon.framework.activity.Disposable; | import org.apache.avalon.framework.activity.Disposable; | ||||
import org.apache.avalon.framework.activity.Initializable; | import org.apache.avalon.framework.activity.Initializable; | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.myrmidon.components.executor; | package org.apache.myrmidon.components.executor; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.framework.camelot.Registry; | import org.apache.avalon.framework.camelot.Registry; | ||||
import org.apache.avalon.framework.component.Component; | import org.apache.avalon.framework.component.Component; | ||||
import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||
@@ -9,7 +9,7 @@ package org.apache.myrmidon.components.manager; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Iterator; | import java.util.Iterator; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.ant.util.Condition; | import org.apache.ant.util.Condition; | ||||
import org.apache.avalon.framework.activity.Disposable; | import org.apache.avalon.framework.activity.Disposable; | ||||
import org.apache.avalon.framework.activity.Initializable; | import org.apache.avalon.framework.activity.Initializable; | ||||
@@ -192,6 +192,7 @@ public class DefaultProjectManager | |||||
private void executeTargetWork( final String name, | private void executeTargetWork( final String name, | ||||
final Target target, | final Target target, | ||||
final TaskContext context ) | final TaskContext context ) | ||||
throws AntException | |||||
{ | { | ||||
//check the condition associated with target. | //check the condition associated with target. | ||||
//if it is not satisfied then skip target | //if it is not satisfied then skip target | ||||
@@ -7,7 +7,7 @@ | |||||
*/ | */ | ||||
package org.apache.myrmidon.components.manager; | package org.apache.myrmidon.components.manager; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
import org.apache.avalon.framework.component.Component; | import org.apache.avalon.framework.component.Component; | ||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
@@ -10,7 +10,7 @@ package org.apache.myrmidon.components.model; | |||||
import java.io.File; | import java.io.File; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import org.apache.ant.AntException; | |||||
import org.apache.myrmidon.AntException; | |||||
/** | /** | ||||
* Default project implementation. | * Default project implementation. | ||||
@@ -44,7 +44,7 @@ public final class Main | |||||
final LauncherClassLoader classLoader = new LauncherClassLoader( urls ); | final LauncherClassLoader classLoader = new LauncherClassLoader( urls ); | ||||
//load class and retrieve appropriate main method. | //load class and retrieve appropriate main method. | ||||
final Class clazz = classLoader.loadClass( "org.apache.ant.Main" ); | |||||
final Class clazz = classLoader.loadClass( "org.apache.myrmidon.Main" ); | |||||
final Method method = clazz.getMethod( "main", new Class[] { args.getClass() } ); | final Method method = clazz.getMethod( "main", new Class[] { args.getClass() } ); | ||||
//kick the tires and light the fires.... | //kick the tires and light the fires.... | ||||
@@ -1,4 +1,4 @@ | |||||
Manifest-Version: 1.0 | Manifest-Version: 1.0 | ||||
Main-Class: org.apache.ant.Main | |||||
Main-Class: org.apache.myrmidon.Main | |||||
Class-Path: avalonapi.jar | Class-Path: avalonapi.jar | ||||
Created-By: Apache Ant Project | Created-By: Apache Ant Project |