1 package org
.argeo
.slc
.ant
;
6 import org
.apache
.commons
.logging
.Log
;
7 import org
.apache
.commons
.logging
.LogFactory
;
9 import org
.argeo
.slc
.core
.process
.SlcExecution
;
10 import org
.argeo
.slc
.runtime
.SimpleSlcRuntime
;
11 import org
.argeo
.slc
.unit
.AbstractSpringTestCase
;
12 import org
.springframework
.core
.io
.FileSystemResource
;
14 public class SlcAntTest
extends AbstractSpringTestCase
{
15 private Log log
= LogFactory
.getLog(getClass());
17 public void testSimpleRun() {
18 // AntRegistryUtil.runAll(getClass().getResource(
19 // "/org/argeo/slc/ant/build.xml"), "test", null);
21 URL url
= getClass().getResource("/org/argeo/slc/ant/build.xml");
22 log
.info("Run Ant file from URL: " + url
);
24 // AntRunner antRunner = new AntRunner(getContext(), url, "test");
27 AntSlcApplication slcApp
= new AntSlcApplication();
28 slcApp
.setSlcRuntime(new SimpleSlcRuntime(getContext()));
29 slcApp
.setRootDir(new FileSystemResource(new File("src/test/resources")
33 SlcExecution slcExecution
= new SlcExecution();
34 slcExecution
.getAttributes().put(SlcAntConstants
.EXECATTR_ANT_FILE
,
37 slcApp
.execute(slcExecution
, null, null);