avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 45901 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks
Date Sat, 11 Sep 2004 16:30:21 GMT
Author: niclas
Date: Sat Sep 11 09:30:20 2004
New Revision: 45901

Modified:
   avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ArtifactTask.java
Log:
Another patch from Stephen. Factory support in Artifacts.

Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ArtifactTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ArtifactTask.java	(original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ArtifactTask.java	Sat
Sep 11 09:30:20 2004
@@ -50,6 +50,23 @@
 
     private String m_factory;
 
+    public void setFactory( String factory )
+    {
+        m_factory = factory;
+    }
+
+    private String getFactory()
+    {
+        if( null != m_factory )
+        {
+            return m_factory;
+        }
+        else
+        {
+            return getProject().getProperty( FACTORY_KEY );
+        }
+    }
+
     public void execute() throws BuildException 
     {
         final String key = getContext().getKey();
@@ -57,7 +74,7 @@
         final Definition def = getHome().getDefinition( ref );
         final File artifact = getArtifactFile( def );
 
-        m_factory = getProject().getProperty( FACTORY_KEY );
+        m_factory = getFactory();
         if( null == m_factory ) 
         {
             final String error = 

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message