You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jl...@apache.org on 2014/01/01 20:35:33 UTC

svn commit: r1554667 - in /ant/easyant/core/trunk/src/test: java/org/apache/easyant/core/ java/org/apache/easyant/core/services/ resources/org/apache/easyant/core/services/ resources/repositories/ resources/repositories/plugins/mycompany/abstractplugin...

Author: jlboudart
Date: Wed Jan  1 19:35:32 2014
New Revision: 1554667

URL: http://svn.apache.org/r1554667
Log:
Refactor PluginService test to rely on local plugins, strongly improves execution time
refactor a few tests to properly handle cache directory cleaning

Added:
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ants/
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ants/abstractplugin-0.1.ant
      - copied, changed from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ivys/
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ivys/ivy-0.1.xml
      - copied, changed from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ants/
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ants/complexplugin-0.1.ant
      - copied, changed from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ivys/
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ivys/ivy-0.1.xml
      - copied, changed from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml
Modified:
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntEngineTest.java
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/ModuleInheritanceTest.java
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/StandardJavaProjectTest.java
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/services/PluginServiceTest.java
    ant/easyant/core/trunk/src/test/resources/org/apache/easyant/core/services/module.ivy
    ant/easyant/core/trunk/src/test/resources/repositories/easyant-ivysettings-test.xml
    ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml

Modified: ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java (original)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java Wed Jan  1 19:35:32 2014
@@ -75,6 +75,8 @@ public abstract class EasyAntBaseTest {
         if (project.getTargets().containsKey(tearDown)) {
             project.executeTarget(tearDown);
         }
+        cleanCache();
+        cleanTargetDirectory();
     }
 
     public void cleanTargetDirectory() {

Modified: ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntEngineTest.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntEngineTest.java?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntEngineTest.java (original)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/EasyAntEngineTest.java Wed Jan  1 19:35:32 2014
@@ -59,7 +59,6 @@ public class EasyAntEngineTest {
     private EasyAntConfiguration easyAntConfiguration = new EasyAntConfiguration();
     private EasyAntEngine easyantEngine = new EasyAntEngine(easyAntConfiguration);
     private Project project = new Project();
-    private File cache;
 
     @Rule
     public ExpectedException expectedException = ExpectedException.none();

Modified: ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/ModuleInheritanceTest.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/ModuleInheritanceTest.java?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/ModuleInheritanceTest.java (original)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/ModuleInheritanceTest.java Wed Jan  1 19:35:32 2014
@@ -30,11 +30,6 @@ public class ModuleInheritanceTest exten
         cleanTargetDirectory();
     }
 
-    @After
-    public void tearDown() {
-        cleanTargetDirectory();
-    }
-
     @Test
     public void shouldInheritProperty() {
         assertPropertyEquals("test.property", "myvalue");

Modified: ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/StandardJavaProjectTest.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/StandardJavaProjectTest.java?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/StandardJavaProjectTest.java (original)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/StandardJavaProjectTest.java Wed Jan  1 19:35:32 2014
@@ -18,7 +18,6 @@
 package org.apache.easyant.core;
 
 import org.apache.tools.ant.Project;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -30,11 +29,6 @@ public class StandardJavaProjectTest ext
         cleanTargetDirectory();
     }
 
-    @After
-    public void tearDown() {
-        cleanTargetDirectory();
-    }
-
     @Test
     public void shouldInvokeClean() {
         executeTarget("clean");

Modified: ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/services/PluginServiceTest.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/services/PluginServiceTest.java?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/services/PluginServiceTest.java (original)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/core/services/PluginServiceTest.java Wed Jan  1 19:35:32 2014
@@ -17,98 +17,105 @@
  */
 package org.apache.easyant.core.services;
 
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.IOException;
-import java.text.ParseException;
+import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.easyant.core.EasyAntMagicNames;
 import org.apache.easyant.core.descriptor.PropertyDescriptor;
+import org.apache.easyant.core.ivy.IvyInstanceHelper;
 import org.apache.easyant.core.report.EasyAntReport;
 import org.apache.easyant.core.report.ExtensionPointReport;
 import org.apache.easyant.core.report.ImportedModuleReport;
 import org.apache.easyant.core.report.TargetReport;
 import org.apache.easyant.core.services.impl.DefaultPluginServiceImpl;
-import org.apache.ivy.ant.IvyAntSettings;
+import org.apache.ivy.ant.IvyConfigure;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.plugins.matcher.PatternMatcher;
 import org.apache.tools.ant.Project;
 import org.junit.Assert;
-import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
 public class PluginServiceTest {
 
     private static PluginService pluginService;
+    @Rule
+    public TemporaryFolder folder = new TemporaryFolder();
 
-    @BeforeClass
-    public static void setUp() throws ParseException, IOException {
+    @Before
+    public void setUp() throws IOException, URISyntaxException {
         // configure the ivyinstance
         Project p = new Project();
-        IvyAntSettings ivyAntSettings = new IvyAntSettings();
-        ivyAntSettings.setUrl(PluginServiceTest.class.getResource("/ivysettings-test.xml"));
-        ivyAntSettings.setProject(p);
-        pluginService = new DefaultPluginServiceImpl(ivyAntSettings);
 
+        File cache = folder.newFolder("build-cache");
+        p.setProperty("ivy.cache.dir", cache.getAbsolutePath());
+
+        IvyConfigure configure = new IvyConfigure();
+        configure.setProject(p);
+        configure.setFile(new File(this.getClass().getResource("/repositories/easyant-ivysettings-test.xml").toURI()));
+        configure.setSettingsId(EasyAntMagicNames.EASYANT_IVY_INSTANCE);
+        configure.execute();
+
+        pluginService = new DefaultPluginServiceImpl(IvyInstanceHelper.getEasyAntIvyAntSettings(p));
     }
 
     @Test
-    public void testDefaultResolverSearch() throws Exception {
-        ModuleRevisionId[] mrids = pluginService.search("org.apache.easyant.buildtypes", "build-std-java");
+    public void shouldFindExistingModuleWithDefaultResolverSearch() throws Exception {
+        ModuleRevisionId[] mrids = pluginService.search("mycompany", "simpleplugin");
         // the module should be found once in easyant repo default resolver
-        Assert.assertEquals(1, mrids.length);
+        assertThat(mrids.length, is(1));
     }
 
     @Test
-    public void testSearchAllResolvers() throws Exception {
-        ModuleRevisionId[] mrids = pluginService.search("org.apache.easyant.buildtypes", "build-std-java", null, null,
-                PatternMatcher.EXACT, "*");
+    public void shouldFindExistingModuleWithAllResolversSearch() throws Exception {
+        ModuleRevisionId[] mrids = pluginService.search("mycompany", "simpleplugin", null, null, PatternMatcher.EXACT,
+                "*");
         // the module should be found once each in easyant repo and in chained
         // resolver
-        Assert.assertEquals(2, mrids.length);
-        Assert.assertEquals(mrids[0], mrids[1]);
+        assertThat(mrids.length, is(2));
+        assertThat(mrids[0], equalTo(mrids[1]));
     }
 
     @Test
-    public void testSearchModule() throws Exception {
-        String[] mrids = pluginService.searchModule("org.apache.easyant.buildtypes", "build-std-java");
+    public void shouldFindExistingModule() throws Exception {
+        String[] mrids = pluginService.searchModule("mycompany", "simpleplugin");
         // the module should be found once in easyant repo default resolver
-        Assert.assertEquals(1, mrids.length);
-    }
-
-    private EasyAntReport generateReport() throws Exception {
-        File module = new File(this.getClass().getResource("module.ivy").toURI());
-        File moduleAnt = new File(this.getClass().getResource("module.ant").toURI());
-        return pluginService.generateEasyAntReport(module, moduleAnt, null);
+        assertThat(mrids.length, is(1));
     }
 
     @Test
     public void testGenerateReport() throws Exception {
         EasyAntReport eaReport = generateReport();
-        Assert.assertNotNull(eaReport);
+        assertThat(eaReport, is(notNullValue()));
+        assertThat(eaReport.getImportedModuleReport("mycompany#complexplugin;0.1"), is(notNullValue()));
+        assertThat(eaReport.getImportedModuleReport("mycompany#simpleplugin;0.1"), is(notNullValue()));
 
-        Assert.assertNotNull(eaReport.getImportedModuleReport("org.apache.easyant.buildtypes#build-std-java;0.9"));
-        Assert.assertNotNull(eaReport.getImportedModuleReport("org.apache.easyant.plugins#run-java;0.9"));
+        ImportedModuleReport complexPlugin = eaReport.getImportedModuleReport("mycompany#complexplugin;0.1");
+        assertThat(complexPlugin, is(notNullValue()));
 
-        ImportedModuleReport buildType = eaReport
-                .getImportedModuleReport("org.apache.easyant.buildtypes#build-std-java;0.9");
         // global importedModule size should be equals to :
-        // importedModule size of buildtype + 2 (buildtype itself +run-java plugin)
-        Assert.assertEquals(buildType.getEasyantReport().getImportedModuleReports().size() + 2, eaReport
+        // importedModule size of complexplugin + 2 (complexplugin itself +simpleplugin)
+        Assert.assertEquals(complexPlugin.getEasyantReport().getImportedModuleReports().size() + 2, eaReport
                 .getImportedModuleReports().size());
 
         checkPropertyValueEquals(eaReport.getPropertyDescriptors().get("run.main.classname"),
                 "org.apache.easyant.example.Example");
 
-        checkPropertyValueEquals(eaReport.getPropertyDescriptors().get("src.main.java"), "${basedir}/src/main/java");
-        checkPropertyValueEquals(eaReport.getPropertyDescriptors().get("target.main.classes"), "${target}/main/classes");
-        checkPropertyValueEquals(eaReport.getPropertyDescriptors().get("target"), "${basedir}/target");
-        checkPropertyValueEquals(eaReport.getPropertyDescriptors().get("test.framework"), "junit");
-
-        checkPropertyDefaultValueEquals(eaReport.getPropertyDescriptors().get("target.main.artifact"),
-                "${target.artifacts}/${target.artifacts.main.jar.name}");
+        checkPropertyDefaultValueEquals(eaReport.getPropertyDescriptors().get("myproperty"), "foobar");
+        checkPropertyDefaultValueEquals(eaReport.getPropertyDescriptors().get("anotherproperty"), "foo");
 
         // the property should also be contained in getAvailableProperties which
         // list all properties (those for the current module and those in
@@ -119,75 +126,53 @@ public class PluginServiceTest {
         // check that package ExtensionPoint exists and targets are bound to
         // this extension-point
         ExtensionPointReport packageEP = eaReport.getExtensionPointReport("package");
-        Assert.assertNotNull(packageEP);
-
-        Assert.assertEquals("compile,abstract-package:package,hello-world", packageEP.getDepends());
+        assertThat(packageEP, is(notNullValue()));
+        assertThat(packageEP.getDepends(), is("complexplugin:mytarget,hello-world"));
 
         List<TargetReport> targets = packageEP.getTargetReports();
-        Set<String> expectedTargets = new HashSet<String>(Arrays.asList("hello-world"));
-        Assert.assertEquals(expectedTargets.size(), targets.size());
+        Set<String> expectedTargets = new HashSet<String>(Arrays.asList("hello-world", "complexplugin:mytarget"));
+        assertThat(targets.size(), is(expectedTargets.size()));
 
         for (TargetReport target : packageEP.getTargetReports()) {
-            Assert.assertTrue("expected to find " + target.getName(), expectedTargets.remove(target.getName()));
+            assertTrue("expected to find " + target.getName(), expectedTargets.remove(target.getName()));
         }
 
         TargetReport helloWorld = eaReport.getTargetReport("hello-world");
-        Assert.assertNotNull(helloWorld);
-        Assert.assertTrue("package".equals(helloWorld.getExtensionPoint()));
+        assertThat(helloWorld, is(notNullValue()));
+        assertThat(helloWorld.getExtensionPoint(), is("package"));
     }
 
     @Test
-    public void testGetDescription() throws Exception {
-        String description = pluginService.getPluginDescription("org.apache.easyant.plugins#run-java;0.9");
-        Assert.assertEquals("This module provides java bytecode execution feature.", description);
+    public void shouldGetDescriptionFromExistingPlugin() throws Exception {
+        String description = pluginService.getPluginDescription("mycompany#abstractplugin;0.1");
+        assertThat(description, is("an abstract plugin"));
     }
 
     @Test
-    public void testGetPluginInfo() throws Exception {
-        EasyAntReport pluginInfo = pluginService.getPluginInfo("org.apache.easyant.plugins#compile-java;0.9");
-        Assert.assertNotNull(pluginInfo);
-        Assert.assertEquals(2, pluginInfo.getImportedModuleReports().size());
-        Assert.assertNotNull(pluginInfo.getImportedModuleReport("abstract-provisioning"));
-        Assert.assertNotNull(pluginInfo.getImportedModuleReport("abstract-compile"));
-
-        checkPropertyDefaultValueEquals(pluginInfo.getPropertyDescriptors().get("compile.java.includes.pattern"),
-                "**/*.java");
-        checkPropertyDefaultValueEquals(pluginInfo.getPropertyDescriptors().get("target.test.integration.classes"),
-                "${target}/integration-test/classes");
+    public void shouldFindPluginInfoForExistingModule() throws Exception {
+        EasyAntReport pluginInfo = pluginService.getPluginInfo("mycompany#abstractplugin;0.1");
+        assertThat(pluginInfo, is(notNullValue()));
+        assertThat(pluginInfo.getImportedModuleReports().size(), is(0));
+        assertThat(pluginInfo.getPropertyDescriptors().size(), is(2));
+        assertThat(pluginInfo.getTargetReport("abstractplugin:init"), is(notNullValue()));
+        checkPropertyDefaultValueEquals(pluginInfo.getPropertyDescriptors().get("myproperty"), "foobar");
+        checkPropertyDefaultValueEquals(pluginInfo.getPropertyDescriptors().get("anotherproperty"), "foo");
     }
 
     @Test
-    public void testGetPluginInfoOnlyForCurrentPlugin() throws Exception {
-        ModuleRevisionId mrid = ModuleRevisionId.parse("org.apache.easyant.plugins#compile-java;0.9");
+    public void shouldFindGivenPluginInfoAsNestedPlugin() throws Exception {
+        ModuleRevisionId mrid = ModuleRevisionId.parse("mycompany#complexplugin;0.1");
         EasyAntReport pluginInfo = pluginService.getPluginInfo(mrid, "default");
-        Assert.assertNotNull(pluginInfo);
-        Assert.assertEquals(1, pluginInfo.getImportedModuleReportsFromCurrentModule().size());
-        ImportedModuleReport abstractCompile = pluginInfo.getImportedModuleReport("abstract-compile");
-        Assert.assertNotNull(abstractCompile);
-        Assert.assertEquals(1, abstractCompile.getEasyantReport().getImportedModuleReportsFromCurrentModule().size());
-        Assert.assertNotNull(abstractCompile.getEasyantReport().getImportedModuleReport("abstract-provisioning"));
-        checkPropertyDefaultValueEquals(
-                pluginInfo.getPropertyReportsFromCurrentModule().get("compile.java.includes.pattern"), "**/*.java");
-        checkPropertyDefaultValueEquals(
-                abstractCompile.getEasyantReport().getPropertyReportsFromCurrentModule()
-                        .get("target.test.integration.classes"), "${target}/integration-test/classes");
-    }
-
-    @Test
-    public void testGetPluginInfoWithNestedPlugin() throws Exception {
-        EasyAntReport pluginInfo = pluginService.getPluginInfo("org.apache.easyant.plugins#compile-java;0.9");
-        Assert.assertNotNull(pluginInfo);
-
-        // verify abstract-provisioning is imported in abstract-compile
-        ImportedModuleReport importedModuleReport = pluginInfo.getImportedModuleReport("abstract-compile");
-        Assert.assertNotNull(importedModuleReport);
-        Assert.assertNotNull(importedModuleReport.getEasyantReport());
-        Assert.assertEquals(1, importedModuleReport.getEasyantReport().getImportedModuleReports().size());
-        Assert.assertNotNull(importedModuleReport.getEasyantReport().getImportedModuleReport("abstract-provisioning"));
-
-        checkPropertyDefaultValueEquals(
-                importedModuleReport.getEasyantReport().getPropertyDescriptors().get("target.test.integration.classes"),
-                "${target}/integration-test/classes");
+        assertThat(pluginInfo, is(notNullValue()));
+        assertThat(pluginInfo.getImportedModuleReportsFromCurrentModule().size(), is(1));
+        ImportedModuleReport abstractPlugin = pluginInfo.getImportedModuleReport("abstractplugin");
+
+        assertThat(abstractPlugin, is(notNullValue()));
+        EasyAntReport abstractPluginReport = abstractPlugin.getEasyantReport();
+        assertThat(abstractPluginReport.getTargetReport("abstractplugin:init"), is(notNullValue()));
+        assertThat(abstractPluginReport.getImportedModuleReportsFromCurrentModule().size(), is(0));
+        assertThat(abstractPluginReport.getPropertyDescriptors().size(), is(2));
+        checkPropertyDefaultValueEquals(abstractPluginReport.getPropertyDescriptors().get("myproperty"), "foobar");
     }
 
     @Test
@@ -195,30 +180,36 @@ public class PluginServiceTest {
         EasyAntReport pluginInfo = pluginService.getPluginInfo(
                 new File(this.getClass().getResource("plugins/simple-plugin-without-rootlevel-tasks.ivy").toURI()),
                 new File(this.getClass().getResource("plugins").toURI()), "default");
-
-        Assert.assertEquals(0, pluginInfo.getImportedModuleReports().size());
-        Assert.assertEquals(1, pluginInfo.getPropertyDescriptors().size());
+        assertThat(pluginInfo.getImportedModuleReports().size(), is(0));
+        assertThat(pluginInfo.getPropertyDescriptors().size(), is(1));
         checkPropertyDefaultValueEquals(pluginInfo.getPropertyDescriptors().get("src.main.java"),
                 "${basedir}/src/main/java");
-        Assert.assertEquals(2, pluginInfo.getTargetReports().size());
+        assertThat(pluginInfo.getTargetReports().size(), is(2));
 
         TargetReport helloWorld = pluginInfo.getTargetReport("simple-plugin-without-rootlevel-tasks:hello-world");
-        Assert.assertNotNull(helloWorld);
-        Assert.assertEquals("hello-world description", helloWorld.getDescription());
+        assertThat(helloWorld, is(notNullValue()));
+        assertThat(helloWorld.getDescription(), is("hello-world description"));
 
         ExtensionPointReport pluginReadyEP = pluginInfo
                 .getExtensionPointReport("simple-plugin-without-rootlevel-tasks:plugin-ready");
-        Assert.assertNotNull(pluginReadyEP);
-        Assert.assertEquals("plugin-ready description", pluginReadyEP.getDescription());
+        assertThat(pluginReadyEP, is(notNullValue()));
+        assertThat(pluginReadyEP.getDescription(), is("plugin-ready description"));
     }
 
     public void checkPropertyDefaultValueEquals(PropertyDescriptor propertyDescriptor, String expectedValue) {
-        Assert.assertNotNull(propertyDescriptor);
-        Assert.assertEquals(expectedValue, propertyDescriptor.getDefaultValue());
+        assertThat(propertyDescriptor, is(notNullValue()));
+        assertThat(propertyDescriptor.getDefaultValue(), is(expectedValue));
     }
 
     public void checkPropertyValueEquals(PropertyDescriptor propertyDescriptor, String expectedValue) {
-        Assert.assertNotNull(propertyDescriptor);
-        Assert.assertEquals(expectedValue, propertyDescriptor.getValue());
+        assertThat(propertyDescriptor, is(notNullValue()));
+        assertThat(propertyDescriptor.getValue(), is(expectedValue));
     }
+
+    private EasyAntReport generateReport() throws Exception {
+        File module = new File(this.getClass().getResource("module.ivy").toURI());
+        File moduleAnt = new File(this.getClass().getResource("module.ant").toURI());
+        return pluginService.generateEasyAntReport(module, moduleAnt, null);
+    }
+
 }

Modified: ant/easyant/core/trunk/src/test/resources/org/apache/easyant/core/services/module.ivy
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/org/apache/easyant/core/services/module.ivy?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/org/apache/easyant/core/services/module.ivy (original)
+++ ant/easyant/core/trunk/src/test/resources/org/apache/easyant/core/services/module.ivy Wed Jan  1 19:35:32 2014
@@ -16,10 +16,9 @@
 -->
 <ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
     <info organisation="org.apache.easyant" module="standard-java-app" status="integration" >
-        <ea:build module="build-std-java" revision="0.9">
-            <ea:property name="run.main.classname" value="org.apache.easyant.example.Example"/>
-            <ea:plugin module="run-java" revision="0.9"/>
-        </ea:build>
+        <ea:plugin organisation="mycompany" module="complexplugin" revision="0.1"/>
+        <ea:property name="run.main.classname" value="org.apache.easyant.example.Example"/>
+        <ea:plugin organisation="mycompany"  module="simpleplugin" revision="0.1"/>
     </info>
     <configurations>
         <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf"/>

Modified: ant/easyant/core/trunk/src/test/resources/repositories/easyant-ivysettings-test.xml
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/repositories/easyant-ivysettings-test.xml?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/repositories/easyant-ivysettings-test.xml (original)
+++ ant/easyant/core/trunk/src/test/resources/repositories/easyant-ivysettings-test.xml Wed Jan  1 19:35:32 2014
@@ -15,14 +15,14 @@
    limitations under the License.
 -->
 <ivysettings>
-    <property name="cache.dir" value="${ivy.basedir}/build/cache"/>
-
     <settings defaultResolver="test-plugin"/>
-    <caches defaultCacheDir="${cache.dir}" />
     <resolvers>
             <filesystem name="test-plugin">
                 <ivy pattern="${ivy.basedir}/src/test/resources/repositories/plugins/[organisation]/[module]/ivys/ivy-[revision].xml"/>
                 <artifact pattern="${ivy.basedir}/src/test/resources/repositories/plugins/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
             </filesystem>
+            <chain name="easyant-test-chain" returnFirst="true">
+                <resolver ref="test-plugin"/>
+            </chain>
     </resolvers>
 </ivysettings>

Copied: ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ants/abstractplugin-0.1.ant (from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml)
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ants/abstractplugin-0.1.ant?p2=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ants/abstractplugin-0.1.ant&p1=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml&r1=1554615&r2=1554667&rev=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml (original)
+++ ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ants/abstractplugin-0.1.ant Wed Jan  1 19:35:32 2014
@@ -14,9 +14,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-    <info organisation="mycompany" module="simpleplugin" revision="0.1" status="integration"/>
-    <publications>
-        <artifact type="ant" />
-    </publications>
-</ivy-module>
+<project name="mycompany#abstractplugin" xmlns:ea="antlib:org.apache.easyant">
+	<echo>echo from abstract</echo>
+    <ea:parameter property="myproperty" default="foobar" description="myproperty description"/>
+	<target name="abstractplugin:init">
+	    <ea:parameter property="anotherproperty" default="foo" description="anotherproperty description"/>
+	</target>
+</project>
\ No newline at end of file

Copied: ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ivys/ivy-0.1.xml (from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml)
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ivys/ivy-0.1.xml?p2=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ivys/ivy-0.1.xml&p1=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml&r1=1554615&r2=1554667&rev=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml (original)
+++ ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/abstractplugin/ivys/ivy-0.1.xml Wed Jan  1 19:35:32 2014
@@ -15,7 +15,9 @@
    limitations under the License.
 -->
 <ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-    <info organisation="mycompany" module="simpleplugin" revision="0.1" status="integration"/>
+    <info organisation="mycompany" module="abstractplugin" revision="0.1" status="integration">
+        <description>an abstract plugin</description>
+    </info>
     <publications>
         <artifact type="ant" />
     </publications>

Copied: ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ants/complexplugin-0.1.ant (from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml)
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ants/complexplugin-0.1.ant?p2=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ants/complexplugin-0.1.ant&p1=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml&r1=1554615&r2=1554667&rev=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml (original)
+++ ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ants/complexplugin-0.1.ant Wed Jan  1 19:35:32 2014
@@ -14,9 +14,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-    <info organisation="mycompany" module="simpleplugin" revision="0.1" status="integration"/>
-    <publications>
-        <artifact type="ant" />
-    </publications>
-</ivy-module>
+<project name="mycompany#complexplugin"  xmlns:ea="antlib:org.apache.easyant">
+	<ea:plugin organisation="mycompany" module="abstractplugin" revision="0.1"/>
+	<target name="complexplugin:mytarget">
+	    <echo>a message from mytarget</echo>
+	</target>
+	<extension-point name="package" depends="complexplugin:mytarget"/>
+</project>
\ No newline at end of file

Copied: ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ivys/ivy-0.1.xml (from r1554615, ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml)
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ivys/ivy-0.1.xml?p2=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ivys/ivy-0.1.xml&p1=ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml&r1=1554615&r2=1554667&rev=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml (original)
+++ ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/complexplugin/ivys/ivy-0.1.xml Wed Jan  1 19:35:32 2014
@@ -15,7 +15,7 @@
    limitations under the License.
 -->
 <ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-    <info organisation="mycompany" module="simpleplugin" revision="0.1" status="integration"/>
+    <info organisation="mycompany" module="complexplugin" revision="0.1" status="integration"/>
     <publications>
         <artifact type="ant" />
     </publications>

Modified: ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml?rev=1554667&r1=1554666&r2=1554667&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml (original)
+++ ant/easyant/core/trunk/src/test/resources/repositories/plugins/mycompany/simpleplugin/ivys/ivy-0.1.xml Wed Jan  1 19:35:32 2014
@@ -15,7 +15,9 @@
    limitations under the License.
 -->
 <ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-    <info organisation="mycompany" module="simpleplugin" revision="0.1" status="integration"/>
+    <info organisation="mycompany" module="simpleplugin" revision="0.1" status="integration">
+        <description>a simple plugin</description>
+    </info>
     <publications>
         <artifact type="ant" />
     </publications>