initial import of easyant4e
authorNicolas Lalevee <hibou@apache.org>
Thu, 17 Feb 2011 20:22:56 +0000 (20:22 +0000)
committerNicolas Lalevee <hibou@apache.org>
Thu, 17 Feb 2011 20:22:56 +0000 (20:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/easyant/easyant4e/trunk@1071768 13f79535-47bb-0310-9956-ffa450edef68

130 files changed:
org.apache.easyant/.classpath [new file with mode: 0644]
org.apache.easyant/.project [new file with mode: 0644]
org.apache.easyant/META-INF/MANIFEST.MF [new file with mode: 0644]
org.apache.easyant/build.properties [new file with mode: 0644]
org.apache.easyant/lib/ant-launcher.jar [new file with mode: 0644]
org.apache.easyant/lib/ant.jar [new file with mode: 0644]
org.apache.easyant/lib/easyant-core.jar [new file with mode: 0644]
org.apache.easyant/lib/ivy.jar [new file with mode: 0644]
org.apache.easyant/lib/jdtCompilerAdapter.jar [new file with mode: 0644]
org.apache.easyant/lib/readme.txt [new file with mode: 0644]
org.apache.easyant4e.feature/.project [new file with mode: 0644]
org.apache.easyant4e.feature/build.properties [new file with mode: 0644]
org.apache.easyant4e.feature/feature.xml [new file with mode: 0644]
org.apache.easyant4e.releng/.project [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/allElements.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/ant-contrib-LICENSE.txt [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/ant-contrib.jar [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/eclipse-test-framework-3.4.1.zip [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/emma.jar [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/emma.jar.version [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/emma_ant.jar [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/org.pluginbuilder.autotestsuite.feature-0.5.0.20090721PRD.zip [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/run-tests.properties [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/automatedTests/run-tests.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/build.properties [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/build_rcp.properties [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/build_shared.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/customTargets.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/fetchSvnAll.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/pluginbuilder-anttasks.jar [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/postBuild.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/subversionSupport.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/svn/SVNCLIENTADAPTER-LICENSE [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/svn/svnClientAdapter.jar [new file with mode: 0644]
org.apache.easyant4e.releng/build-files/svn/svnant.jar [new file with mode: 0644]
org.apache.easyant4e.releng/build.properties [new file with mode: 0644]
org.apache.easyant4e.releng/build.xml [new file with mode: 0644]
org.apache.easyant4e.releng/build_local.properties [new file with mode: 0644]
org.apache.easyant4e.releng/build_shared.xml [new file with mode: 0644]
org.apache.easyant4e.releng/maps/all.map [new file with mode: 0644]
org.apache.easyant4e.releng/pluginbuilder.config [new file with mode: 0644]
org.apache.easyant4e.releng/releases/HEAD.properties [new file with mode: 0644]
org.apache.easyant4e.tests/.classpath [new file with mode: 0644]
org.apache.easyant4e.tests/.project [new file with mode: 0644]
org.apache.easyant4e.tests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.apache.easyant4e.tests/META-INF/MANIFEST.MF [new file with mode: 0644]
org.apache.easyant4e.tests/build.properties [new file with mode: 0644]
org.apache.easyant4e.tests/datas/simplejavaproject/.classpath [new file with mode: 0644]
org.apache.easyant4e.tests/datas/simplejavaproject/.project [new file with mode: 0644]
org.apache.easyant4e.tests/datas/simplejavaproject/module.ivy [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/AbstractEasyAntTest.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyAntAllTests.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantCoreServiceTest.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantProjectServiceTest.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EclipseProjectBuilder.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ExtensionRegistryTest.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ImportProjectTest.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/StartupTest.java [new file with mode: 0644]
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/TestPlugin.java [new file with mode: 0644]
org.apache.easyant4e/.checkstyle [new file with mode: 0644]
org.apache.easyant4e/.classpath [new file with mode: 0644]
org.apache.easyant4e/.fbprefs [new file with mode: 0644]
org.apache.easyant4e/.pmd [new file with mode: 0644]
org.apache.easyant4e/.project [new file with mode: 0644]
org.apache.easyant4e/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.apache.easyant4e/META-INF/MANIFEST.MF [new file with mode: 0644]
org.apache.easyant4e/TODO.txt [new file with mode: 0644]
org.apache.easyant4e/build.properties [new file with mode: 0644]
org.apache.easyant4e/icons/EasyAnt-logo.gif [new file with mode: 0644]
org.apache.easyant4e/icons/EasyAntNature.gif [new file with mode: 0755]
org.apache.easyant4e/icons/build.gif [new file with mode: 0644]
org.apache.easyant4e/icons/console.gif [new file with mode: 0644]
org.apache.easyant4e/icons/console.png [new file with mode: 0644]
org.apache.easyant4e/icons/debug_loglevel.gif [new file with mode: 0644]
org.apache.easyant4e/icons/default_incremental.gif [new file with mode: 0644]
org.apache.easyant4e/icons/form_banner.gif [new file with mode: 0644]
org.apache.easyant4e/icons/full/obj16/ant_buildfile.gif [new file with mode: 0755]
org.apache.easyant4e/icons/phase.gif [new file with mode: 0644]
org.apache.easyant4e/icons/sa_onesample48.gif [new file with mode: 0644]
org.apache.easyant4e/icons/target.gif [new file with mode: 0644]
org.apache.easyant4e/lib/guice/aopalliance.jar [new file with mode: 0644]
org.apache.easyant4e/lib/guice/guice-2.0.jar [new file with mode: 0644]
org.apache.easyant4e/plugin.properties [new file with mode: 0644]
org.apache.easyant4e/plugin.xml [new file with mode: 0644]
org.apache.easyant4e/src/ivysettings-remote.xml [new file with mode: 0644]
org.apache.easyant4e/src/ivysettings.xml [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/Activator.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/Startup.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifecycleBlock.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifecycleLabelProvider.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildPage.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/PhaseDetailsPage.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/TargetDetailsPage.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/modules/EasyAnt4EclipseModule.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/modules/EasyAntCoreModule.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/natures/AddEasyAntNatureAction.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/natures/AddEasyAntNatureOperation.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/natures/EasyAntNature.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/natures/RemoveEasyAntNatureAction.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/natures/RemoveEasyAntNatureOperation.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/providers/ImageProvider.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/providers/ImageProviderImpl.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantCoreService.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantCoreServiceImpl.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantProjectService.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantProjectServiceImpl.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/wizards/EasyAntImportWizard.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/wizards/EasyAntImportWizardPage.java [new file with mode: 0644]
org.apache.easyant4e/src/org/apache/easyant4e/wizards/ProjectRecord.java [new file with mode: 0644]
org.apache.easyant4e/src/repository.zip [new file with mode: 0644]
quality/.project [new file with mode: 0644]
quality/EasyAnt4E-Formatter [new file with mode: 0644]
quality/checkstyle/RequiredHeader.txt [new file with mode: 0644]
quality/checkstyle/checkstyle-config [new file with mode: 0644]
quality/checkstyle/checkstyle-frames.xsl [new file with mode: 0644]
quality/checkstyle/checkstyle-suppress.xml [new file with mode: 0644]
quality/checkstyle/checkstyle-text.xsl [new file with mode: 0644]
quality/checkstyle/checkstyle-xdoc.xsl [new file with mode: 0644]

diff --git a/org.apache.easyant/.classpath b/org.apache.easyant/.classpath
new file mode 100644 (file)
index 0000000..60e8dce
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry exported="true" kind="lib" path="lib/ant-launcher.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ivy.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ant.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easyant-core.jar" sourcepath="/home/jerome/tools/easyant/easyant.git/src/main/java"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdtCompilerAdapter.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.apache.easyant/.project b/org.apache.easyant/.project
new file mode 100644 (file)
index 0000000..7f0d6aa
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.apache.easyant</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.apache.easyant/META-INF/MANIFEST.MF b/org.apache.easyant/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..fc2146a
--- /dev/null
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Easyant Core
+Bundle-SymbolicName: org.apache.easyant
+Bundle-Version: 0.6.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: lib/ant.jar,
+ lib/ant-launcher.jar,
+ lib/easyant-core.jar,
+ lib/jdtCompilerAdapter.jar,
+ lib/ivy.jar,
+ .
+Export-Package: org.apache.easyant.core,
+ org.apache.easyant.core.ant,
+ org.apache.easyant.core.descriptor,
+ org.apache.easyant.core.factory,
+ org.apache.easyant.core.parser,
+ org.apache.easyant.core.report,
+ org.apache.easyant.core.services,
+ org.apache.easyant.core.services.impl,
+ org.apache.easyant.tasks
+Require-Bundle: org.eclipse.osgi,
+ org.eclipse.jdt.launching,
+ org.eclipse.jdt.core
diff --git a/org.apache.easyant/build.properties b/org.apache.easyant/build.properties
new file mode 100644 (file)
index 0000000..775e87c
--- /dev/null
@@ -0,0 +1,8 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               lib/ant.jar,\
+               lib/easyant-core.jar,\
+               lib/jdtCompilerAdapter.jar,\
+               lib/ivy.jar,\
+               lib/ant-launcher.jar
diff --git a/org.apache.easyant/lib/ant-launcher.jar b/org.apache.easyant/lib/ant-launcher.jar
new file mode 100644 (file)
index 0000000..06548a3
Binary files /dev/null and b/org.apache.easyant/lib/ant-launcher.jar differ
diff --git a/org.apache.easyant/lib/ant.jar b/org.apache.easyant/lib/ant.jar
new file mode 100644 (file)
index 0000000..aaa605c
Binary files /dev/null and b/org.apache.easyant/lib/ant.jar differ
diff --git a/org.apache.easyant/lib/easyant-core.jar b/org.apache.easyant/lib/easyant-core.jar
new file mode 100644 (file)
index 0000000..4b7ab19
Binary files /dev/null and b/org.apache.easyant/lib/easyant-core.jar differ
diff --git a/org.apache.easyant/lib/ivy.jar b/org.apache.easyant/lib/ivy.jar
new file mode 100644 (file)
index 0000000..9723963
Binary files /dev/null and b/org.apache.easyant/lib/ivy.jar differ
diff --git a/org.apache.easyant/lib/jdtCompilerAdapter.jar b/org.apache.easyant/lib/jdtCompilerAdapter.jar
new file mode 100644 (file)
index 0000000..17c7152
Binary files /dev/null and b/org.apache.easyant/lib/jdtCompilerAdapter.jar differ
diff --git a/org.apache.easyant/lib/readme.txt b/org.apache.easyant/lib/readme.txt
new file mode 100644 (file)
index 0000000..9775771
--- /dev/null
@@ -0,0 +1,2 @@
+all jars is used to bootstrap easyant-core and resolved internal plugins dependencies.
+The ivy.jar is the dedicated version for easyant-core
\ No newline at end of file
diff --git a/org.apache.easyant4e.feature/.project b/org.apache.easyant4e.feature/.project
new file mode 100644 (file)
index 0000000..476e2a8
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.apache.easyant4e.feature</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.apache.easyant4e.feature/build.properties b/org.apache.easyant4e.feature/build.properties
new file mode 100644 (file)
index 0000000..64f93a9
--- /dev/null
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/org.apache.easyant4e.feature/feature.xml b/org.apache.easyant4e.feature/feature.xml
new file mode 100644 (file)
index 0000000..95aee7e
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.apache.easyant4e.feature"
+      label="EasyAnt for Eclipse"
+      version="1.0.0.qualifier"
+      provider-name="EasyAnt.Org">
+
+   <description url="http://www.example.com/description">
+      [Enter Feature Description here.]
+   </description>
+
+   <copyright url="http://www.example.com/copyright">
+      [Enter Copyright Description here.]
+   </copyright>
+
+   <license url="http://www.example.com/license">
+      [Enter License Description here.]
+   </license>
+
+   <includes
+         id="org.apache.ivyde.feature"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.apache.easyant4e"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.easyant"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/org.apache.easyant4e.releng/.project b/org.apache.easyant4e.releng/.project
new file mode 100644 (file)
index 0000000..e0f44de
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.apache.easyant4e.releng</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+       </buildSpec>
+       <natures>
+               <nature>org.pluginbuilder.core.pluginBuilderNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.apache.easyant4e.releng/build-files/allElements.xml b/org.apache.easyant4e.releng/build-files/allElements.xml
new file mode 100644 (file)
index 0000000..245038f
--- /dev/null
@@ -0,0 +1,87 @@
+<project name="allElements delegation and assemble customTargets.xml">
+<!-- FILE WILL BE OVERWRITTEN WHEN GENERATED -->
+       <target name="allElementsExceptSvnFetch" unless="is.svn.fetch">
+               <antcall target="norcpbuild"/>
+               <antcall target="rcpbuild"/>
+    </target>
+       
+       <target name="norcpbuild" unless="build.container.feature">
+               <ant antfile="${genericTargets}" target="${target}">
+                       <property name="type" value="feature" />
+                       <property name="id" value="org.apache.easyant4e.feature" />
+               </ant>
+               
+       </target>
+
+       <target name="rcpbuild" if="build.container.feature">
+               <ant antfile="${genericTargets}" target="${target}">
+                       <property name="type" value="feature" />
+                       <property name="id" value="org.eclipse.pde.build.container.feature" />
+               </ant>
+       </target>
+       
+       <!-- generated assemble targets -->          
+       <target name="assemble.org.apache.easyant4e.feature">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
+                       <property name="zipargs" value="" />
+               </ant>
+       </target>
+
+       
+       <!-- assmble targets for RCP build -->  
+       <target name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-win32.win32.x86.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.ppc">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.ppc.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86_64">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86_64.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.linux.motif.x86">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-linux.motif.x86.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.solaris.motif.sparc">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-solaris.motif.sparc.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.solaris.gtk.sparc">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-solaris.gtk.sparc.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.aix.motif.ppc">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-aix.motif.ppc.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.hpux.motif.PA_RISC">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-hpux.motif.PA_RISC.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.ppc">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.ppc.zip"/>
+               </ant>
+       </target>
+       <target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.x86">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
+                       <property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.x86.zip"/>
+               </ant>
+       </target>       
+</project>
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/ant-contrib-LICENSE.txt b/org.apache.easyant4e.releng/build-files/ant-contrib-LICENSE.txt
new file mode 100644 (file)
index 0000000..4d8c2fb
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2001-2003 Ant-Contrib project.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The name Ant-Contrib must not be used to endorse or promote products 
+ *    derived from this software without prior written permission. For
+ *    written permission, please contact
+ *    ant-contrib-developers@lists.sourceforge.net.
+ *
+ * 5. Products derived from this software may not be called "Ant-Contrib"
+ *    nor may "Ant-Contrib" appear in their names without prior written
+ *    permission of the Ant-Contrib project.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ */
diff --git a/org.apache.easyant4e.releng/build-files/ant-contrib.jar b/org.apache.easyant4e.releng/build-files/ant-contrib.jar
new file mode 100644 (file)
index 0000000..ea817cd
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/ant-contrib.jar differ
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/eclipse-test-framework-3.4.1.zip b/org.apache.easyant4e.releng/build-files/automatedTests/eclipse-test-framework-3.4.1.zip
new file mode 100644 (file)
index 0000000..a6434a0
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/automatedTests/eclipse-test-framework-3.4.1.zip differ
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/emma.jar b/org.apache.easyant4e.releng/build-files/automatedTests/emma.jar
new file mode 100644 (file)
index 0000000..b07cfd2
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/automatedTests/emma.jar differ
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/emma.jar.version b/org.apache.easyant4e.releng/build-files/automatedTests/emma.jar.version
new file mode 100644 (file)
index 0000000..a239f01
--- /dev/null
@@ -0,0 +1,2 @@
+emma.jar is a patched 2.0.5312 which fixes an AIOB exception on 64 bit linux\r
+http://lukas.zapletalovi.com/blog:emma_code_coverage_tool_fixed_version
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/emma_ant.jar b/org.apache.easyant4e.releng/build-files/automatedTests/emma_ant.jar
new file mode 100644 (file)
index 0000000..3f28c2c
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/automatedTests/emma_ant.jar differ
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/org.pluginbuilder.autotestsuite.feature-0.5.0.20090721PRD.zip b/org.apache.easyant4e.releng/build-files/automatedTests/org.pluginbuilder.autotestsuite.feature-0.5.0.20090721PRD.zip
new file mode 100644 (file)
index 0000000..968ecac
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/automatedTests/org.pluginbuilder.autotestsuite.feature-0.5.0.20090721PRD.zip differ
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/run-tests.properties b/org.apache.easyant4e.releng/build-files/automatedTests/run-tests.properties
new file mode 100644 (file)
index 0000000..0749cac
--- /dev/null
@@ -0,0 +1,91 @@
+# test.eclipse.host denotes the Eclipse installation which is the host for the test run.
+# The directory given here is expected to have an eclipse subdirectory.
+# The default is to use the same host as the build host but in general this should be changed to
+# a separate installation. You can also set this directory to a non existing location and provide
+# a zip file (see next property) which will then be extracted. 
+# The test host does not have to be a full Java/PDE SDK, the Eclipse platform is fully sufficient. Please ALWAYS USE FORWARD SLASHES.
+# @category testGeneral
+# @type Directory
+test.eclipse.host=${eclipseDir}/..
+
+# If you specify a non existing test.eclipse.host, you can provide a zipped Eclipse installation here,
+# e.g. eclipse-platform-3.3.2-win32.zip. You can set the test.eclipse.host to a subdirectory of the 
+# buildDirectory if you want to have a fresh installation for every test run, e.g. test.eclipse.host=${buildDirectory}/testhost 
+# @category testGeneral
+# @type File
+test.eclipse.zip=
+
+# The location of the Eclipse extension site. It consists of the built features, 
+# the Eclipse test framework and the autotestsuite. The extension site will be 
+# added with the standalone update manager to ${test.eclipse.host}.
+# @category testGeneral
+# @type Directory 
+test.eclipseExtensionDirectory=${buildDirectory}/eclipseextension/eclipse
+
+# Enable the autotestsuite trace in order to see which plugins and classes the autotestsuite searches for tests.
+# Useful for debugging the filter expressions below. 
+# @category testGeneral 
+# @type Boolean 
+autotestsuite.trace=true
+
+# Decides if the autotestsuite should run headless or not. Running headless means that the workbench does
+# not get started and the tests are executed directly instead. Cannot be used for UI tests, therefore.
+# @category testGeneral 
+# @type Boolean 
+autotestsuite.headless=false
+
+# Set the test application which the autoTestApplication runs with the test harness in place. This is useful to 
+# test the UI of an RCP application. This property is ignored if the headless mode is turned on.
+# @category testGeneral
+#autotest.testapplication=org.eclipse.ide.ui.workbench
+
+# Directory where the reports are collected
+# @category testHidden
+test.result.dir=${buildDirectory}/test-reports
+
+# Specifies the overall report in ${test.result.dir}/xml
+# @category testHidden
+test.aggregated.report=testReport_${buildLabel}.xml
+
+# Workspace for the tests. Particularly useful is ${test.workspace}/.metadata/.log
+# @category testHidden 
+test.workspace=${buildDirectory}/test-workspace
+
+# Defaults for autotestsuite
+# @category testHidden 
+autotestsuite.plugin.inclusions=
+
+# Defaults for autotestsuite
+# @category testHidden 
+autotestsuite.plugin.exclusions=
+
+# Defaults for autotestsuite
+# @category testHidden 
+autotestsuite.class.inclusions=
+
+# Defaults for autotestsuite
+# @category testHidden 
+autotestsuite.class.exclusions=
+
+# Denotes the ant script where the target ui-test is defined. Note that this property is
+# only necessary if you want to use the Eclipse test framework to run your test. If you
+# run the tests with the autotestsuite (i.e. you use the include/exclude filters below)
+# this property is not being used.
+# @category testHidden 
+test.library.xml=${test.eclipseExtensionDirectory}/plugins/org.eclipse.test_3.1.0/library.xml
+
+# Enablement for code coverage.
+# @category testCoverage
+# @type Boolean 
+pluginbuilder.is.runcoverage=false
+
+# Take a look at http://emma.sourceforge.net/reference/ch02s06s02.html#filtersyntax.ANT for the filter syntax.
+# @category testCoverage
+pluginbuilder.coverage.exclusionfilter=
+
+# @category testCoverage 
+pluginbuilder.coverage.inclusionfilter=
+
+# Place for runtime data.
+# @category coverageHidden
+emma.coverage.output=${buildDirectory}/coverage.ec
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/automatedTests/run-tests.xml b/org.apache.easyant4e.releng/build-files/automatedTests/run-tests.xml
new file mode 100644 (file)
index 0000000..d54ecfa
--- /dev/null
@@ -0,0 +1,255 @@
+<project name="Run automated Tests" default="run" basedir=".">
+       <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="../pluginbuilder-anttasks.jar" />
+       <typedef resource="org/pluginbuilder/anttasks/pluginbuildertypes.properties" classpath="../pluginbuilder-anttasks.jar" />
+
+       <GetHostName />
+       <property file="../../build_${hostname}.properties" />
+       <property file="../../build_local.properties" />
+       <property file="run-tests.properties" />
+       <property name="test.eclipse.host.eclipse" value="${test.eclipse.host}/eclipse" />
+
+       <import file="../build_shared.xml" />
+       
+       <condition property="is.emma">
+               <equals arg1="${pluginbuilder.is.runcoverage}" arg2="true"/>
+       </condition>
+       
+       <target name="-init" depends="-emmaInit">
+               <antcall target="-unpackEclipse"/>
+               <antcall target="-installEclipseExtensionLocation"/>
+               <antcall target="umAddSite" />
+               <!-- Useful for debugging 
+               <antcall target="umListFeaturesSite" />
+               -->
+       </target>
+
+       <target name="-installEclipseExtensionLocation">
+               <echo message="Installing plug-ins for testing into eclipse extension location" />
+               <mkdir dir="${test.eclipseExtensionDirectory}"/>
+               <condition property="buildResultZipDest" value="${test.eclipseExtensionDirectory}/.." else="${test.eclipseExtensionDirectory}">
+                       <equals arg1="${archivePrefix}" arg2="eclipse" />
+               </condition>
+               <unzip dest="${buildResultZipDest}">
+                       <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" excludes="**/${archiveNamePrefix}-*"/>
+               </unzip>
+               <antcall target="-emmaInstrument"/>
+               <unzip dest="${test.eclipseExtensionDirectory}/..">
+                       <fileset dir="." includes="eclipse-test-framework*.zip" />
+               </unzip>
+               <unzip dest="${test.eclipseExtensionDirectory}">
+                       <fileset dir="." includes="org.pluginbuilder.autotestsuite*.zip" />
+               </unzip>
+               <echo file="${test.eclipseExtensionDirectory}/.eclipseextension">id=org.eclipse.platform
+name=Eclipse Platform
+version=3.1.0</echo>
+       </target>
+
+       <target name="-unpackEclipse" unless="isEclipseInstallationAvailable">
+               <antcall target="unpack.eclipse">
+                       <param name="eclipse.installation.dir" value="${test.eclipse.host.eclipse}"/>
+                       <param name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
+               </antcall>
+       </target>
+
+       <!-- Example target which demonstrates how to run a test suite with the Eclipse test fwk.
+               Note that it is not needed if you use the autotestsuite
+
+       <target name="-runTestSuite" description="Should be called from allTests.xml only">
+               <ant target="core-test" antfile="${test.library.xml}" dir="${test.eclipse.host.eclipse}">
+                       --><!-- inject additional properties for Eclipse startup with data-dir property --><!--
+                       <property name="data-dir" value="${test.workspace} -clean -dev ${basedir}/emma.jar" />
+               <property name="plugin-name" value="org.rssowl.core.tests" />
+               <property name="classname" value="org.rssowl.core.tests.AllTests" />
+                       <property name="eclipse-home" value="${test.eclipse.host.eclipse}" />
+                       <property name="extraVMargs" value="-Demma.coverage.out.file=${emma.coverage.output}" />
+               </ant>
+       </target>
+       
+       <target name="run" depends="-init,-runTestSuite,-emmaReport" description="Run manually defined tests and create a report.">
+               <antcall target="umRemoveSite" />
+               <delete dir="${test.result.dir}" />
+               <mkdir dir="${test.result.dir}/xml" />
+               --><!-- collect creates an aggregated report file in ${test.eclipse.host} --><!--
+               <ant target="collect" antfile="${test.library.xml}" dir="${test.eclipse.host.eclipse}">
+                       <property name="includes" value="*.xml" />
+                       <property name="output-file" value="${test.aggregated.report}" />
+               </ant>
+               <copy file="${test.eclipse.host.eclipse}/${test.aggregated.report}" todir="${test.result.dir}/xml" />
+               
+               <BundleFileLocator eclipseInstallationRoot="${test.eclipseExtensionDirectory}" bundleId="org.pluginbuilder.autotestsuite.application" filePath="JUNIT.XSL" property="junit.xsl.file" />
+               <style style="${junit.xsl.file}" basedir="${test.result.dir}/xml" destdir="${test.result.dir}/html" />
+
+               <antcall target="-checkTestResultFileForErrors"/>
+       </target>
+       -->
+       
+       <target name="run" depends="-init,-runAutoTests,-emmaReport" description="Run all tests using the autotestsuite and create xml and html reports.">
+               <antcall target="umRemoveSite" />
+               <junitreport todir="${test.result.dir}/xml" tofile="${test.aggregated.report}">
+                       <fileset dir="${test.result.dir}/xml">
+                               <include name="*.xml" />
+                       </fileset>
+               </junitreport>
+
+               <BundleFileLocator eclipseInstallationRoot="${test.eclipseExtensionDirectory}" bundleId="org.pluginbuilder.autotestsuite.application" filePath="JUNIT.XSL" property="junit.xsl.file" />
+
+               <style style="${junit.xsl.file}" basedir="${test.result.dir}/xml" includes="${test.aggregated.report}" destdir="${test.result.dir}/html" />
+       </target>
+       
+       <target name="-markErrorOrFailure" if="isErrorOrFailure">
+               <!-- Write Message to stderr and continue the build. Do not let the build fail so that 
+                    other tasks which come afterwards can be completed. E.g. packaging might take place
+                    after test execution -->
+               <echo level="error" message="TESTS FAILED"/>
+       </target>
+       
+       <target name="-checkTestResultFileForErrors" unless="isErrorOrFailure" description="Check test result file for errors. Not needed for autotestsuite where the return status is used to signal a failed build."> 
+               <echo message="Checke auf Fehler: ${test.aggregated.report}"/>
+
+        <condition property="isErrorOrFailure">
+                <hasErrorOrFailure reportFile="${test.result.dir}/xml/${test.aggregated.report}" />
+        </condition>
+
+        <antcall target="-markErrorOrFailure" />        
+       </target>
+
+       <target name="-runAutoTests">
+               <mkdir dir="${test.result.dir}/xml"/>
+               <BundleFileLocator eclipseInstallationRoot="${test.eclipse.host.eclipse}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />
+               <condition property="optJvmArg" else="-DdummyVar=NotOnMac" value="-XstartOnFirstThread">
+                       <os family="mac"/>
+               </condition>
+               <condition property="testApplication" else="" value="-testApplication ${autotest.testapplication}">
+                       <isset property="autotest.testapplication"/>
+               </condition>
+               <java fork="true" dir="." logError="true" classname="org.eclipse.core.launcher.Main" resultproperty="autotestsuite.result"> 
+
+                       <arg line="-application org.pluginbuilder.autotestsuite.application.autoTestApplication ${testApplication}" />
+                       <arg line="-data ${test.workspace}" />
+                       <arg line="-os ${os}" />
+                       <arg line="-ws ${ws}" />
+                       <arg line="-arch ${arch}" />
+                       <arg line="-clean" />
+                       <arg line="-consolelog" />
+                       <arg line="-dev ${basedir}/emma.jar" />
+                       
+                       <jvmarg value="-Demma.coverage.out.file=${emma.coverage.output}"/>
+                       <jvmarg value="${optJvmArg}"/>
+                       <jvmarg value="-Xmx512m"/>
+                       
+                       <sysproperty key="autotestsuite.results.directory" value="${test.result.dir}/xml" />
+                       <sysproperty key="autotest.debug" value="${autotestsuite.trace}" />
+                       <sysproperty key="autotestsuite.headless" value="${autotestsuite.headless}" />
+                       <sysproperty key="autotestsuite.plugin.inclusions" value="${autotestsuite.plugin.inclusions}" />
+                       <sysproperty key="autotestsuite.plugin.exclusions" value="${autotestsuite.plugin.exclusions}|^org.eclipse.test$" />
+                       <sysproperty key="autotestsuite.class.inclusions" value="${autotestsuite.class.inclusions}" />
+                       <sysproperty key="autotestsuite.class.exclusions" value="${autotestsuite.class.exclusions}" />
+                       
+                       <classpath>
+                               <pathelement location="${equinoxjar}" />
+                       </classpath>
+               </java>
+               <condition property="isErrorOrFailure">
+                       <not>
+                               <equals arg1="${autotestsuite.result}" arg2="0"/>
+                       </not>
+               </condition>
+       
+               <antcall target="-markErrorOrFailure"/>
+       </target>
+
+       <target name="umAddSite">
+               <echo message="Adding Extension Site to ${test.eclipse.host}. Might fail if extension already exists."/>
+               <!-- the addSite calls fails if the extension site already exists (for example because it was not removed properly
+                    from a previous build. Nonetheless the tests can proceed --> 
+               <antcall target="updateManager">        
+                       <param name="updateManagerCommand" value="addSite"/>
+                       <param name="updateManagerCommandParam" value="-from"/>
+                       <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
+                       <param name="updateManagerCommandFailOnError" value="false"/>
+               </antcall>
+       </target>
+       
+       <target name="umRemoveSite">
+               <!--  This command might fail if the Extension Site has never been added or was properly removed before. -->
+               <echo message="Removing Extension Site from ${test.eclipse.host}."/>
+               
+               <antcall target="updateManager">        
+                       <param name="updateManagerCommand" value="removeSite"/>
+                       <param name="updateManagerCommandParam" value="-to"/>
+                       <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
+                       <param name="updateManagerCommandFailOnError" value="false"/>
+               </antcall>
+       </target>
+       
+       <target name="umListFeaturesSite">
+               <antcall target="updateManager">        
+                       <param name="updateManagerCommand" value="listFeatures"/>
+                       <param name="updateManagerCommandParam" value="-from"/>
+                       <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
+                       <param name="updateManagerCommandFailOnError" value="false"/>
+               </antcall>
+
+       </target>
+       
+       <target name="updateManager">
+               <BundleFileLocator eclipseInstallationRoot="${test.eclipse.host.eclipse}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />      
+               <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="${updateManagerCommandFailOnError}">
+                       <arg value="-ws" />
+                       <arg value="${ws}" />
+                       <arg value="-os" />
+                       <arg value="${os}" />                   
+                       <arg value="-application" />
+                       <arg value="org.eclipse.update.core.standaloneUpdate" />
+                       <arg value="-command" />
+                       <arg value="${updateManagerCommand}" />
+                       <arg value="${updateManagerCommandParam}" />
+                       <arg value="${updateManagerCommandSiteUrl}" />
+
+                       <classpath>
+                               <pathelement location="${equinoxjar}" />
+                       </classpath>
+                       
+               </java>
+       </target>
+       
+       
+       
+       <target name="-emmaInit" if="is.emma">
+               <path id='emma.lib' >
+                       <fileset dir='.' includes='*.jar' />
+               </path>
+               <taskdef resource='emma_ant.properties' classpathref='emma.lib' />
+       </target>
+       
+       <target name="-emmaReport" if="is.emma">                
+               <mkdir dir="${test.result.dir}/coverage" />
+               <emma enabled="${pluginbuilder.is.runcoverage}">
+                       <report encoding="UTF-8">
+                               <fileset dir="${buildDirectory}" includes="*.emma"/>
+                               <fileset file="${emma.coverage.output}"/>
+                           <html outfile="${test.result.dir}/coverage/coverage.html" />
+
+                               <sourcepath>
+                                       <dirset dir="${buildDirectory}/plugins">
+                                       </dirset>
+                               </sourcepath>
+                               
+                       </report>
+               </emma>
+       </target>
+
+       <target name="-emmaInstrument" if="is.emma">
+               <!-- <emma enabled="${pluginbuilder.is.runcoverage}"> -->
+               <emma>
+                       <instr verbosity="info" metadatafile="${buildDirectory}/metadata.emma" mode="overwrite">
+                               <instrpath>
+                                       <fileset dir="${test.eclipseExtensionDirectory}" includes="**/*.jar" excludes="**/emma*.jar"/>
+                                       <dirset dir="${test.eclipseExtensionDirectory}/plugins" includes="*" />
+                               </instrpath>
+                               <!-- http://emma.sourceforge.net/reference/ch02s06s02.html#filtersyntax.ANT -->
+                       <filter includes="${pluginbuilder.coverage.inclusionfilter}" excludes="${pluginbuilder.coverage.exclusionfilter}" />
+                       </instr>
+               </emma> 
+       </target>
+</project>
diff --git a/org.apache.easyant4e.releng/build-files/build.properties b/org.apache.easyant4e.releng/build-files/build.properties
new file mode 100644 (file)
index 0000000..17d940c
--- /dev/null
@@ -0,0 +1,210 @@
+# The prefix that will be used inside the generated archive. This should be set to eclipse
+# so that the archive can be directly unzipped into the dropins directory of the
+# Eclipse installation.
+# @category packaging
+archivePrefix=eclipse
+
+# The location under which all of the build output will be collected.
+# @category packaging
+collectingFolder=${archivePrefix}
+
+# Choose configurations if you want to build configuration specific plug-ins. However, if you
+# only want to create RCP distributables for different platforms do not change the default
+# *,*,*. If you select any other entry than *,*,* you also have to provide an assemble task in allElements.xml. 
+# @category compiling
+# @type list separator=&;values=*,*,*&win32,win32,x86&linux,gtk,ppc&linux,gtk,x86 & linux,gtk,x86_64 & linux,motif,x86 & solaris,motif,sparc & solaris,gtk,sparc & aix,motif,ppc & hpux,motif,PA_RISC & macosx,carbon,ppc & macosx,carbon,x86
+#configs=*,*,*
+
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# @category packaging
+# @type Boolean
+#groupConfigurations=false
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+# E.g. win32,win32,x86 - antZip
+#archivesFormat=
+       
+# Set to true for Jnlp generation
+# @category jnlp
+# @type Boolean
+# generateJnlp=false
+
+# Codebase should be a URL that will be used as the root of all relative URLs in the output.
+# @category jnlp
+#jnlp.codebase=<codebase url>
+
+# @category jnlp
+#jnlp.j2se=<j2se version>
+
+# @category jnlp
+#jnlp.locale=<a locale>
+
+# Generate <offlineAllowed/> attribute in the generated features
+# @category jnlp
+# @type Boolean
+#jnlp.generateOfflineAllowed=
+
+# Set to ${configs} in order to filter the content of the generated jnlp files based on the configuration being built
+# @category jnlp
+# @type enum values=${configs} 
+# jnlp.configs=                        
+
+# Check if you want to sign jars
+# @type Boolean
+# @category jarsigning
+#signJars=false
+
+# The Alias used for signing jars
+# @category jarsigning
+#sign.alias=
+
+# A path to the keystore used for signing jars
+# @category jarsigning
+#sign.keystore=
+
+# The password for the keystore
+# @category jarsigning
+#sign.storepass=
+
+#Arguments to send to the zip executable
+# @category packaging
+zipargs=
+
+#Arguments to send to the tar executable
+# @category packaging
+tarargs=
+
+# Control the creation of a file containing the version included in each configuration - on by default
+# @type Boolean 
+#generateVersionsLists=true
+
+# Indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+# @type Boolean
+filteredDependencyCheck=false
+
+# Indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+# @type Boolean
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+# @category compiling
+# bootclasspath=${java.home}/lib/rt.jar
+
+# @category executionEnvironment
+#CDC-1.0/Foundation-1.0=
+# @category executionEnvironment
+#CDC-1.1/Foundation-1.1=
+# @category executionEnvironment
+#OSGi/Minimum-1.0=
+# @category executionEnvironment
+#OSGi/Minimum-1.1=
+# @category executionEnvironment
+#JRE-1.1=
+# @category executionEnvironment
+#J2SE-1.2=
+# @category executionEnvironment
+#J2SE-1.3=
+# @category executionEnvironment
+#J2SE-1.4=
+# @category executionEnvironment
+#J2SE-1.5=
+# @category executionEnvironment
+#JavaSE-1.6=
+# @category executionEnvironment
+#PersonalJava-1.1=
+# @category executionEnvironment
+#PersonalJava-1.2=
+# @category executionEnvironment
+#CDC-1.0/PersonalBasis-1.0=
+# @category executionEnvironment
+#CDC-1.0/PersonalJava-1.0=
+# @category executionEnvironment
+#CDC-1.1/PersonalBasis-1.1=
+# @category executionEnvironment
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+# @category compiling
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+# @category compiling
+# @type Boolean
+javacDebugInfo=false
+
+# Whether or not to fail the build if there are compiler errors
+# @category compiling
+# @type Boolean
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+# @category compiling
+# @type Boolean
+javacVerbose=false
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+# @category compiling
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+# @type enum values=1.1,1.2,1.3,1.4,1.5,1.6
+# @category compiling
+#javacSource=1.3
+javacSource=1.5
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+# @type enum values=1.1,1.2,1.3,1.4,1.5,1.6
+# @category compiling
+#javacTarget=1.1
+javacTarget=1.5
+
+# Set the description for the update site. The update manager shows the description in the Updates dialog.
+# @category updateSite
+updateSiteDescription=Update site generated by pluginbuilder.
+
+# There will be one category for the generated update site. Here you can set the name.
+# It is more like an id with which features refer to their category and does not appear in the GUI.
+# @category updateSite
+updateSiteCategoryName=Builds
+
+# Here you can set the Label of the category which will be displayed in the Updates dialog.
+# @category updateSite
+updateSiteCategoryLabel=Nightly Builds
+
+# Create a provisioning (p2) repository. Since Eclipse 3.4 it is recommended that you create
+# a p2 repository for your features.
+# However, the installation of old-style (pre p2) update sites is still possible.
+# @type Boolean
+# @category p2
+generate.p2.metadata=true
+
+# @category hidden
+p2.metadata.repo=file:${buildDirectory}/repo
+
+# @category hidden
+p2.artifact.repo=file:${buildDirectory}/repo
+
+# The name of the metadata repository. The Update Manager will display this name.
+# @category p2
+p2.metadata.repo.name=EasyAnt For Eclipse Update Site
+
+# The name of the artifacts repository
+# @category p2
+p2.artifact.repo.name=EasyAnt For Eclipse Update Site
+
+# @category hidden
+p2.flavor=tooling
+# @category hidden
+p2.publish.artifacts=true
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/build_rcp.properties b/org.apache.easyant4e.releng/build-files/build_rcp.properties
new file mode 100644 (file)
index 0000000..bb40497
--- /dev/null
@@ -0,0 +1,37 @@
+# The name of the Product Configuration file (.product). You can either put a product file in the root
+# folder of this pluginbuilder project and specify its name here. Or you can use an existing product file
+# from one of your plug-ins by specifying a path like ${buildDirectory}/plugins/<your-plugin>/<your-product>.product.
+# This field is mandatory. 
+# @category rcp
+product=
+
+# Select the platforms for which you want to create RCP deliverables.
+# @category rcp
+# @type list separator=&;values=win32,win32,x86&linux,gtk,ppc&linux,gtk,x86 & linux,gtk,x86_64 & linux,motif,x86 & solaris,motif,sparc & solaris,gtk,sparc & aix,motif,ppc & hpux,motif,PA_RISC & macosx,carbon,ppc & macosx,carbon,x86
+configs=win32,win32,x86
+
+# Prefix for the created archive file name. The archive name always contains the configuration. The prefix and configuration are divided by a minus character. If you want to include the version you can reference the property ${version.full}, a sample value for archiveNamePrefix is myRcpApp-${version.full}  
+# @category rcp
+archiveNamePrefix=
+
+# You need to set this to true in order to get archives for your configurations.
+# @category rcp
+# @type Boolean
+# runPackager=false
+runPackager=true
+
+# A Pluginbuilder property which prevents running the postBuild target. Since the RCP 
+# build is usually run after a regular build which includes the postBuild phase no.postBuild
+# should be activated for RCP builds
+# @category rcp_hidden
+# @type Boolean
+no.postBuild=true
+
+# Another Pluginbuilder property which should be activated for RCP builds
+# @category rcp_hidden
+# @type Boolean 
+build.container.feature=true
+
+# Set the root path in the platform specific packages
+# @category packaging
+# archivePrefix=
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/build_shared.xml b/org.apache.easyant4e.releng/build-files/build_shared.xml
new file mode 100644 (file)
index 0000000..8d17365
--- /dev/null
@@ -0,0 +1,116 @@
+<project name="Shared build targets">
+       <!-- the following properties must be set from the calling script 
+    <property name="eclipse.installation.dir" value="${buildDirectory}"/>
+    <property name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
+    eclipse.download.cache,pluginbuilder.eclipse.url
+    optional:
+    <property name="pluginbuilder.additional.feature.urls" value="featureurl1,featureurl2"/>
+    -->
+    
+       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
+       
+       <target name="unpack.eclipse">
+               <condition property="unpack.eclipse">
+                       <not>
+                               <available type="dir" file="${eclipse.installation.dir}"/>
+                       </not>
+               </condition>
+               <antcall target="-unpack.eclipse.ifnecessary"/>
+       </target>    
+    
+       <!-- call either with or feature.url or pluginbuilder.eclipse.url
+                sets property archive.location to the archive path in download cache.
+        -->
+       <target name="-set.archive.location" if="pluginbuilder.is.server">
+               <!-- set default, useful for server where pluginbuilder.eclipse.url.default can be specified in build_local.properties --> 
+               <property name="pluginbuilder.eclipse.url" value="${pluginbuilder.eclipse.url.default}"/>
+               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                               <isset property="feature.url"/>
+               </condition>
+               <mkdir dir="${eclipse.download.cache}"/>
+               <tempfile destdir="${eclipse.download.cache}" property="tmp.file" suffix=".txt" prefix="downloadurl"/>          
+               <echo file="${tmp.file}" message="${archive.url}"/>
+               <checksum file="${tmp.file}" property="pluginbuilder.eclipse.url.checksum"/>
+               <delete file="${tmp.file}"/>
+               <property name="archive.location" value="${eclipse.download.cache}/${pluginbuilder.eclipse.url.checksum}"/>
+               <!-- <echo message="${archive.location} is archive location for ${archive.url}"/> -->
+       </target>
+       
+       <target name="-set.eclipse.local.tar.server" if="pluginbuilder.is.server" depends="-set.archive.location">
+               <property name="eclipse.local.tar" value="${archive.location}"/>
+       </target>
+       
+       <target name="-set.eclipse.local.tar.non.server" unless="pluginbuilder.is.server">
+               <property name="eclipse.local.tar" value="${eclipse.local.tar.non.server}"/>
+       </target>
+       
+       <target name="-get.archive.ifnecessary" unless="eclipse.is.downloaded">
+               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                               <isset property="feature.url"/>
+               </condition>
+               <get src="${archive.url}" dest="${archive.location}" />         
+       </target>
+       
+       <target name="-get.archive" depends="-set.archive.location" if="pluginbuilder.is.server">
+               <condition property="eclipse.is.downloaded">
+                       <available file="${archive.location}" property="${eclipse.is.downloaded}"/>
+               </condition>            
+               <antcall target="-get.archive.ifnecessary"/> 
+       </target>
+       
+       <target name="-get.features" if="pluginbuilder.is.server" >
+               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-get.archive" inheritall="true"/>
+       </target>
+       
+       <target name="-unpack.features" if="pluginbuilder.is.server">
+               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-unpack.feature" inheritall="true"/>
+       </target>
+       
+       <target name="-unpack.feature" depends="-set.archive.location">
+               <property name="tempunziplocation" value="${buildDirectory}/tmpunzip"/>
+               <delete dir="${tempunziplocation}" failonerror="false"/>
+               <mkdir dir="${tempunziplocation}"/>
+               <unzip src="${archive.location}" overwrite="true" dest="${tempunziplocation}"/>
+               <condition property="moveroot" value="${tempunziplocation}/eclipse" else="${tempunziplocation}">
+                               <available file="${tempunziplocation}/eclipse" type="dir"/>
+               </condition>
+               <move todir="${eclipse.installation.dir}" includeemptydirs="true">
+                       <fileset dir="${moveroot}" includes="**"/>
+               </move>
+       </target>
+                       
+       <target name="-unpack.eclipse.ifnecessary" if="unpack.eclipse">
+               <antcall target="-get.archive"/>
+               <condition property="is.windows">
+                 <os family="windows"/>
+               </condition>
+               <antcall target="-unpack.eclipse.windows"/>
+               <antcall target="-unpack.eclipse.linux"/>
+               <antcall target="-get.features"/>
+               <antcall target="-unpack.features"/>
+       </target>
+       
+       <target name="-unpack.eclipse.windows" if="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+               <unzip src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.."/>              
+       </target>
+       
+       <target name="-unpack.eclipse.linux" unless="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+               <untar src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.." compression="gzip"/>           
+       </target>
+       
+       <target name="test">
+               <property name="buildDirectory" value="C:/Temp/tst"/>
+               <mkdir dir="${buildDirectory}"/>
+               <property name="eclipse.download.cache" value="C:/Temp/downloadcache"/>
+               <property name="pluginbuilder.is.server" value="true"/>
+               <property name="pluginbuilder.eclipse.url" value="http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-PDE-3.2.2.zip"/>
+               
+               <property name="eclipse.installation.dir" value="C:/Temp/eclipse_root/eclipse"/>
+               <delete dir="${eclipse.installation.dir}" failonerror="false"/>
+               <property name="pluginbuilder.feature.urls" value="http://self.pluginbuilder.org/0.2.0/org.pluginbuilder.feature-0.2.0.20070218PRD.zip,http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-examples-3.2.2.zip"/>
+               <antcall target="unpack.eclipse"/>
+       </target>
+       
+</project>
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/customTargets.xml b/org.apache.easyant4e.releng/build-files/customTargets.xml
new file mode 100644 (file)
index 0000000..1b8251c
--- /dev/null
@@ -0,0 +1,208 @@
+<project name="Build specific targets and properties" default="noDefault">
+       <condition property="isNightlyBuild">
+               <equals arg1="${buildType}" arg2="N" />
+       </condition>
+       <condition property="isNightlyOrIntegrationBuild">
+               <or>
+                       <equals arg1="${buildType}" arg2="N" />
+                       <equals arg1="${buildType}" arg2="I" />
+               </or>
+       </condition>
+       
+       <property file="${buildHome}/pluginbuilder.config" />
+       
+       <property file="${buildDirectory}/version.properties" />
+       <property name="buildLabel" value="${buildType}-${version.full}" />
+       <property name="buildId" value="${version.full}" />
+       
+       <condition property="isCVSOrCopy" value="true">
+               <or>
+                       <equals arg1="${pluginbuilder.is.cvs}" arg2="true"/>
+                       <equals arg1="${pluginbuilder.is.copy}" arg2="true"/>
+               </or>
+       </condition>
+       <condition property="isSVN" value="true">
+               <equals arg1="${pluginbuilder.is.svn}" arg2="true"/>
+       </condition>
+       <condition property="isRunTests" value="true">
+               <equals arg1="${pluginbuilder.is.runtests}" arg2="true"/>
+       </condition>
+       
+       
+       <target name="allElements">
+               <condition property="isFetch" value="true">
+                       <equals arg1="${target}" arg2="fetchElement"/>
+               </condition>
+           <condition property="is.svn.fetch" value="true">
+                       <and>
+                               <equals arg1="${target}" arg2="fetchElement"/>
+                               <equals arg1="${pluginbuilder.is.svn}" arg2="true"/>
+                       </and>
+           </condition>
+       
+               <antcall target="allElementsExceptSvnFetch"/>
+               <antcall target="fetchSubversion"/>
+       </target>
+       
+       <import file="allElements.xml"/>
+       <import file="subversionSupport.xml"/>
+       
+       
+       <!-- ===================================================================== -->
+       <!-- Check out map files from correct repository -->
+       <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
+       <!-- ===================================================================== -->
+       <target name="getMapFiles" if="isCVSOrCopy">
+               <echo message="Copying map files."/>
+               <copy todir="${buildDirectory}/maps">
+                       <fileset dir="${buildHome}/maps" includes="*.map"></fileset>
+               </copy>
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- Steps to do before setup -->
+       <!-- ===================================================================== -->
+       <target name="preSetup">        
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do after setup but before starting the build proper -->
+       <!-- ===================================================================== -->
+       <target name="postSetup">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do before fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="preFetch">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do after fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="postFetch">
+               <condition property="is.fetch" value="true">
+                       <available file="${buildDirectory}/plugins"/>
+               </condition>
+               <fail unless="is.fetch" message="There was no plug-in fetched. Was the configuration generated? Is the repository correct?"/>
+               <antcall target="replaceVersions"/>             
+       </target>
+       
+       <target name="replaceVersions">
+               <fail unless="version.full" message="Property version.full must be set" />
+               <fail unless="version.qualifier" message="Property version.qualifier must be set" />
+       
+               <echo message="Updating versions in feature and plugin manifests. Full version: ${version.full}, qualifier: ${version.qualifier}"/>
+               <replaceregexp
+            match="(&lt;feature[^&gt;]*version=)&quot;0.0.0&quot;"
+            replace="\1&quot;${version.full}&quot;"
+                       byline="false"
+                       flags="s">
+                         <fileset dir="${buildDirectory}/features" includes="**/feature.xml"/>
+               </replaceregexp>
+               <replaceregexp
+            match="(&lt;feature[^&gt;]*version=&quot;.*)qualifier&quot;"
+            replace="\1${version.qualifier}&quot;"
+                       byline="false"
+                       flags="s">
+                         <fileset dir="${buildDirectory}/features" includes="**/feature.xml"/>
+               </replaceregexp>
+               <!-- in a manual build started with export from the feature.xml, there is no
+                       need to replace the versions in the plugin.xml files if they are set to 0.0.0,
+                       but here it needs to be -->
+               <replace dir="${buildDirectory}/plugins">
+                       <include name="**/plugin.xml"/>
+                       <replacefilter token="0.0.0" value="${version.full}" />
+               </replace>
+               <replace dir="${buildDirectory}/plugins">
+                       <include name="**/META-INF/MANIFEST.MF"/>
+                       <replacefilter token="Bundle-Version: 0.0.0" value="Bundle-Version: ${version.full}" />
+                       <replacefilter token="qualifier" value="${version.qualifier}" />
+               </replace>      
+       </target>       
+       <!-- ===================================================================== -->
+       <!-- Steps to do before generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="preGenerate">
+               <!-- fail unless="featureVersion" message="Property featureVersion must be set.
+                Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix." />
+                -->
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do after generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="postGenerate">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="preProcess">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do after running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="postProcess">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="preAssemble">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="postAssemble">
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Steps to do before/after packaging RCP. -->
+       <!-- ===================================================================== -->
+       <target name="prePackage">
+       </target>
+       
+       <target name="postPackage">
+               <!-- copy build results for rcp build -->
+               <copy todir="${buildResultsDirectory}" flatten="true">
+                       <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" />
+               </copy>
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the build is done. -->
+       <!-- ===================================================================== -->
+       <property name="buildResultsDirectory" value="${buildDirectory}/results" />
+       <target name="postBuild" depends="-prepareBuildResultsDirectory" unless="no.postBuild">
+               <antcall target="runTests"/>
+               <copy todir="${buildResultsDirectory}" flatten="true">
+                       <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" />
+               </copy>
+               <condition property="is.External.Postbuild">
+                       <available file="${buildHome}/build-files/postBuild.xml"/>
+               </condition>
+               <antcall target="callExternalPostBuild"/>
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Run tests. -->
+       <!-- ===================================================================== -->
+       <target name="runTests" if="isRunTests">
+               <property name="automatedTestsHome" location="${buildHome}/build-files/automatedTests"/>
+
+               <ant antfile="${automatedTestsHome}/run-tests.xml" target="run" dir="${automatedTestsHome}">
+                       <property name="test.result.dir" value="${buildResultsDirectory}/testresults"/>
+               </ant>
+       </target>       
+       <!--======================================================-->
+       <!-- Gather build results  -->
+       <!-- ==================================================== -->
+       <target name="-prepareBuildResultsDirectory">
+               <echo message="Creating ${buildResultsDirectory}" />
+               <mkdir dir="${buildResultsDirectory}" />        
+       </target>
+
+       <!--======================================================-->
+       <!-- Call External post build file if available -->
+       <!-- ==================================================== -->
+       <target name="callExternalPostBuild" if="is.External.Postbuild">
+               <ant antfile="${buildHome}/build-files/postBuild.xml"/>
+       </target>
+       
+       <target name="noDefault">
+               <echo message="You must specify a target when invoking this file" />
+       </target>
+</project>
diff --git a/org.apache.easyant4e.releng/build-files/fetchSvnAll.xml b/org.apache.easyant4e.releng/build-files/fetchSvnAll.xml
new file mode 100644 (file)
index 0000000..4437706
--- /dev/null
@@ -0,0 +1,5 @@
+<project name="Generated">
+  <target name="fetch.svn.all">
+    <!-- use pluginbuilder editor to change content -->
+  </target>
+</project>
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/pluginbuilder-anttasks.jar b/org.apache.easyant4e.releng/build-files/pluginbuilder-anttasks.jar
new file mode 100644 (file)
index 0000000..98d2c3e
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/pluginbuilder-anttasks.jar differ
diff --git a/org.apache.easyant4e.releng/build-files/postBuild.xml b/org.apache.easyant4e.releng/build-files/postBuild.xml
new file mode 100644 (file)
index 0000000..983a954
--- /dev/null
@@ -0,0 +1,109 @@
+<project name="Run as part of postBuild" default="main">
+       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
+       <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="${buildHome}/build-files/pluginbuilder-anttasks.jar" />
+       
+       
+    <target name="main">
+       <property name="UpdateSiteStagingLocation" value="${buildDirectory}/tmpUpdateSite/updateSite"/>
+       <property name="UpdateSiteFinalLocation" value="${buildResultsDirectory}/../updateSite"/>
+       <property name="siteXmlFile" value="${UpdateSiteStagingLocation}/site.xml"/>
+       
+        <antcall target="-generateUpdateSite"/>
+       <antcall target="-createNightlyBuildSiteXml"/>
+       <zip destfile="${buildResultsDirectory}/updateSite-${version.full}.zip" basedir="${UpdateSiteStagingLocation}"/>
+       <antcall target="deleteSiteXml"/>
+       <copy todir="${UpdateSiteFinalLocation}">
+               <fileset dir="${UpdateSiteStagingLocation}" includes="**"/>
+       </copy>
+       <delete dir="${UpdateSiteStagingLocation}/../.." includes="tmpUpdateSite/**" includeemptydirs="true"/>
+       <antcall target="-p2"/>
+    </target>
+       
+       <target name="deleteSiteXml" unless="isNightlyBuild">
+               <!-- in release builds the site.xml should not be overwritten, so older version can survive -->
+               <delete file="${siteXmlFile}"/>
+       </target>
+    
+    <!--======================================================-->
+    <!-- UpdateSite Export target, to be called from allElements  -->
+    <!-- ==================================================== -->
+    <target name="updateSiteExport">
+        <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar">
+            <property name="feature.destination" value="${UpdateSiteStagingLocation}/features"/>
+            <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins"/>
+        </ant>
+    </target>
+    
+    <target name="-generateUpdateSite">
+        <!-- Create the directory structure -->
+        <mkdir dir="${UpdateSiteStagingLocation}"/>
+        <mkdir dir="${UpdateSiteStagingLocation}/features"/>
+        <mkdir dir="${UpdateSiteStagingLocation}/plugins"/>
+       <condition property="jarProcessor.sign" value="true">
+               <istrue value="${signJars}"/>
+       </condition>
+        <!-- Build the jar files -->
+        <ant antfile="${builder}/customTargets.xml" target="allElements">
+            <property name="genericTargets" value="${builder}/postBuild.xml"/>
+            <property name="target" value="updateSiteExport"/>
+        </ant>
+        <!-- site.xml files for integration and release builds are handled elsewhere -->
+        <antcall target="-createNightlyBuildSiteXml"/>
+        <delete dir="${buildDirectory}/temp.updatesite"/>
+    </target>
+       
+    <target name="-createNightlyBuildSiteXml">
+       <echo>${siteXmlFile}</echo>
+        <echo file="${siteXmlFile}">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;site&gt;
+               &lt;description&gt;${updateSiteDescription}&lt;/description&gt;
+</echo>
+       <foreach list="${pluginbuilder.features}" delimiter="," target="-appendFeatureElement" param="featureId" inheritall="true"/> 
+        <echo file="${siteXmlFile}" append="true">             &lt;category-def name=&quot;${updateSiteCategoryName}&quot;
+            label=&quot;${updateSiteCategoryLabel}&quot;&gt;
+               &lt;/category-def&gt;
+&lt;/site&gt;</echo>
+    </target>
+
+       <target name="-appendFeatureElement">
+               <!-- we can not rely on ${version.full} at this point since people could use
+                       a fix feature id like 0.5.0.qualifier. ${version.full} would only work if
+                       the feature were set to 0.0.0 --> 
+               <loadfile property="featurexml" srcfile="${buildDirectory}/features/${featureId}/feature.xml"/>
+               <SetRegex input="${featurexml}" match="^.*&lt;feature.+?version=&quot;(.+?)&quot;.*$" property="realFeatureVersion" value="\1" />
+       <echo file="${siteXmlFile}" append="true">              &lt;feature 
+               url=&quot;features/${featureId}_${realFeatureVersion}.jar&quot; 
+               id=&quot;${featureId}&quot; 
+               version=&quot;${realFeatureVersion}&quot;&gt; 
+       &lt;category name=&quot;${updateSiteCategoryName}&quot;/&gt; 
+               &lt;/feature&gt;
+</echo>        
+    </target>
+       
+       <target name="-p2">
+               <condition property="is.p2" value="true">
+                               <equals  arg1="${generate.p2.metadata}" arg2="true"/>
+               </condition>
+               <property name="p2archive" value="${buildResultsDirectory}/p2-repository-${version.full}.zip"/>
+               <antcall target="-createP2Archive"/>
+               <antcall target="-createP2UpdateSite"/>
+       </target>
+               
+       <target name="-createP2Archive" if="is.p2">
+               <pathconvert property="repodir">
+                       <resources>
+                             <url url="${p2.metadata.repo}"/>
+                       </resources>
+                       <map from="file:" to=""/>
+               </pathconvert>
+               <zip destfile="${p2archive}" basedir="${repodir}"/>
+       </target>
+       
+       <target name="-createP2UpdateSite" if="is.p2">
+               <property name="p2updatesite" value="${buildResultsDirectory}/../p2-updateSite"/>
+               <delete dir="${p2updatesite}"/>
+               <mkdir dir="${p2updatesite}"/>
+               <unzip src="${p2archive}" dest="${p2updatesite}"/>
+       </target>
+       
+</project>
diff --git a/org.apache.easyant4e.releng/build-files/subversionSupport.xml b/org.apache.easyant4e.releng/build-files/subversionSupport.xml
new file mode 100644 (file)
index 0000000..55929b4
--- /dev/null
@@ -0,0 +1,26 @@
+<project name="to be included into customTargets.xml">
+
+       <import file="fetchSvnAll.xml"/>
+
+       <path id="project.classpath">
+               <pathelement location="${buildHome}/build-files/svn/svnant.jar"/>
+               <pathelement location="${buildHome}/build-files/svn/svnClientAdapter.jar"/>
+       </path>
+       
+       <target name="fetchSubversion" if="is.svn.fetch">
+                <taskdef resource="svntask.properties" classpathref="project.classpath"/>
+                <property name="fetchTag" value="HEAD"/>
+                <antcall target="fetch.svn.all"/>
+       </target>
+    
+    <target name="svn.co">
+       <property name="target.dir" value="${element.id}"/>
+       <condition property="svn.url" value="${pluginbuilder.svn.url}" else="${url}">
+               <isset property="pluginbuilder.svn.url"/>
+       </condition>
+       <svn javahl="false" username="${pluginbuilder.svn.user}" password="${pluginbuilder.svn.password}">
+                       <checkout revision="${fetchTag}" url="${svn.url}/${project.name}" destPath="${buildDirectory}/${target}/${target.dir}" />
+               </svn>          
+       </target>  
+
+</project>
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/svn/SVNCLIENTADAPTER-LICENSE b/org.apache.easyant4e.releng/build-files/svn/SVNCLIENTADAPTER-LICENSE
new file mode 100644 (file)
index 0000000..4e11cce
--- /dev/null
@@ -0,0 +1,185 @@
+SVNClientAdapter Library License
+
+This license applies to all portions of SVNClientAdapter library, which 
+are not externally-maintained libraries (e.g. JavaHL or JavaSVN).
+
+Such libraries have their own licenses; we recommend you read them, as
+their terms may differ from the terms below.
+
+=============================================================================
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build-files/svn/svnClientAdapter.jar b/org.apache.easyant4e.releng/build-files/svn/svnClientAdapter.jar
new file mode 100644 (file)
index 0000000..a6ce6df
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/svn/svnClientAdapter.jar differ
diff --git a/org.apache.easyant4e.releng/build-files/svn/svnant.jar b/org.apache.easyant4e.releng/build-files/svn/svnant.jar
new file mode 100644 (file)
index 0000000..ef9563a
Binary files /dev/null and b/org.apache.easyant4e.releng/build-files/svn/svnant.jar differ
diff --git a/org.apache.easyant4e.releng/build.properties b/org.apache.easyant4e.releng/build.properties
new file mode 100644 (file)
index 0000000..9f845e7
--- /dev/null
@@ -0,0 +1,210 @@
+# The prefix that will be used inside the generated archive. This should be set to eclipse
+# so that the archive can be directly unzipped into the dropins directory of the
+# Eclipse installation.
+# @category packaging
+archivePrefix=eclipse
+
+# The location under which all of the build output will be collected.
+# @category packaging
+collectingFolder=${archivePrefix}
+
+# Choose configurations if you want to build configuration specific plug-ins. However, if you
+# only want to create RCP distributables for different platforms do not change the default
+# *,*,*. If you select any other entry than *,*,* you also have to provide an assemble task in allElements.xml. 
+# @category compiling
+# @type list separator=&;values=*,*,*&win32,win32,x86&linux,gtk,ppc&linux,gtk,x86 & linux,gtk,x86_64 & linux,motif,x86 & solaris,motif,sparc & solaris,gtk,sparc & aix,motif,ppc & hpux,motif,PA_RISC & macosx,carbon,ppc & macosx,carbon,x86
+#configs=*,*,*
+
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# @category packaging
+# @type Boolean
+#groupConfigurations=false
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+# E.g. win32,win32,x86 - antZip
+#archivesFormat=
+       
+# Set to true for Jnlp generation
+# @category jnlp
+# @type Boolean
+# generateJnlp=false
+
+# Codebase should be a URL that will be used as the root of all relative URLs in the output.
+# @category jnlp
+#jnlp.codebase=<codebase url>
+
+# @category jnlp
+#jnlp.j2se=<j2se version>
+
+# @category jnlp
+#jnlp.locale=<a locale>
+
+# Generate <offlineAllowed/> attribute in the generated features
+# @category jnlp
+# @type Boolean
+#jnlp.generateOfflineAllowed=
+
+# Set to ${configs} in order to filter the content of the generated jnlp files based on the configuration being built
+# @category jnlp
+# @type enum values=${configs} 
+# jnlp.configs=                        
+
+# Check if you want to sign jars
+# @type Boolean
+# @category jarsigning
+#signJars=false
+
+# The Alias used for signing jars
+# @category jarsigning
+#sign.alias=
+
+# A path to the keystore used for signing jars
+# @category jarsigning
+#sign.keystore=
+
+# The password for the keystore
+# @category jarsigning
+#sign.storepass=
+
+#Arguments to send to the zip executable
+# @category packaging
+zipargs=
+
+#Arguments to send to the tar executable
+# @category packaging
+tarargs=
+
+# Control the creation of a file containing the version included in each configuration - on by default
+# @type Boolean 
+#generateVersionsLists=true
+
+# Indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+# @type Boolean
+filteredDependencyCheck=false
+
+# Indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+# @type Boolean
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+# @category compiling
+# bootclasspath=${java.home}/lib/rt.jar
+
+# @category executionEnvironment
+#CDC-1.0/Foundation-1.0=
+# @category executionEnvironment
+#CDC-1.1/Foundation-1.1=
+# @category executionEnvironment
+#OSGi/Minimum-1.0=
+# @category executionEnvironment
+#OSGi/Minimum-1.1=
+# @category executionEnvironment
+#JRE-1.1=
+# @category executionEnvironment
+#J2SE-1.2=
+# @category executionEnvironment
+#J2SE-1.3=
+# @category executionEnvironment
+#J2SE-1.4=
+# @category executionEnvironment
+#J2SE-1.5=
+# @category executionEnvironment
+#JavaSE-1.6=
+# @category executionEnvironment
+#PersonalJava-1.1=
+# @category executionEnvironment
+#PersonalJava-1.2=
+# @category executionEnvironment
+#CDC-1.0/PersonalBasis-1.0=
+# @category executionEnvironment
+#CDC-1.0/PersonalJava-1.0=
+# @category executionEnvironment
+#CDC-1.1/PersonalBasis-1.1=
+# @category executionEnvironment
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+# @category compiling
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+# @category compiling
+# @type Boolean
+javacDebugInfo=false
+
+# Whether or not to fail the build if there are compiler errors
+# @category compiling
+# @type Boolean
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+# @category compiling
+# @type Boolean
+javacVerbose=false
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+# @category compiling
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+# @type enum values=1.1,1.2,1.3,1.4,1.5,1.6
+# @category compiling
+#javacSource=1.3
+javacSource=1.5
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+# @type enum values=1.1,1.2,1.3,1.4,1.5,1.6
+# @category compiling
+#javacTarget=1.1
+javacTarget=1.5
+
+# Set the description for the update site. The update manager shows the description in the Updates dialog.
+# @category updateSite
+updateSiteDescription=Update site generated by pluginbuilder.
+
+# There will be one category for the generated update site. Here you can set the name.
+# It is more like an id with which features refer to their category and does not appear in the GUI.
+# @category updateSite
+updateSiteCategoryName=Builds
+
+# Here you can set the Label of the category which will be displayed in the Updates dialog.
+# @category updateSite
+updateSiteCategoryLabel=Nightly Builds
+
+# Create a provisioning (p2) repository. Since Eclipse 3.4 it is recommended that you create
+# a p2 repository for your features.
+# However, the installation of old-style (pre p2) update sites is still possible.
+# @type Boolean
+# @category p2
+generate.p2.metadata=true
+
+# @category hidden
+p2.metadata.repo=file:${buildDirectory}/repo
+
+# @category hidden
+p2.artifact.repo=file:${buildDirectory}/repo
+
+# The name of the metadata repository. The Update Manager will display this name.
+# @category p2
+p2.metadata.repo.name=EasyAnt For Eclipse Update Site
+
+# The name of the artifacts repository
+# @category p2
+p2.artifact.repo.name=Artifact Repo Name
+
+# @category hidden
+p2.flavor=tooling
+# @category hidden
+p2.publish.artifacts=true
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build.xml b/org.apache.easyant4e.releng/build.xml
new file mode 100644 (file)
index 0000000..54d8485
--- /dev/null
@@ -0,0 +1,243 @@
+<!--  This script will not be uploaded to the server.
+      PLEASE DO NOT MODIFY 
+      If you modify this script it is likely that the build will not work on the server
+-->
+<project name="Build Facade" default="main">
+       <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="build-files/pluginbuilder-anttasks.jar" />
+       
+       <GetHostName />
+       <property file="build_${hostname}.properties" />
+       <property file="build_local.properties" />
+       <property name="eclipse.installation.dir" value="${eclipseDir}"/>
+       <import file="build-files/build_shared.xml"/>
+       
+       <target name="-properties">             
+               
+               <!-- versioning -->
+               <property name="build.version" value="HEAD"/>
+               <property name="releaseConfigFile" value="releases/${build.version}.properties"/>
+               <condition property="releaseConfigFile.exists">
+                       <available file="${releaseConfigFile}"/>
+               </condition>
+               <fail message="Could not read release config file: ${releaseConfigFile}" unless="releaseConfigFile.exists"/>
+               <property file="${releaseConfigFile}" />
+
+               <tstamp>
+                     <format property="version.qualifier" pattern="yyyyMMddHHmm" timezone="GMT" unit="minute"/>
+               </tstamp>
+               
+               <property name="buildTypePresentation" value=""/>
+               <property name="version.full" value="${version}.${version.qualifier}${buildTypePresentation}"/>
+
+               <!-- includes -->
+               <GetHostName />
+               <property file="build_${hostname}.properties" />
+               <property file="build_local.properties" />
+               <property file="pluginbuilder.config" />
+               
+               <!-- set defaults -->
+               <property name="buildTarget" value="main"/>
+               <property name="verboseAnt" value="-Ddummy=true"/>
+               
+               <!-- check if clean should be called -->
+               <condition property="is.clean">
+                       <or>
+                               <equals arg1="main" arg2="${buildTarget}" trim="true"/>
+                               <equals arg1="fetch" arg2="${buildTarget}" trim="true"/>
+                       </or>
+               </condition>
+               
+               <condition property="no.rcp.build" value="true">
+                       <not>
+                               <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>
+                       </not>
+               </condition>
+                               
+       </target>
+               
+       <target name="-prepare.build.host">
+
+               <antcall target="unpack.eclipse"/>
+               
+               <available type="dir" file="${eclipseDir}/plugins" property="eclipseDir.plugins.exists"/>
+               <fail message="Could not find directory ${eclipseDir}/plugins. Please check eclipseDir in build_local.properties" unless="eclipseDir.plugins.exists"/>
+               
+               <!-- determine buildfiles -->
+               <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.pde.build" filePath="scripts/build.xml" property="regularbuildfile" />         
+               <dirname file="${regularbuildfile}" property="scriptdir"/>
+               <property name="productbuildfile" value="${scriptdir}/productBuild/productBuild.xml"/>
+       
+               <!-- determine launcher -->
+               <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />             
+
+       </target>
+       
+       <target name="-clean" if="is.clean">
+               <echo level="info" message="Cleaning directory ${buildDirectory}"/>
+               <delete dir="${buildDirectory}" verbose="false"/>
+               <mkdir dir="${buildDirectory}"/>
+       </target>
+       
+       <target name="-build" depends="-properties,-clean,-prepare.build.host">
+               <condition property="no.rcp.build" value="true">
+                       <not>
+                               <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>
+                       </not>
+               </condition>
+               <antcall target="-build.internal">
+                       <param name="buildfile" value="${regularbuildfile}"/>
+           </antcall>
+               <!-- build rcp omitting fetch -->
+               <property name="buildSystemProperty.skipFetch" value="true"/>
+               <antcall target="-build.rcp.internal"/>
+       </target>
+       
+       <target name="-build.rcp.internal" unless="no.rcp.build">
+               <property prefix="buildSystemProperty." file="${buildHome}/build-files/build_rcp.properties"/>
+               <antcall target="-checkProductProperty"/>
+               <antcall target="-build.internal"> 
+                       <param name="buildfile" value="${productbuildfile}"/>
+               </antcall>
+       </target>
+
+       <target name="-checkProductProperty">
+               <condition property="isProductSet">
+                       <and>
+                               <isset property="buildSystemProperty.product"/>
+                               <not><equals arg1="${product}" arg2=""/></not>
+                       </and>
+               </condition>
+               <fail message="Building an RCP application requires a Product Configuration file to be specified ('product' property)." unless="isProductSet"/>
+       </target>
+       
+       <target name="rcp" depends="-properties,-clean,-prepare.build.host" description="Build RCP only">
+               <fail message="Please enable and configure an RCP build in the Plug-in Builder Editor before calling this target." if="no.rcp.build"/>
+               <antcall target="-build.rcp.internal"/>
+       </target>
+
+       <target name="-build.internal">
+               <property name="buildResultsDirectory" value="${buildDirectory}/results" />
+               
+               <java classname="org.eclipse.equinox.launcher.Main" fork="true" 
+                       failonerror="true" errorproperty="build.stderr">
+                       <arg value="-ws" />
+                       <arg value="${ws}" />
+                       <arg value="-os" />
+                       <arg value="${os}" />
+                       <arg value="-application" />
+                       <arg value="org.eclipse.ant.core.antRunner" />
+                       <arg value="-buildfile" />
+                       <arg value="${buildfile}" />
+                       <arg value="${buildTarget}" />
+                       <arg value="-data" />
+                       <arg value="${buildDirectory}/workspace" />
+                       <arg value="${verboseAnt}"/>
+                       <jvmarg value="-Dbasews=${ws}" />
+                       <jvmarg value="-Dbaseos=${os}" />
+                       <jvmarg value="-Dbasearch=${arch}" />
+                       <jvmarg value="-Dbuilder=${buildHome}/build-files" />
+                       <jvmarg value="-DjavacFailOnError=true"/>
+                       <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
+                       <jvmarg value="-DbuildResultsDirectory=${buildResultsDirectory}"/>
+                       <jvmarg value="-DbaseLocation=${eclipseDir}"/>
+                       <jvmarg value="-DbuildHome=${buildHome}"/>
+                       <jvmarg value="-Dversion.full=${version.full}"/>
+                       <jvmarg value="-Dversion.qualifier=${version.qualifier}${buildTypePresentation}"/>
+                       <jvmarg value="-DbuildType=${buildType}"/>
+                       <jvmarg value="-DfetchTag=${fetchTag}"/>
+                       <jvmarg value="-DbuildProperties=${buildHome}/build-files/build.properties"/>
+
+                       <classpath>
+                               <pathelement location="${equinoxjar}" />
+                       </classpath>
+                       
+                       <syspropertyset>
+                               <propertyset>
+                                       <propertyref prefix="buildSystemProperty"/>
+                                       <mapper type="glob" from="buildSystemProperty.*" to="*"/>
+                               </propertyset>
+                       </syspropertyset>
+               </java>
+               
+               <!-- save stderr for scrutinizing later -->
+               <echo file="${buildDirectory}/stderr.txt">${build.stderr}</echo>
+               
+               <echo taskname="stderr">${build.stderr}</echo>
+               
+               <condition property="is.build.error" value="true">
+                       <contains string="${build.stderr}" substring="BUILD FAILED"/>
+               </condition>
+               <!-- Note that the fail task throws an exception which will be intercepted
+                    from calling antcalls. During that processing the status will 
+                    be lost and set to 1. Therefor ethe processing of TESTS FAILED which should 
+                    return an exit status of 2 can only take place in main targets. --> 
+               <fail message="PDE Build failed" if="is.build.error" status="1"/>
+
+       </target>
+       
+       <target name="main-cc"
+                       description="This target is suited to be run from cruisecontrol. The property 'label' is expected to be set from cruisecontrol.">
+               <!-- Note that pluginbuilder also provides an EclipseLabelIncrementer which creates Eclipse version labels.
+                       see http://www.pluginbuilder.org/faq.html -->
+               <property name="version.full" value="${label}"/> 
+               <SetRegex input="${label}" match=".+\..+\..+\.(.*)" property="version.qualifier" value="\1" />
+               <antcall target="-build"/>
+       </target>
+       
+       <target name="main" description="Run the main target of customTargets.xml. Return status 0,1,2 for Success, Build Failure and Test Failure">
+               <property name="buildTarget" value="main"/>
+               <antcall target="-build"/>
+
+               <!-- this must be done in a top level target because otherwise the 
+                    status would not get throuhg. If fail is called somewhere within
+                    an antcall the created exception will be caught which would result
+                    in a return status of 1 -->
+               <loadfile srcFile="${buildDirectory}/stderr.txt" property="build.stderr"/>
+               <condition property="is.tests.failed" value="true">
+                       <contains string="${build.stderr}" substring="TESTS FAILED"/>
+               </condition>
+               <fail message="Tests failed" if="is.tests.failed" status="2"/>          
+       </target>
+
+       <target name="fetch" description="Run the fetch target of customTargets.xml.">
+               <property name="buildTarget" value="fetch"/>
+               <antcall target="-build"/>
+       </target>       
+       
+       <target name="generate" description="Run the generate target of customTargets.xml.">
+               <property name="buildTarget" value="generate"/>
+               <antcall target="-build"/>
+       </target>
+       
+       <target name="process" description="Run the process target of customTargets.xml.">
+               <property name="buildTarget" value="process"/>
+               <antcall target="-build"/>
+       </target>
+                       
+       <target name="assemble" description="Run the assemble target of customTargets.xml.">
+               <property name="buildTarget" value="assemble"/>
+               <antcall target="-build"/>
+       </target>
+       
+       <target name="postBuild" description="Run the postBuild target of customTargets.xml.">
+               <property name="buildTarget" value="postBuild"/>
+               <antcall target="-build"/>
+               <!-- see main for a description why this must take place here. It is very ugly -->
+               <loadfile srcFile="${buildDirectory}/stderr.txt" property="build.stderr"/>
+               <condition property="is.tests.failed" value="true">
+                       <contains string="${build.stderr}" substring="TESTS FAILED"/>
+               </condition>
+               <fail message="Tests failed" if="is.tests.failed" status="2"/>
+       </target>
+       
+       <target name="buildProperties" description="Print out derived properties for the current build." depends="-properties">
+               <fail message="You have to set the property 'buildPropertiesFile' if calling buildProperties" unless="buildPropertiesFile"/>
+               <condition property="subdir" value="nightly" else="releases">
+                       <equals arg1="${buildType}" arg2="N"/>
+               </condition>
+               <echo file="${buildPropertiesFile}">relativeServerResultsDir: ${subdir}
+version.full: ${version.full}
+version.qualifier: ${version.qualifier}</echo>
+       </target>
+
+</project>
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build_local.properties b/org.apache.easyant4e.releng/build_local.properties
new file mode 100644 (file)
index 0000000..c165ebd
--- /dev/null
@@ -0,0 +1,26 @@
+# The location of this pluginbuilder project. It provides the base directory for the build scripts.
+# @category localsettings
+# @type Directory
+buildHome=/home/jerome/tools/easyant/easyant4e.git/org.apache.easyant4e.releng
+
+# The directory where the build takes place. This directory WILL BE DELETED before every build.
+# @category localsettings
+# @type Directory
+buildDirectory=/home/jerome/pluginbuilder/org.apache.easyant4e.releng
+
+# The eclipse build host. Must be an Eclipse SDK installation with JDT and PDE. And in the case of RCP builds the RCP Delta Pack must be included, too.
+# @category localsettings
+# @type Directory
+eclipseDir=/home/jerome/tools/easyant/eclipse
+
+# Environment for both the Eclipse build and test host. Determines baseos.
+# @category localsettings
+os=linux
+
+# Environment for both the Eclipse build and test host. Determines basews.
+# @category localsettings
+ws=gtk
+
+# Environment for both the Eclipse build and test host. Determines basearch.
+# @category localsettings
+arch=x86
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/build_shared.xml b/org.apache.easyant4e.releng/build_shared.xml
new file mode 100644 (file)
index 0000000..8d17365
--- /dev/null
@@ -0,0 +1,116 @@
+<project name="Shared build targets">
+       <!-- the following properties must be set from the calling script 
+    <property name="eclipse.installation.dir" value="${buildDirectory}"/>
+    <property name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
+    eclipse.download.cache,pluginbuilder.eclipse.url
+    optional:
+    <property name="pluginbuilder.additional.feature.urls" value="featureurl1,featureurl2"/>
+    -->
+    
+       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
+       
+       <target name="unpack.eclipse">
+               <condition property="unpack.eclipse">
+                       <not>
+                               <available type="dir" file="${eclipse.installation.dir}"/>
+                       </not>
+               </condition>
+               <antcall target="-unpack.eclipse.ifnecessary"/>
+       </target>    
+    
+       <!-- call either with or feature.url or pluginbuilder.eclipse.url
+                sets property archive.location to the archive path in download cache.
+        -->
+       <target name="-set.archive.location" if="pluginbuilder.is.server">
+               <!-- set default, useful for server where pluginbuilder.eclipse.url.default can be specified in build_local.properties --> 
+               <property name="pluginbuilder.eclipse.url" value="${pluginbuilder.eclipse.url.default}"/>
+               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                               <isset property="feature.url"/>
+               </condition>
+               <mkdir dir="${eclipse.download.cache}"/>
+               <tempfile destdir="${eclipse.download.cache}" property="tmp.file" suffix=".txt" prefix="downloadurl"/>          
+               <echo file="${tmp.file}" message="${archive.url}"/>
+               <checksum file="${tmp.file}" property="pluginbuilder.eclipse.url.checksum"/>
+               <delete file="${tmp.file}"/>
+               <property name="archive.location" value="${eclipse.download.cache}/${pluginbuilder.eclipse.url.checksum}"/>
+               <!-- <echo message="${archive.location} is archive location for ${archive.url}"/> -->
+       </target>
+       
+       <target name="-set.eclipse.local.tar.server" if="pluginbuilder.is.server" depends="-set.archive.location">
+               <property name="eclipse.local.tar" value="${archive.location}"/>
+       </target>
+       
+       <target name="-set.eclipse.local.tar.non.server" unless="pluginbuilder.is.server">
+               <property name="eclipse.local.tar" value="${eclipse.local.tar.non.server}"/>
+       </target>
+       
+       <target name="-get.archive.ifnecessary" unless="eclipse.is.downloaded">
+               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                               <isset property="feature.url"/>
+               </condition>
+               <get src="${archive.url}" dest="${archive.location}" />         
+       </target>
+       
+       <target name="-get.archive" depends="-set.archive.location" if="pluginbuilder.is.server">
+               <condition property="eclipse.is.downloaded">
+                       <available file="${archive.location}" property="${eclipse.is.downloaded}"/>
+               </condition>            
+               <antcall target="-get.archive.ifnecessary"/> 
+       </target>
+       
+       <target name="-get.features" if="pluginbuilder.is.server" >
+               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-get.archive" inheritall="true"/>
+       </target>
+       
+       <target name="-unpack.features" if="pluginbuilder.is.server">
+               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-unpack.feature" inheritall="true"/>
+       </target>
+       
+       <target name="-unpack.feature" depends="-set.archive.location">
+               <property name="tempunziplocation" value="${buildDirectory}/tmpunzip"/>
+               <delete dir="${tempunziplocation}" failonerror="false"/>
+               <mkdir dir="${tempunziplocation}"/>
+               <unzip src="${archive.location}" overwrite="true" dest="${tempunziplocation}"/>
+               <condition property="moveroot" value="${tempunziplocation}/eclipse" else="${tempunziplocation}">
+                               <available file="${tempunziplocation}/eclipse" type="dir"/>
+               </condition>
+               <move todir="${eclipse.installation.dir}" includeemptydirs="true">
+                       <fileset dir="${moveroot}" includes="**"/>
+               </move>
+       </target>
+                       
+       <target name="-unpack.eclipse.ifnecessary" if="unpack.eclipse">
+               <antcall target="-get.archive"/>
+               <condition property="is.windows">
+                 <os family="windows"/>
+               </condition>
+               <antcall target="-unpack.eclipse.windows"/>
+               <antcall target="-unpack.eclipse.linux"/>
+               <antcall target="-get.features"/>
+               <antcall target="-unpack.features"/>
+       </target>
+       
+       <target name="-unpack.eclipse.windows" if="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+               <unzip src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.."/>              
+       </target>
+       
+       <target name="-unpack.eclipse.linux" unless="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+               <untar src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.." compression="gzip"/>           
+       </target>
+       
+       <target name="test">
+               <property name="buildDirectory" value="C:/Temp/tst"/>
+               <mkdir dir="${buildDirectory}"/>
+               <property name="eclipse.download.cache" value="C:/Temp/downloadcache"/>
+               <property name="pluginbuilder.is.server" value="true"/>
+               <property name="pluginbuilder.eclipse.url" value="http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-PDE-3.2.2.zip"/>
+               
+               <property name="eclipse.installation.dir" value="C:/Temp/eclipse_root/eclipse"/>
+               <delete dir="${eclipse.installation.dir}" failonerror="false"/>
+               <property name="pluginbuilder.feature.urls" value="http://self.pluginbuilder.org/0.2.0/org.pluginbuilder.feature-0.2.0.20070218PRD.zip,http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-examples-3.2.2.zip"/>
+               <antcall target="unpack.eclipse"/>
+       </target>
+       
+</project>
\ No newline at end of file
diff --git a/org.apache.easyant4e.releng/maps/all.map b/org.apache.easyant4e.releng/maps/all.map
new file mode 100644 (file)
index 0000000..cbbebef
--- /dev/null
@@ -0,0 +1,6 @@
+feature@org.apache.easyant4e.feature=COPY,/home/jerome/tools/easyant/easyant4e.git,org.apache.easyant4e.feature
+plugin@org.apache.easyant=COPY,/home/jerome/tools/easyant/easyant4e.git,org.apache.easyant
+plugin@org.apache.easyant4e=COPY,/home/jerome/tools/easyant/easyant4e.git,org.apache.easyant4e
+feature@org.apache.ivyde.feature=COPY,/home/jerome/tools/easyant/ivyde.git,org.apache.ivyde.feature
+plugin@org.apache.ivyde.eclipse=COPY,/home/jerome/tools/easyant/ivyde.git,org.apache.ivyde.eclipse
+plugin@org.apache.ivy=COPY,/home/jerome/tools/easyant,ivy.git
diff --git a/org.apache.easyant4e.releng/pluginbuilder.config b/org.apache.easyant4e.releng/pluginbuilder.config
new file mode 100644 (file)
index 0000000..6803fd6
--- /dev/null
@@ -0,0 +1,10 @@
+#Mon Oct 19 21:52:24 GMT+01:00 2009
+autotestsuite.class.exclusions=.*All(Tests|PDE_Tests|_Tests|PDETests).*
+pluginbuilder.features=org.apache.easyant4e.feature
+pluginbuilder.is.svn=false
+autotestsuite.class.inclusions=.*
+pluginbuilder.is.runtests=false
+autotestsuite.plugin.inclusions=.*(test|tests)$
+pluginbuilder.is.cvs=false
+pluginbuilder.is.copy=true
+pluginbuilder.is.rcpbuild=false
diff --git a/org.apache.easyant4e.releng/releases/HEAD.properties b/org.apache.easyant4e.releng/releases/HEAD.properties
new file mode 100644 (file)
index 0000000..d21a3f3
--- /dev/null
@@ -0,0 +1,6 @@
+#Written from Plug-in Builder Editor
+#Sat Oct 17 22:41:09 GMT+01:00 2009
+buildType=N
+version=1.0.0
+fetchTag=HEAD
+buildTypePresentation=
diff --git a/org.apache.easyant4e.tests/.classpath b/org.apache.easyant4e.tests/.classpath
new file mode 100644 (file)
index 0000000..285106c
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="datas"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.apache.easyant4e.tests/.project b/org.apache.easyant4e.tests/.project
new file mode 100644 (file)
index 0000000..8b40ad6
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.apache.easyant4e.tests</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.apache.easyant4e.tests/.settings/org.eclipse.jdt.core.prefs b/org.apache.easyant4e.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..3210fba
--- /dev/null
@@ -0,0 +1,7 @@
+#Wed Jun 17 21:58:50 GMT+01:00 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.apache.easyant4e.tests/META-INF/MANIFEST.MF b/org.apache.easyant4e.tests/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..96add3d
--- /dev/null
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tests Plug-in
+Bundle-SymbolicName: org.apache.easyant4e.tests
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.apache.easyant4e.tests.TestPlugin
+Require-Bundle: org.apache.easyant4e,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.junit4,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.launching,
+ org.eclipse.ui.forms,
+ org.eclipse.jdt.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.pde.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.apache.easyant.core.report
diff --git a/org.apache.easyant4e.tests/build.properties b/org.apache.easyant4e.tests/build.properties
new file mode 100644 (file)
index 0000000..34d2e4d
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/org.apache.easyant4e.tests/datas/simplejavaproject/.classpath b/org.apache.easyant4e.tests/datas/simplejavaproject/.classpath
new file mode 100644 (file)
index 0000000..c6adc53
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry excluding="/simplejavaproject/target" kind="src" output="target" path="src/main/java"/>
+       <classpathentry excluding="/simplejavaproject/target" kind="src" output="target" path="src/main/resources"/>
+       <classpathentry excluding="/simplejavaproject/target" kind="src" output="target" path="src/test/java"/>
+       <classpathentry excluding="/simplejavaproject/target" kind="src" output="target" path="src/test/resources"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/module.ivy/*"/>
+       <classpathentry kind="output" path="target"/>
+</classpath>
diff --git a/org.apache.easyant4e.tests/datas/simplejavaproject/.project b/org.apache.easyant4e.tests/datas/simplejavaproject/.project
new file mode 100644 (file)
index 0000000..8df07c7
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>simplejavaproject</name>
+       <comment>simplejavaproject description</comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.apache.easyant4e.EasyAntBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.apache.easyant4e.EasyAntNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.apache.easyant4e.tests/datas/simplejavaproject/module.ivy b/org.apache.easyant4e.tests/datas/simplejavaproject/module.ivy
new file mode 100644 (file)
index 0000000..aeb4b6b
--- /dev/null
@@ -0,0 +1,26 @@
+<!--
+       Copyright 2008 the EasyAnt project
+       
+       See the NOTICE file distributed with this work for additional information 
+       regarding copyright ownership.
+       
+       Licensed under the Apache License, Version 2.0 (the "License");
+       you may not use this file except in compliance with the License.
+       You may obtain a copy of the License at
+       
+       http://www.apache.org/licenses/LICENSE-2.0
+       
+       Unless required by applicable law or agreed to in writing, software
+       distributed under the License is distributed on an "AS IS" BASIS,
+       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+       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="org.apache.easyant" module="simplejavaproject" status="integration" >
+               <ea:build type="org.apache.easyant.buildtypes#build-std-java;0.2">
+                       <ea:property name="run.main.classname" value="org.apache.easyant.example.Example"/>
+                       <ea:plugin module="org.apache.easyant.plugins#run-java;0.1" as="run"/>
+               </ea:build>
+       </info>
+</ivy-module>
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/AbstractEasyAntTest.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/AbstractEasyAntTest.java
new file mode 100644 (file)
index 0000000..35babc9
--- /dev/null
@@ -0,0 +1,94 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntPlugin;
+import org.apache.easyant4e.services.EasyantCoreService;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.ui.IPackagesViewPart;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public abstract class AbstractEasyAntTest {
+       protected IProject testProject;
+       protected IJavaProject testJavaProject;
+       
+       @Inject
+       EasyantCoreService coreService;
+       
+       @Inject
+       EasyantProjectService projectService;
+       
+       @Before
+       public void setUp() throws Exception {
+               EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin();
+               assertNotNull(easyAntPlugin);
+               easyAntPlugin.injectMembers(this);
+               assertNotNull(coreService);
+               assertNotNull(projectService);
+               
+               //System.out.println("setUp");
+               String testProjectName = "TestProject";
+               this.testProject = EclipseProjectBuilder.createProject(testProjectName);
+           assertNotNull(testProject);
+           IFile testModuleDesc = EclipseProjectBuilder.createModuleDescriptorFile(testProject, "org.apache.easyant");
+           assertNotNull(testModuleDesc);
+           assertTrue(testModuleDesc.exists());
+           
+           String testJavaProjectName = "TestJavaProject";
+           this.testJavaProject = EclipseProjectBuilder.createJavaProject(testJavaProjectName);
+           assertNotNull(testProject);
+           IFile testJavaModuleDesc = EclipseProjectBuilder.createModuleDescriptorFile(testJavaProject.getProject(), "org.apache.easyant");
+           assertNotNull(testJavaModuleDesc);
+           assertTrue(testJavaModuleDesc.exists());       
+       }
+       
+       @After
+       public void tearDown() throws CoreException {
+               if(this.testProject!=null){
+                       EclipseProjectBuilder.deleteProject(testProject);
+                       this.testProject = null;
+               }
+               if(this.testJavaProject!=null){
+                       EclipseProjectBuilder.deleteProject(testJavaProject.getProject());
+                       this.testJavaProject = null;                    
+               }
+       }
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyAntAllTests.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyAntAllTests.java
new file mode 100644 (file)
index 0000000..58d8274
--- /dev/null
@@ -0,0 +1,39 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+@RunWith(Suite.class)
+@SuiteClasses(value = { 
+               ImportProjectTest.class,
+               StartupTest.class, 
+               EasyantCoreServiceTest.class,
+               EasyantProjectServiceTest.class 
+               
+})
+public class EasyAntAllTests {
+
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantCoreServiceTest.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantCoreServiceTest.java
new file mode 100644 (file)
index 0000000..97a5a01
--- /dev/null
@@ -0,0 +1,82 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.services.EasyantCoreService;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyantCoreServiceTest extends AbstractEasyAntTest {
+
+/*
+       @Test
+       public void testGetIvyInstance() {
+               Ivy ivy = coreService.getIvyInstance(testProject);
+               assertNotNull(ivy);
+       }
+*/
+
+       @Test
+       public void testGetPluginsRepositoryPath() {
+               String pluginsRepositoryPath = coreService.getPluginsRepositoryPath();
+               assertNotNull(pluginsRepositoryPath);
+               String pluginPath = System.getProperty("user.home") + "/.easyant/repository";
+               assertEquals(pluginPath, pluginsRepositoryPath);
+       }
+
+       @Test
+       public void testInstallPluginsRepository() {
+               String pluginsRepositoryPath = coreService.getPluginsRepositoryPath();
+               File pluginsRepositoryDir = new File(pluginsRepositoryPath);
+               assertTrue(deleteDirectory(pluginsRepositoryDir));
+               assertFalse(pluginsRepositoryDir.exists());
+               coreService.installPluginsRepository();
+               assertTrue(pluginsRepositoryDir.exists());
+       }
+
+       private boolean deleteDirectory(File path) {
+               boolean resultat = true;
+
+               if (path.exists()) {
+                       File[] files = path.listFiles();
+                       for (int i = 0; i < files.length; i++) {
+                               if (files[i].isDirectory()) {
+                                       resultat &= deleteDirectory(files[i]);
+                               } else {
+                                       resultat &= files[i].delete();
+                               }
+                       }
+               }
+               resultat &= path.delete();
+               return (resultat);
+       }
+
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantProjectServiceTest.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantProjectServiceTest.java
new file mode 100644 (file)
index 0000000..d0028b9
--- /dev/null
@@ -0,0 +1,121 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+
+import org.apache.easyant.core.report.PhaseReport;
+import org.apache.easyant.core.report.TargetReport;
+import org.apache.easyant4e.EasyAntConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.junit.Test;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyantProjectServiceTest extends AbstractEasyAntTest {
+
+/*
+       @Test
+       public void testGetIvyInstance() {
+               Ivy ivy = projectService.getIvyInstance(testProject);
+               assertNotNull(ivy);
+       }
+*/
+       
+       // @Test
+       // public void testAddNature(){
+       // assertFalse(projectService.hasEasyAntNature(testProject));
+       // projectService.addNature(testProject);
+       // assertTrue(projectService.hasEasyAntNature(testProject));
+       // assertFalse(projectService.hasEasyAntBuilder(testProject));
+       // }
+       //      
+       // @Test
+       // public void testRemoveNature(){
+       // assertFalse(projectService.hasEasyAntNature(testProject));
+       // projectService.addNature(testProject);
+       // assertTrue(projectService.hasEasyAntNature(testProject));
+       // assertFalse(projectService.hasEasyAntBuilder(testProject));
+       // projectService.removeNature(testProject);
+       // assertFalse(projectService.hasEasyAntNature(testProject));
+       // assertFalse(projectService.hasEasyAntBuilder(testProject));
+       // }
+
+       @Test
+       public void testAddNatureOnJavaProject() {
+               IProject javaProject = testJavaProject.getProject();
+               assertFalse(projectService.hasEasyAntNature(javaProject));
+               assertFalse(projectService.hasEasyAntBuilder(javaProject));
+               projectService.addNature(javaProject);
+               assertTrue(projectService.hasEasyAntNature(javaProject));
+               assertTrue(projectService.hasEasyAntBuilder(javaProject));
+               // TODO check classpath and source folder
+       }
+
+       @Test
+       public void testRemoveNatureOnJavaProject() {
+               IProject javaProject = testJavaProject.getProject();
+               assertFalse(projectService.hasEasyAntNature(javaProject));
+               projectService.addNature(javaProject);
+               assertTrue(projectService.hasEasyAntNature(javaProject));
+               assertTrue(projectService.hasEasyAntBuilder(javaProject));
+               projectService.removeNature(javaProject);
+               assertFalse(projectService.hasEasyAntNature(javaProject));
+               assertFalse(projectService.hasEasyAntBuilder(javaProject));
+               // TODO check classpath and source folder
+       }
+
+       @Test
+       public void testGetPhases() {
+               IProject javaProject = testJavaProject.getProject();
+               IFile ivyFile = javaProject.getFile("module.ivy");
+               assertNotNull(ivyFile);
+               List<PhaseReport> phases = projectService.getPhases(ivyFile);
+               assertNotNull(phases);          
+               assertTrue("nb phases:" + phases.size(), phases.size() > 0);
+       }
+
+       @Test
+       public void testGetTargets() {
+               IProject javaProject = testJavaProject.getProject();
+               IFile ivyFile = javaProject.getFile("module.ivy");
+               assertNotNull(ivyFile);
+               List<TargetReport> targets = projectService.getTargets(ivyFile);
+               assertNotNull(targets);         
+               assertTrue("nb targets:" + targets.size(), targets.size() > 0);
+       }
+
+       @Test
+       public void testRunBuild() {
+               try {
+                       projectService.runBuild(testJavaProject.getProject(), "compile", EasyAntConstants.ANT_LOGLEVEL_DEBUG, null);
+               } catch (Exception e) {
+                       fail(e.getMessage());
+               }
+       }
+
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EclipseProjectBuilder.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EclipseProjectBuilder.java
new file mode 100644 (file)
index 0000000..c1e3a76
--- /dev/null
@@ -0,0 +1,249 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.launching.JavaRuntime;
+
+/**
+ * This is a modified version of the TestProject class written by Erich Gamma
+ * and Kent Beck and described in their book
+ * "Contributing to Eclipse: Principles, Patterns, and Plug-Ins" It's largely
+ * inspired by Spring IDE TestSuite
+ */
+public class EclipseProjectBuilder {
+
+       // private IProject project;
+       // private IJavaProject javaProject;
+       // private IPackageFragmentRoot sourceFolder;
+
+       public EclipseProjectBuilder() throws CoreException {
+               // IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+               // project = root.getProject("TestProject");
+               // project.create(null);
+               // project.open(null);
+               // javaProject = JavaCore.create(project);
+               //
+               // IFolder binFolder = createBinFolder();
+               //
+               // setJavaNature();
+               // javaProject.setRawClasspath(new IClasspathEntry[0], null);
+               //
+               // createOutputFolder(binFolder);
+               // addSystemLibraries();
+       }
+
+       public static IProject createProject(String name) throws CoreException {
+               IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+               IProject project = root.getProject(name);
+               project.create(null);
+               project.open(null);
+               return project;
+       }
+
+       public static IJavaProject createJavaProject(String name) throws CoreException {
+               IProject project = createProject(name);
+               IJavaProject javaProject = JavaCore.create(project);
+               addJavaNature(project);
+               javaProject.setRawClasspath(new IClasspathEntry[0], null);
+               createOutputFolder(javaProject);
+               addSystemLibraries(javaProject);
+               return javaProject;
+       }
+
+       private static void addJavaNature(IProject project) throws CoreException {
+               IProjectDescription description = project.getDescription();
+               description.setNatureIds(new String[] { JavaCore.NATURE_ID });
+               project.setDescription(description, null);
+       }
+
+       private static void createOutputFolder(IJavaProject javaProject) throws CoreException {
+               IFolder binFolder = createBinFolder(javaProject.getProject());
+               IPath outputLocation = binFolder.getFullPath();
+               javaProject.setOutputLocation(outputLocation, null);
+       }
+
+       private static IFolder createBinFolder(IProject project) throws CoreException {
+               IFolder binFolder = project.getFolder("bin");
+               binFolder.create(false, true, null);
+               return binFolder;
+       }
+
+       private static void addSystemLibraries(IJavaProject javaProject) throws JavaModelException {
+               IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
+               IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
+               System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
+               newEntries[oldEntries.length] = JavaRuntime.getDefaultJREContainerEntry();
+               javaProject.setRawClasspath(newEntries, null);
+       }
+
+       public static IFile createModuleDescriptorFile(IProject project, String org) throws CoreException {
+               IFile moduleDescFile = project.getFile("module.ivy");
+               String content = "" 
+                               + "<ivy-module version=\"2.0\" xmlns:ea=\"http://www.easyant.org\">"
+                               + "  <info organisation=\"" + org + "\" module=\"" + project.getName() + "\" status=\"integration\" >"
+                               + "    <description>project description</description>" 
+                               + "    <ea:build type=\"org.apache.easyant.buildtypes#build-std-java;0.2\" />"
+                               + "  </info>" 
+                               + "</ivy-module>";
+               InputStream in = new ByteArrayInputStream(content.getBytes());
+               moduleDescFile.create(in, true, null);
+               return moduleDescFile;
+       }
+
+       public static void deleteProject(IProject project) throws CoreException {
+               // waitForIndexer();
+               deleteProject(project, true);
+       }
+       
+       public static void deleteProject(IProject project, boolean deleteContent) throws CoreException {
+               // waitForIndexer();
+               project.delete(deleteContent, true, new NullProgressMonitor());
+       }
+
+       // public IJavaProject getJavaProject() {
+       // return javaProject;
+       // }
+
+       // public void addJar(String plugin, String jar) throws
+       // MalformedURLException,
+       // IOException, JavaModelException {
+       // Path result = findFileInPlugin(plugin, jar);
+       // IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
+       // IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length +
+       // 1];
+       // System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
+       // newEntries[oldEntries.length] = JavaCore.newLibraryEntry(result, null,
+       // null);
+       // javaProject.setRawClasspath(newEntries, null);
+       // }
+       //
+       // public IPackageFragment createPackage(String name) throws CoreException {
+       // if (sourceFolder == null)
+       // sourceFolder = createSourceFolder();
+       // return sourceFolder.createPackageFragment(name, false, null);
+       // }
+       //
+       // public IType createType(IPackageFragment pack, String cuName, String
+       // source)
+       // throws JavaModelException {
+       // StringBuffer buf = new StringBuffer();
+       // buf.append("package " + pack.getElementName() + ";\n");
+       // buf.append("\n");
+       // buf.append(source);
+       // ICompilationUnit cu = pack.createCompilationUnit(cuName,
+       // buf.toString(), false, null);
+       // return cu.getTypes()[0];
+       // }
+       //
+       // /**
+       // * Wait for autobuild notification to occur, that is
+       // * for the autbuild to finish.
+       // */
+       // public void waitForAutoBuild() {
+       // boolean wasInterrupted = false;
+       // do {
+       // try {
+       // Platform.getJobManager().join(
+       // ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+       // wasInterrupted = false;
+       // } catch (OperationCanceledException e) {
+       // throw (e);
+       // } catch (InterruptedException e) {
+       // wasInterrupted = true;
+       // }
+       // } while (wasInterrupted);
+       // }
+       //
+       // public void dispose() throws CoreException {
+       // waitForIndexer();
+       // project.delete(true, true, null);
+       // }
+       //
+
+       //
+       // public IFolder createXmlFolder() throws CoreException {
+       // IFolder xmlFolder = project.getFolder("xml");
+       // if (!xmlFolder.exists()) {
+       // xmlFolder.create(false, true, null);
+       // }
+       // return xmlFolder;
+       // }
+       //
+
+       //
+       // private IPackageFragmentRoot createSourceFolder() throws CoreException {
+       // IFolder folder = project.getFolder("src");
+       // folder.create(false, true, null);
+       // IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(folder);
+       //
+       // IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
+       // IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length +
+       // 1];
+       // System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
+       // newEntries[oldEntries.length] = JavaCore.newSourceEntry(root.getPath());
+       // javaProject.setRawClasspath(newEntries, null);
+       // return root;
+       // }
+       //
+
+       // private Path findFileInPlugin(String plugin, String file)
+       // throws MalformedURLException, IOException {
+       // IPluginRegistry registry = Platform.getPluginRegistry();
+       // IPluginDescriptor descriptor = registry.getPluginDescriptor(plugin);
+       // URL pluginURL = descriptor.getInstallURL();
+       // URL jarURL = new URL(pluginURL, file);
+       // URL localJarURL = Platform.asLocalURL(jarURL);
+       // return new Path(localJarURL.getPath());
+       // }
+       //
+       // private void waitForIndexer() throws JavaModelException {
+       // new SearchEngine().searchAllTypeNames(ResourcesPlugin.getWorkspace(),
+       // null, null, IJavaSearchConstants.EXACT_MATCH,
+       // IJavaSearchConstants.CASE_SENSITIVE,
+       // IJavaSearchConstants.CLASS, SearchEngine
+       // .createJavaSearchScope(new IJavaElement[0]),
+       // new ITypeNameRequestor() {
+       // public void acceptClass(char[] packageName,
+       // char[] simpleTypeName, char[][] enclosingTypeNames,
+       // String path) {
+       // }
+       //
+       // public void acceptInterface(char[] packageName,
+       // char[] simpleTypeName, char[][] enclosingTypeNames,
+       // String path) {
+       // }
+       // }, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
+       // }
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ExtensionRegistryTest.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ExtensionRegistryTest.java
new file mode 100644 (file)
index 0000000..d2c44ae
--- /dev/null
@@ -0,0 +1,85 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.core.runtime.spi.IDynamicExtensionRegistry;
+import org.junit.Test;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class ExtensionRegistryTest {
+
+       @Test
+       public void testRemoveExtension() {
+               IExtensionRegistry reg = RegistryFactory.getRegistry();         
+               
+               //assertNull(reg.getExtension("org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
+               //assertNull(reg.getExtension("org.eclipse.ui.popupMenus","org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
+               //assertNull(reg.getExtension("org.eclipse.ui","popupMenus","org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
+
+               IDynamicExtensionRegistry reg2 = (IDynamicExtensionRegistry)reg;
+               for(IContributor contributor : reg2.getAllContributors()){                      
+                       if("org.apache.ivyde.eclipse".equals(contributor.getName())){
+                               System.out.println("--> contributor "+contributor);
+                               reg2.removeContributor(contributor, ((ExtensionRegistry) reg2).getTemporaryUserToken());
+                               System.out.println("--> remove all extensions ");
+                       }
+               }               
+               
+//             IExtension[] extensions = reg.getExtensions("org.apache.ivyde.eclipse");
+//             assertNotNull(extensions);
+//             for(IExtension extension:extensions){
+//                     if("org.eclipse.ui.popupMenus".equals(extension.getExtensionPointUniqueIdentifier())){
+//                             reg.removeExtension(extension, ((ExtensionRegistry) reg).getTemporaryUserToken());
+//                     }
+//                     System.out.println(extension.getNamespaceIdentifier() +" - "+extension.getExtensionPointUniqueIdentifier());                    
+//                     final IConfigurationElement[] configElements = extension.getConfigurationElements();
+//             for (IConfigurationElement element:configElements) {
+//                     System.out.println("\t--> "+element.getName()+" : "+element.getAttribute("id"));                                
+//             }                       
+//             }
+               
+       
+       }
+
+//     private void removeExtension(String extensionPointId, String extensionId) {
+//             IExtensionRegistry reg = RegistryFactory.getRegistry();
+//             IExtension extension = reg.getExtension(extensionPointId, extensionId);
+//             if (extension != null) {
+//                     reg.removeExtension(extension, getUserToken());
+//             }
+//     }
+//
+//     private Object getUserToken() {
+//             IExtensionRegistry registry = RegistryFactory.getRegistry();
+//             // return null; // require -Declipse.registry.nulltoken=true
+//             return ((ExtensionRegistry) registry).getTemporaryUserToken();
+//     }
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ImportProjectTest.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ImportProjectTest.java
new file mode 100644 (file)
index 0000000..3c78a2d
--- /dev/null
@@ -0,0 +1,165 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntPlugin;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class ImportProjectTest{
+       @Inject
+       EasyantProjectService projectService;
+       
+       @Before
+       public void setUp() throws Exception {
+               EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin();
+               assertNotNull(easyAntPlugin);
+               easyAntPlugin.injectMembers(this);
+               assertNotNull(projectService);
+       }       
+       
+       IProject simpleJavaProject;
+       @Test
+       public void testImportSimpleProject() throws Exception {
+               final String projectName = "simplejavaproject";
+               IProjectDescription description = Activator.getEasyAntPlugin().getPluginWorkspace().newProjectDescription(projectName);
+               assertNotNull(description);
+               URL url = getClass().getResource("/datas/"+projectName);
+               assertNotNull(url);
+               String filePath = url.getFile();
+               assertNotNull(filePath);
+               //String testWorkspacePath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
+               
+               IPath projectLocation = getSimpleJavaProjectLocation(filePath);
+               assertNotNull(projectLocation);
+               description.setLocation(projectLocation);
+               final String comment = projectName+ " description";
+               description.setComment(comment);
+               String[] newNatures= {};
+               description.setNatureIds(newNatures);   
+       
+               Thread.sleep(2000);
+               Shell messageShell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
+               assertNotNull(messageShell);
+               simpleJavaProject = projectService.importProject(description, messageShell, new NullProgressMonitor());
+               assertNotNull(simpleJavaProject);
+               assertTrue(simpleJavaProject.exists());
+               assertTrue(simpleJavaProject.isOpen());
+               assertEquals(projectName, simpleJavaProject.getName());
+               try {
+                       assertEquals(comment, simpleJavaProject.getDescription().getComment());
+               } catch (CoreException e) {
+                       fail(e.getMessage());
+               }
+               assertTrue(projectService.hasEasyAntNature(simpleJavaProject));
+               
+               //Assert source folders
+               assertTrue(simpleJavaProject.hasNature(JavaCore.NATURE_ID));    
+               IJavaProject javaProject = (IJavaProject)simpleJavaProject.getNature(JavaCore.NATURE_ID);
+               assertNotNull(javaProject);
+               List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
+               entries.addAll(Arrays.asList(javaProject.getRawClasspath()));
+               assertTrue(entries.size()>0);
+               boolean srcMainJavaSourceFolderFound=false;
+               boolean srcTestJavaSourceFolderFound=false;
+               boolean srcMainResourcesSourceFolderFound=false;
+               boolean srcTestResourcesSourceFolderFound=false;
+               for(IClasspathEntry entry:entries){
+                       if(IClasspathEntry.CPE_SOURCE==entry.getEntryKind()){
+                               String path = entry.getPath().toOSString();
+                               assertNotNull(path);
+                               if("/simplejavaproject/src/main/java".equals(path)){
+                                       srcMainJavaSourceFolderFound=true;
+                               }else if("/simplejavaproject/src/test/java".equals(path)){
+                                       srcTestJavaSourceFolderFound=true;
+                               }else if("/simplejavaproject/src/main/resources".equals(path)){
+                                       srcMainResourcesSourceFolderFound=true;
+                               }else if("/simplejavaproject/src/test/resources".equals(path)){
+                                       srcTestResourcesSourceFolderFound=true;
+                               }
+                       }
+               }
+               assertTrue(srcMainJavaSourceFolderFound);
+               assertTrue(srcTestJavaSourceFolderFound);
+               assertTrue(srcMainResourcesSourceFolderFound);
+               assertTrue(srcTestResourcesSourceFolderFound);
+               
+               //TODO assert classpath
+               //org.eclipse.jdt.launching.JRE_CONTAINER
+               //org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/module.ivy/*
+       }
+       
+       private IPath getSimpleJavaProjectLocation(String projectPath){
+               IPluginModelBase model = PluginRegistry.findModel(TestPlugin.PLUGIN_ID);
+               assertNotNull(model);
+               IPath projectLocation=null;
+               if (model != null && model.getInstallLocation() != null) {
+                       File modelNode = new File(model.getInstallLocation());
+                       String pluginPath = modelNode.getAbsolutePath();
+                       projectLocation = new Path(pluginPath + "/" + projectPath);
+               }
+               return projectLocation;
+       }
+
+       @After
+       public void tearDown() throws CoreException {
+               if(simpleJavaProject!=null){
+                       EclipseProjectBuilder.deleteProject(simpleJavaProject,false);
+               }
+       }
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/StartupTest.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/StartupTest.java
new file mode 100644 (file)
index 0000000..e9e84bb
--- /dev/null
@@ -0,0 +1,82 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntPlugin;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.navigator.ResourceNavigator;
+import org.junit.Test;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class StartupTest extends AbstractEasyAntTest{
+       
+       @Test
+       public void testActivatorStartup() {
+               EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin(); 
+               assertNotNull(easyAntPlugin);
+       }
+
+       @Test
+       public void testEasyAntCoreServiceInit() {
+               assertNotNull(coreService);                     
+       }
+       
+       @Test
+       public void testEasyAntProjectServiceInit() {
+               assertNotNull(projectService);                                  
+       }
+               
+       @Test
+       public void testGetCurrentProject() {           
+               ResourceNavigator resourceNavigator = getResourceNavigator();
+               assertNotNull(resourceNavigator);
+               
+               resourceNavigator.selectReveal(new StructuredSelection(testProject));
+               IProject project1 = Activator.getEasyAntPlugin().getCurrentProject();
+               assertNotNull(project1);
+               assertEquals(testProject, project1);
+               
+               resourceNavigator.selectReveal(new StructuredSelection(testJavaProject));
+               IProject project2 = Activator.getEasyAntPlugin().getCurrentProject();
+               assertNotNull(project2);
+               assertEquals(testJavaProject.getProject(), project2);
+       }
+       
+       private ResourceNavigator getResourceNavigator(){
+               ResourceNavigator navigator = null;
+               try {
+                       navigator = (ResourceNavigator) PlatformUI.getWorkbench()
+                               .getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.ResourceNavigator");
+               } catch (PartInitException e) {
+                       throw new RuntimeException(e);
+               }       
+               return navigator;
+       }
+       
+}
diff --git a/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/TestPlugin.java b/org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/TestPlugin.java
new file mode 100644 (file)
index 0000000..762452f
--- /dev/null
@@ -0,0 +1,50 @@
+package org.apache.easyant4e.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class TestPlugin extends AbstractUIPlugin {
+
+       // The plug-in ID
+       public static final String PLUGIN_ID = "org.apache.easyant4e.tests";
+
+       // The shared instance
+       private static TestPlugin plugin;
+       
+       /**
+        * The constructor
+        */
+       public TestPlugin() {
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       /**
+        * Returns the shared instance
+        *
+        * @return the shared instance
+        */
+       public static TestPlugin getDefault() {
+               return plugin;
+       }
+
+}
diff --git a/org.apache.easyant4e/.checkstyle b/org.apache.easyant4e/.checkstyle
new file mode 100644 (file)
index 0000000..2984dfe
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fileset-config file-format-version="1.2.0" simple-config="true">
+    <local-check-config name="EasyAnt4E" location="/quality/checkstyle/checkstyle-config" type="project" description="">
+        <property name="checkstyle.src.dir" value="${basedir}/../quality/checkstyle"/>
+        <additional-data name="protect-config-file" value="false"/>
+    </local-check-config>
+    <fileset name="tous" enabled="true" check-config-name="EasyAnt4E" local="true">
+        <file-match-pattern match-pattern="." include-pattern="true"/>
+    </fileset>
+</fileset-config>
diff --git a/org.apache.easyant4e/.classpath b/org.apache.easyant4e/.classpath
new file mode 100644 (file)
index 0000000..edcdd29
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry exported="true" kind="lib" path="lib/guice/guice-2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/guice/aopalliance.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.apache.easyant4e/.fbprefs b/org.apache.easyant4e/.fbprefs
new file mode 100644 (file)
index 0000000..621c424
--- /dev/null
@@ -0,0 +1,124 @@
+#FindBugs User Preferences
+#Sun Apr 19 13:12:13 GMT+01:00 2009
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|true
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorFormatStringChecker=FormatStringChecker|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInconsistentAnnotations=InconsistentAnnotations|true
+detectorInefficientMemberAccess=InefficientMemberAccess|false
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|false
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorRepeatedConditionals=RepeatedConditionals|true
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|true
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|true
+detectorUseObjectEquals=UseObjectEquals|false
+detectorUselessSubclassMethod=UselessSubclassMethod|false
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=2
+effort=default
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false
+filter_settings_neg=I18N,NOISE,MALICIOUS_CODE,SECURITY,EXPERIMENTAL|
+run_at_full_build=true
diff --git a/org.apache.easyant4e/.pmd b/org.apache.easyant4e/.pmd
new file mode 100644 (file)
index 0000000..726c68f
--- /dev/null
@@ -0,0 +1,941 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>.ruleset</ruleSetFile>
+    <rules>
+        <rule>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfElseStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>WhileLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CyclomaticComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NPathComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFinalLocalVariable</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingVolatile</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DataflowAnomalyAnalysis</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OnlyOneReturn</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooFewBranchesForASwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalHomeNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalInterfaceSessionNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MDBAndSessionBeanNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BeanMembersShouldSerialize</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstantiatingObjectsInLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+    </rules>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>
diff --git a/org.apache.easyant4e/.project b/org.apache.easyant4e/.project
new file mode 100644 (file)
index 0000000..2cc8f8f
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.apache.easyant4e</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+               <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.apache.easyant4e/.settings/org.eclipse.jdt.core.prefs b/org.apache.easyant4e/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..85e2ac9
--- /dev/null
@@ -0,0 +1,7 @@
+#Fri Apr 10 17:04:56 GMT+01:00 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.apache.easyant4e/META-INF/MANIFEST.MF b/org.apache.easyant4e/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..dd53b36
--- /dev/null
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.apache.easyant4e;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .,
+ lib/guice/aopalliance.jar,
+ lib/guice/guice-2.0.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: 
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.ui,
+ org.eclipse.jdt.ui,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.console,
+ org.eclipse.ui.ide,
+ org.eclipse.jface.text,
+ org.eclipse.jdt.launching,
+ org.apache.easyant,
+ org.apache.ivyde.eclipse
+Bundle-Activator: org.apache.easyant4e.Activator
+Bundle-ActivationPolicy: lazy
+Export-Package: com.google.inject,
+ org.apache.easyant4e,
+ org.apache.easyant4e.ant.editor,
+ org.apache.easyant4e.builders,
+ org.apache.easyant4e.configurers,
+ org.apache.easyant4e.console,
+ org.apache.easyant4e.ivyde.extension,
+ org.apache.easyant4e.ivyde.extension.model,
+ org.apache.easyant4e.ivyde.extension.page,
+ org.apache.easyant4e.modules,
+ org.apache.easyant4e.natures,
+ org.apache.easyant4e.providers,
+ org.apache.easyant4e.services,
+ org.apache.easyant4e.wizards
diff --git a/org.apache.easyant4e/TODO.txt b/org.apache.easyant4e/TODO.txt
new file mode 100644 (file)
index 0000000..0d75e07
--- /dev/null
@@ -0,0 +1,14 @@
+* support different kind of project (java, scala)
+* update ivyDE setting when project.ivysettings.file change, when a user edit the module.ivy file
+* use checksum or version number to reinstall the local repository
+ou juste checker par rapport au qualifier
+* add internal package
+* Add Preference to manager EasyAnt core preferences (i.e: ivysettings configuration)
+* Add cool icons everywhere
+* create a new project from EasyAnt skeleton
+* Add I18N
+* Add launch config to run EaysAnt build
+===============================================================
+* bug en mode buildé : affichage en vert dans la console du message "BUILD FAILED"
+* lorsque l'on crée les source folder, tester l'existance des répertoires : ouvrir une popup pour demander à l'utilisateur ... checker cela notamment pour le multimodule
+
diff --git a/org.apache.easyant4e/build.properties b/org.apache.easyant4e/build.properties
new file mode 100644 (file)
index 0000000..7151f70
--- /dev/null
@@ -0,0 +1,16 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+bin.includes = .,\
+               META-INF/,\
+               plugin.xml,\
+               plugin.properties,\
+               icons/,\
+               lib/guice/aopalliance.jar,\
+               lib/guice/guice-2.0.jar
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/org.apache.easyant4e/icons/EasyAnt-logo.gif b/org.apache.easyant4e/icons/EasyAnt-logo.gif
new file mode 100644 (file)
index 0000000..ea18794
Binary files /dev/null and b/org.apache.easyant4e/icons/EasyAnt-logo.gif differ
diff --git a/org.apache.easyant4e/icons/EasyAntNature.gif b/org.apache.easyant4e/icons/EasyAntNature.gif
new file mode 100755 (executable)
index 0000000..6df3469
Binary files /dev/null and b/org.apache.easyant4e/icons/EasyAntNature.gif differ
diff --git a/org.apache.easyant4e/icons/build.gif b/org.apache.easyant4e/icons/build.gif
new file mode 100644 (file)
index 0000000..762fff4
Binary files /dev/null and b/org.apache.easyant4e/icons/build.gif differ
diff --git a/org.apache.easyant4e/icons/console.gif b/org.apache.easyant4e/icons/console.gif
new file mode 100644 (file)
index 0000000..a598f60
Binary files /dev/null and b/org.apache.easyant4e/icons/console.gif differ
diff --git a/org.apache.easyant4e/icons/console.png b/org.apache.easyant4e/icons/console.png
new file mode 100644 (file)
index 0000000..e767bc6
Binary files /dev/null and b/org.apache.easyant4e/icons/console.png differ
diff --git a/org.apache.easyant4e/icons/debug_loglevel.gif b/org.apache.easyant4e/icons/debug_loglevel.gif
new file mode 100644 (file)
index 0000000..ac5431f
Binary files /dev/null and b/org.apache.easyant4e/icons/debug_loglevel.gif differ
diff --git a/org.apache.easyant4e/icons/default_incremental.gif b/org.apache.easyant4e/icons/default_incremental.gif
new file mode 100644 (file)
index 0000000..fbcf2f8
Binary files /dev/null and b/org.apache.easyant4e/icons/default_incremental.gif differ
diff --git a/org.apache.easyant4e/icons/form_banner.gif b/org.apache.easyant4e/icons/form_banner.gif
new file mode 100644 (file)
index 0000000..aebc0b2
Binary files /dev/null and b/org.apache.easyant4e/icons/form_banner.gif differ
diff --git a/org.apache.easyant4e/icons/full/obj16/ant_buildfile.gif b/org.apache.easyant4e/icons/full/obj16/ant_buildfile.gif
new file mode 100755 (executable)
index 0000000..6df3469
Binary files /dev/null and b/org.apache.easyant4e/icons/full/obj16/ant_buildfile.gif differ
diff --git a/org.apache.easyant4e/icons/phase.gif b/org.apache.easyant4e/icons/phase.gif
new file mode 100644 (file)
index 0000000..84f4af5
Binary files /dev/null and b/org.apache.easyant4e/icons/phase.gif differ
diff --git a/org.apache.easyant4e/icons/sa_onesample48.gif b/org.apache.easyant4e/icons/sa_onesample48.gif
new file mode 100644 (file)
index 0000000..e65c123
Binary files /dev/null and b/org.apache.easyant4e/icons/sa_onesample48.gif differ
diff --git a/org.apache.easyant4e/icons/target.gif b/org.apache.easyant4e/icons/target.gif
new file mode 100644 (file)
index 0000000..146a903
Binary files /dev/null and b/org.apache.easyant4e/icons/target.gif differ
diff --git a/org.apache.easyant4e/lib/guice/aopalliance.jar b/org.apache.easyant4e/lib/guice/aopalliance.jar
new file mode 100644 (file)
index 0000000..578b1a0
Binary files /dev/null and b/org.apache.easyant4e/lib/guice/aopalliance.jar differ
diff --git a/org.apache.easyant4e/lib/guice/guice-2.0.jar b/org.apache.easyant4e/lib/guice/guice-2.0.jar
new file mode 100644 (file)
index 0000000..204c4c2
Binary files /dev/null and b/org.apache.easyant4e/lib/guice/guice-2.0.jar differ
diff --git a/org.apache.easyant4e/plugin.properties b/org.apache.easyant4e/plugin.properties
new file mode 100644 (file)
index 0000000..71bcc6a
--- /dev/null
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Easyant for Eclipse
+providerName = www.easyant.org
diff --git a/org.apache.easyant4e/plugin.xml b/org.apache.easyant4e/plugin.xml
new file mode 100644 (file)
index 0000000..3325c66
--- /dev/null
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+       <extension 
+               point="org.eclipse.core.resources.natures" id="EasyAntNature" name="EasyAntNature">
+               <runtime>
+               <run class="org.apache.easyant4e.natures.EasyAntNature" /> 
+       </runtime>
+       </extension>
+   
+   <extension point="org.eclipse.core.resources.builders" id="EasyAntBuilder" name="EasyAntBuilder">
+      <builder>
+         <run class="org.apache.easyant4e.builders.EasyAntBuilder" /> 
+      </builder>
+   </extension>
+   
+   <extension point="org.eclipse.ui.ide.projectNatureImages">
+      <image 
+         id="org.apache.easyant4e.natures.EasyAntNatureImage"
+         natureId="org.apache.easyant4e.EasyAntNature"
+         icon="icons/EasyAntNature.gif">
+      </image>
+   </extension>
+
+   <extension point="org.eclipse.ui.popupMenus">
+      <objectContribution
+            adaptable="true"
+            objectClass="org.eclipse.core.resources.IProject"
+            nameFilter="*"
+            id="org.apache.easyant4e.ui.popupMenus.contribution.IProject">
+         <menu id="org.apache.easyant4e.ui.menu" label="EasyAnt" path="additionsEasyAnt">
+               <groupMarker name="nature"/> 
+         </menu>    
+         <action
+               class="org.apache.easyant4e.natures.AddEasyAntNatureAction"
+               enablesFor="1"
+               id="org.apache.easyant4e.natures.AddEasyAntNatureAction"
+               icon = "icons/EasyAntNature.gif"
+               label="Convert Project to EasyAnt Project..."
+               menubarPath="org.apache.easyant4e.ui.menu/nature">
+         </action>
+         <action
+               class="org.apache.easyant4e.natures.RemoveEasyAntNatureAction"
+               enablesFor="1"
+               id="org.apache.easyant4e.natures.RemoveEasyAntNatureAction"
+               icon = "icons/EasyAntNature.gif"
+               label="Remove EasyAnt Nature..."
+               menubarPath="org.apache.easyant4e.ui.menu/nature">
+         </action>
+      </objectContribution>
+   </extension>
+
+   <extension
+         point="org.eclipse.ui.importWizards">
+      <wizard
+            class="org.apache.easyant4e.wizards.EasyAntImportWizard"
+            id="org.apache.easyant4e.wizards.EasyAntImportWizard"
+            category="org.apache.easyant4e.wizards.category"
+            name="Existing EasyAnt Project"
+            icon="icons/EasyAntNature.gif">
+            <description>Import an existing EasyAnt Project</description>
+      </wizard>
+      <category
+            id="org.apache.easyant4e.wizards.category"
+            name="EasyAnt">
+      </category>
+   </extension>
+
+   <extension
+         point="org.apache.ivyde.eclipse.moduleDescriptorExtension">
+      <moduleDescriptor
+            modelContributorClass="org.apache.easyant4e.ivyde.extension.model.EasyAntModuleDescriptorExtension"></moduleDescriptor>
+   </extension>
+   <extension
+         point="org.apache.ivyde.eclipse.editorPage">
+      <editorPage
+            pageClass="org.apache.easyant4e.ivyde.extension.page.BuildPage">
+      </editorPage>
+   </extension>
+
+   <extension point="org.eclipse.ui.console.consoleFactories">
+         <consoleFactory 
+            label="EasyAnt Console"
+            class="org.apache.easyant4e.console.EasyAntConsoleFactory"
+            icon="icons/full/obj16/ant_buildfile.gif">
+         </consoleFactory>
+       </extension>
+
+       <extension
+          point="org.eclipse.ui.startup">
+       <startup
+             class="org.apache.easyant4e.Startup"></startup>
+    </extension>
+    <!--
+    <extension
+          point="org.eclipse.ant.core.antTasks">
+       <antTask
+             class="org.apache.easyant.tasks.CoreRevisionCheckerTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.CoreRevisionCheckerTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.Import"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.Import">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.LoadModule"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.LoadModule">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.ParameterTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.ParameterTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.PathTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.PathTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.PropertyTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.PropertyTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.RepositoryReport"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.RepositoryReport">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.SubModule"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.SubModule">
+       </antTask>
+    </extension>
+    -->
+<!--
+       <extension
+       point="org.eclipse.ui.console.consolePageParticipants">
+    <consolePageParticipant
+          class="org.apache.easyant4e.console.EasyAntConsolePageParticipant"
+          id="org.apache.easyant4e.console.EasyAntConsolePageParticipant">
+       <enablement>
+          <instanceof
+                value="org.apache.easyant4e.console.EasyAntConsole">
+          </instanceof></enablement>
+    </consolePageParticipant>
+ </extension>
+-->
+
+   <!--
+    <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.apache.easyant4e.ant.editor.AntEditor"
+            extensions="ant"
+            icon="icons/full/obj16/ant_buildfile.gif"
+            id="org.eclipse.ant.ui.internal.editor.AntEditor"
+            name="EasyAnt Editor">
+            <contentTypeBinding
+               contentTypeId="org.eclipse.ant.core.antBuildFile"/> 
+      </editor>
+   </extension>
+   -->
+
+</plugin>
diff --git a/org.apache.easyant4e/src/ivysettings-remote.xml b/org.apache.easyant4e/src/ivysettings-remote.xml
new file mode 100644 (file)
index 0000000..6e0a1d1
--- /dev/null
@@ -0,0 +1,45 @@
+<!--
+   Copyright 2008-2009 the EasyAnt project
+
+       See the NOTICE file distributed with this work for additional information 
+       regarding copyright ownership.
+       
+       Licensed under the Apache License, Version 2.0 (the "License");
+       you may not use this file except in compliance with the License.
+       You may obtain a copy of the License at
+       
+       http://www.apache.org/licenses/LICENSE-2.0
+       
+       Unless required by applicable law or agreed to in writing, software
+       distributed under the License is distributed on an "AS IS" BASIS,
+       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+       See the License for the specific language governing permissions and
+       limitations under the License.
+-->
+<ivysettings>
+       <settings defaultResolver="main"/>      
+       <property name="easyant.repo.url" value="http://repository.easyant.org"/>
+       <!-- Directory use by ivy retreive in order to store modules (plugins and build types) -->
+       <property name="easyant.modules.dir" value="${user.home}/.easyant/modules"/>    
+       <resolvers>
+               <filesystem name="local">
+                       <ivy pattern="${easyant.modules.dir}/[organisation]/[module]/[revision]/[module].ivy" />                        
+                       <artifact pattern="${easyant.modules.dir}/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+               </filesystem>
+               <!-- EasyAnt modules -->
+               <url name="easyant-modules">
+                       <ivy pattern="${easyant.repo.url}/modules/[organisation]/[module]/[revision]/[module].ivy" />                   
+                       <artifact pattern="${easyant.repo.url}/modules/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>                    
+               </url>
+               <!-- External required libraries -->
+               <url name="easyant-shared">
+                       <ivy pattern="${easyant.repo.url}/shared/[organisation]/[module]/[revision]/[module].ivy" />
+                       <artifact pattern="${easyant.repo.url}/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>             
+               </url>
+               <chain name="main" returnFirst="true">
+                       <resolver ref="local"/>
+                       <resolver ref="easyant-modules" />
+                       <resolver ref="easyant-shared" />
+               </chain>                
+       </resolvers>    
+</ivysettings>
diff --git a/org.apache.easyant4e/src/ivysettings.xml b/org.apache.easyant4e/src/ivysettings.xml
new file mode 100644 (file)
index 0000000..72c53fe
--- /dev/null
@@ -0,0 +1,40 @@
+<!--
+   Copyright 2008-2009 the EasyAnt project
+
+       See the NOTICE file distributed with this work for additional information 
+       regarding copyright ownership.
+       
+       Licensed under the Apache License, Version 2.0 (the "License");
+       you may not use this file except in compliance with the License.
+       You may obtain a copy of the License at
+       
+       http://www.apache.org/licenses/LICENSE-2.0
+       
+       Unless required by applicable law or agreed to in writing, software
+       distributed under the License is distributed on an "AS IS" BASIS,
+       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+       See the License for the specific language governing permissions and
+       limitations under the License.
+-->
+<ivysettings>
+       <settings defaultResolver="main"/>
+       <caches useOrigin="true" defaultCacheDir="${user.home}/.easyant/easyant-cache" />
+       <!-- Directory use by ivy retreive in order to store modules (plugins and build types) -->
+       <property name="easyant.repo.dir" value="${user.home}/.easyant/easyant-repository"/>
+       <resolvers>
+               <!-- EasyAnt modules -->
+               <filesystem name="easyant-modules">
+                       <ivy pattern="${easyant.repo.dir}/modules/[organisation]/[module]/[revision]/[module].ivy"/>
+                       <artifact pattern="${easyant.repo.dir}/modules/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+               </filesystem>
+               <!-- External required libraries -->
+               <filesystem name="easyant-shared">
+                       <ivy pattern="${easyant.repo.dir}/shared/[organisation]/[module]/[revision]/[module].ivy"/>
+                       <artifact pattern="${easyant.repo.dir}/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+               </filesystem>
+               <chain name="main" returnFirst="true">
+                       <resolver ref="easyant-modules"/>
+                       <resolver ref="easyant-shared"/>
+               </chain>
+       </resolvers>
+</ivysettings>
\ No newline at end of file
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java b/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java
new file mode 100644 (file)
index 0000000..0184807
--- /dev/null
@@ -0,0 +1,121 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+import org.apache.easyant4e.modules.EasyAnt4EclipseModule;
+import org.apache.easyant4e.modules.EasyAntCoreModule;
+import org.apache.easyant4e.services.EasyantCoreService;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+import com.google.inject.Inject;
+
+
+/**
+ * This class manage plugin life cycle
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class Activator extends AbstractUIPlugin {
+
+       private EasyAntPlugin easyAntPlugin;
+       private EasyAntCoreModule easyAntCoreModule;
+       private EasyAnt4EclipseModule easyAnt4EclipseModule;
+
+       private EasyantCoreService easyantCoreService;
+       
+       @Inject
+       public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
+               this.easyantCoreService = easyantCoreService;
+       }
+
+       public static final String PLUGIN_ID = "org.apache.easyant4e";
+
+       // The shared instance.
+       private static Activator plugin;
+       
+
+       /**
+        * Create an activator and a EasyAntModule
+        * 
+        */
+       public Activator() {
+               super();
+               if (plugin == null) {
+                       plugin = this;
+                       this.easyAntCoreModule = new EasyAntCoreModule();
+                       this.easyAnt4EclipseModule = new EasyAnt4EclipseModule();
+               }
+       }
+
+       @Override
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               initializeEasyAntPlugin();              
+               easyantCoreService.installPluginsRepository();
+               Activator.getDefault().getLog().log(
+                               new Status(IStatus.INFO, Activator.PLUGIN_ID, 0, "EasyAnt For Eclipse started", null));
+       }
+
+       @Override
+       public void stop(BundleContext context) throws Exception {
+               Activator.getDefault().getLog().log(
+                               new Status(IStatus.INFO, Activator.PLUGIN_ID, 0, "EasyAnt For Eclipse shutdown", null));
+               plugin = null;
+               super.stop(context);
+       }
+
+       /**
+        * Returns the shared instance.
+        * 
+        * @return the plugin instance
+        */
+       public static Activator getDefault() {
+               return plugin;
+       }
+
+       /**
+        * Returns the EasyAnt Plugin instance.
+        * 
+        * @return the EasyAnt plugin instance
+        */
+       public static EasyAntPlugin getEasyAntPlugin() {
+               return getDefault().getEasyAntPluginInstance();
+       }
+
+       /**
+        * Returns the EasyAntPlugin instance.
+        */
+       private EasyAntPlugin getEasyAntPluginInstance() {
+               if (easyAntPlugin == null) {
+                       initializeEasyAntPlugin();
+               }
+               return easyAntPlugin;
+       }
+
+       private void initializeEasyAntPlugin() {
+               if (easyAntPlugin == null) {
+                       easyAntPlugin = new EasyAntPlugin(easyAntCoreModule, easyAnt4EclipseModule);
+                       easyAntPlugin.injectMembers(this);
+               }
+       }
+               
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java b/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java
new file mode 100644 (file)
index 0000000..9fa9598
--- /dev/null
@@ -0,0 +1,60 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public interface EasyAntConstants {
+
+       
+       public static final String IVY_MODULE_TAG = "ivy-module";
+       public static final String IVY_INFO_TAG = "info";
+       //public static final String IVY_DESCRIPTION_TAG = "description";
+
+       public static final String EASYANT_TAG = "ea:build";
+       public static final String EASYANT_TYPE_ATTR = "type";
+
+       public static final String EASYANT_PROPERTY_TAG = "ea:property";
+       public static final String EASYANT_PROPERTY_NAME_ATTR = "name";
+       public static final String EASYANT_PROPERTY_VALUE_ATTR = "value";
+       public static final String EASYANT_PROPERTY_FILE_ATTR = "file";
+
+       public static final String EASYANT_PLUGIN_TAG = "ea:plugin";
+       public static final String EASYANT_PLUGIN_MODULE_ATTR = "module";
+       public static final String EASYANT_PLUGIN_AS_ATTR = "as";
+       public static final String EASYANT_PLUGIN_MODE_ATTR = "mode";
+       public static final String EASYANT_PLUGIN_MODE_INCLUDE = "include";
+       public static final String EASYANT_PLUGIN_MODE_IMPORT = "import";
+       public static final String EASYANT_PLUGIN_MANDATORY_ATTR = "mandatory";
+
+       public static final String EASYANT_BUILD_TYPES_ORG = "org.apache.easyant.buildtypes";
+       public static final String EASYANT_BUILD_PLUGINS_ORG = "org.apache.easyant.plugins";
+
+       public static final String PLUGINS_SETTINGS = "ivysettings.xml";
+       
+       //Ant log level
+       public static final int ANT_LOGLEVEL_ERR = 0;
+    public static final int ANT_LOGLEVEL_WARN = 1;
+    public static final int ANT_LOGLEVEL_INFO = 2;
+    public static final int ANT_LOGLEVEL_VERBOSE = 3;
+    public static final int ANT_LOGLEVEL_DEBUG = 4;
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java b/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java
new file mode 100644 (file)
index 0000000..6b230b7
--- /dev/null
@@ -0,0 +1,158 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.PlatformUI;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntPlugin {
+
+       private final Injector injector;
+
+       public EasyAntPlugin(Module... modules) {
+               injector = Guice.createInjector(modules);
+               injectMembers(this);
+       }
+
+       public void injectMembers(Object instance) {
+               injector.injectMembers(instance);
+       }
+
+       /**
+        * Return the {@link EasyantCoreService}.
+        */
+       /*public EasyantCoreService getEasyantCoreService() {
+               return getInstance(EasyantCoreService.class);
+       }*/
+
+       /**
+        * Return the {@link EasyantProjectService}.
+        */
+       /*
+       public EasyantProjectService getEasyantProjectService() {
+               return getInstance(EasyantProjectService.class);
+       }*/
+
+       public IProject getCurrentProject() {
+               try {
+                       return getSelectedProject();
+               } catch (CoreException e) {
+                       log(e);
+               }
+               return null;
+       }
+
+       // private IJavaProject getJavaProject() throws CoreException {
+       // IProject project = getSelectedProject();
+       // IJavaProject javaProject=null;
+       // if(project.hasNature(JavaCore.NATURE_ID)){
+       // javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID);
+       // }
+       // return javaProject;
+       //}
+
+       private IProject getSelectedProject() throws CoreException {
+               IProject project = null;
+               Object selectedResource = getSelectedResource();
+               if (selectedResource instanceof IResource) {
+                       IResource resource = (IResource) selectedResource;
+                       project = resource.getProject();
+               } else if (selectedResource instanceof ClassPathContainer) {
+                       // FIXME maybe use Adaptable and WorkbenchAdapter to resolve project
+                       // container
+                       project = ((ClassPathContainer) selectedResource).getJavaProject().getProject();
+               }
+               return project;
+       }
+
+       private Object getSelectedResource() {
+               IStructuredSelection selection = getStructuredSelection();
+               if (selection != null) {
+                       Object element = selection.getFirstElement();
+                       return element;
+               }
+               return null;
+       }
+
+       private IStructuredSelection getStructuredSelection() {
+               ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
+                               .getSelection();
+               if (selection instanceof IStructuredSelection) {
+                       IStructuredSelection ss = (IStructuredSelection) selection;
+                       return ss;
+               }
+               return null;
+       }
+
+       public void log(int severity, String message) {
+               log(severity, message, null);
+       }
+
+       public void log(int severity, String message, Throwable e) {
+               log(new Status(severity, Activator.PLUGIN_ID, 0, message, e));
+       }
+
+       public void log(CoreException e) {
+               log(e.getStatus().getSeverity(), "EasyAnt For Eclipse - Internal Error", e);
+       }
+
+       public void log(IStatus status) {
+               Activator.getDefault().getLog().log(status);
+       }
+
+       /**
+        * Return the workspace used by the workbench
+        * 
+        * This method is internal to the workbench and must not be called by any
+        * plugins.
+        */
+       public IWorkspace getPluginWorkspace() {
+               return ResourcesPlugin.getWorkspace();
+       }
+
+       /**
+        * Get instances from the injector.
+        * 
+        * @param type
+        *            the type to get an instance of
+        * @return the instance
+        */
+       public <T> T getInstance(Class<T> type) {
+               return injector.getInstance(type);
+       }
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java b/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java
new file mode 100644 (file)
index 0000000..a2d4332
--- /dev/null
@@ -0,0 +1,64 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.ui.IStartup;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+// http://wiki.eclipse.org/FAQ_How_do_I_make_my_plug-in_dynamic_aware%3F
+// http://wiki.eclipse.org/FAQ_How_do_I_make_my_plug-in_dynamic_enabled%3F
+public class Startup implements IStartup {
+
+       public void earlyStartup() {
+               //TODO add aspect to kill 
+               //ExtensionRegistry -> private boolean checkReadWriteAccess(Object key, boolean persist) {
+               
+//             System.out.println("--- clean IvyDE extension");
+//             IExtensionRegistry reg = RegistryFactory.getRegistry();
+//             IExtension[] extensions = reg.getExtensions("org.apache.ivyde.eclipse");                
+//             for (IExtension extension : extensions) {
+//                     if ("org.eclipse.ui.popupMenus".equals(extension.getExtensionPointUniqueIdentifier())) {
+//                             System.out.println("--> remove "+extension);
+//                             try{
+//                                     reg.removeExtension(extension, getUserToken());
+//                             }catch(Exception e){
+//                                     e.printStackTrace();
+//                             }
+//                             System.out.println("--> extension removed!");
+//                             break;
+//                     }
+//             }
+       }
+
+       /*
+       private Object getUserToken() {
+               IExtensionRegistry registry = RegistryFactory.getRegistry();
+               //return null; // require -Declipse.registry.nulltoken=true
+               return ((ExtensionRegistry) registry).getTemporaryUserToken();
+       }
+*/
+       
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java b/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java
new file mode 100644 (file)
index 0000000..4736741
--- /dev/null
@@ -0,0 +1,27 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ant.editor;
+
+/**
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+//@SuppressWarnings("restriction")
+public class EasyAntEditor /*extends org.eclipse.ant.internal.ui.editor.AntEditor*/ {
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java b/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java
new file mode 100644 (file)
index 0000000..2939523
--- /dev/null
@@ -0,0 +1,103 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.builders;
+
+import java.util.Map;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntConstants;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+import com.google.inject.Inject;
+
+//import com.google.inject.Inject;
+
+/**
+ * The EastAnt builder.
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntBuilder extends IncrementalProjectBuilder {
+
+       private IProgressMonitor monitor;
+
+       private EasyantProjectService easyantProjectService;
+               
+       public EasyAntBuilder(){
+               Activator.getEasyAntPlugin().injectMembers(this);
+       }
+       
+       @Inject
+       public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
+               this.easyantProjectService = easyantProjectService;
+       }
+       
+       @SuppressWarnings("unchecked")
+       @Override
+       protected IProject[] build(final int kind, final Map args, final IProgressMonitor monitor) throws CoreException {
+               this.monitor = monitor;
+               if (!getProject().exists()) {
+                       return new IProject[] {};
+               } else {
+                       try {
+                               if (FULL_BUILD == kind) {
+                                       doBuild();
+                               } else { // FIXME maybe check INCREMENTAL_BUILD or AUTO_BUILD
+                                       IResourceDelta delta = getDelta(getProject());
+                                       if (delta == null) {
+                                               doBuild();
+                                       } else {
+                                               doBuild(delta);
+                                       }
+                               }
+                       } catch (OperationCanceledException e) {
+                               Activator.getEasyAntPlugin().log(IStatus.CANCEL, "EasyAnt build canceled", e);
+                       }
+                       return null;
+               }
+       }
+
+       protected void doBuild() throws CoreException {
+               IWorkspaceRunnable buildOperation = createBuildOperation(); 
+               buildOperation.run(monitor);
+       }
+
+       protected void doBuild(IResourceDelta delta) throws CoreException {
+               doBuild();
+       }
+       
+       private IWorkspaceRunnable createBuildOperation(){
+               // TODO maybe use WorkspaceModifyOperation
+               return new IWorkspaceRunnable(){                        
+                       public void run(IProgressMonitor monitor) throws CoreException {
+                               // TODO call good target
+                               easyantProjectService.runBuild(getProject(), "compile", EasyAntConstants.ANT_LOGLEVEL_WARN, monitor);
+                       }                       
+               };
+       }
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java b/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java
new file mode 100644 (file)
index 0000000..4de5dfd
--- /dev/null
@@ -0,0 +1,30 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.configurers;
+
+/**
+ * This interface must be implement to configure use in order to configure a basic eclipse project.
+ * 
+ * In example : you muste add JavaNature, ScalaNature, GroovyNature or others
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public interface Configurer {
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java b/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java
new file mode 100644 (file)
index 0000000..6be8be4
--- /dev/null
@@ -0,0 +1,43 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.eclipse.ui.console.IConsole;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public interface EasyAntConsole extends IConsole{
+
+       void show();
+       void close();
+       boolean isOpen();
+       
+       void info(String msg);
+       void error(String msg);
+       
+        /**
+     * Show the console.
+     * 
+     * @param showNoMatterWhat
+     *            ignore preferences if <code>true</code>
+     */
+    void show(boolean showNoMatterWhat);
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java b/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java
new file mode 100644 (file)
index 0000000..fac34b9
--- /dev/null
@@ -0,0 +1,48 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.apache.easyant4e.Activator;
+import org.eclipse.ui.console.IConsoleFactory;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntConsoleFactory implements IConsoleFactory {
+       
+       private EasyAntConsole console;
+       
+       public EasyAntConsoleFactory(){
+               Activator.getEasyAntPlugin().injectMembers(this);
+       }
+       
+       @Inject
+       public void setConsole(EasyAntConsole console) {
+               this.console = console;
+       }
+       
+       public void openConsole() {             
+               if (console != null) {
+                       console.show();
+               }
+       }
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java b/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java
new file mode 100644 (file)
index 0000000..cf74ed7
--- /dev/null
@@ -0,0 +1,102 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntPlugin;
+import org.apache.easyant4e.providers.ImageProvider;
+import org.apache.ivyde.eclipse.ui.console.IvyConsole;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntConsoleImpl extends IvyConsole implements EasyAntConsole {
+       
+       private boolean isOpen=false;
+       
+       public boolean isOpen() {
+               //TODO get the stat
+               return isOpen;
+       }
+
+       public void setOpen(boolean isOpen) {
+               this.isOpen = isOpen;
+       }
+       
+       @Inject
+       public EasyAntConsoleImpl(ImageProvider imageProvider) {                
+               super("EasyAnt", imageProvider.getConsoleImageDescriptor());            
+       }
+
+       public void show() {            
+               IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+               IConsole[] existing = manager.getConsoles();
+               boolean exists = false;
+               for (int i = 0; i < existing.length; i++) {
+                       if (this == existing[i]) {
+                               exists = true;
+                       }
+               }
+               if (!exists) {
+                       manager.addConsoles(new IConsole[] { this });
+               }
+               manager.showConsoleView(this);
+               setOpen(true);
+               
+               //show the Error log view
+               showErrorLogView();
+               
+       }
+       
+       private void showErrorLogView(){
+           if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
+            if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
+                    try {
+                                               PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.pde.runtime.LogView", null, IWorkbenchPage.VIEW_ACTIVATE);
+                                       } catch (PartInitException e) {
+                                               Activator.getEasyAntPlugin().log(IStatus.ERROR, "Cannot show the Error Log view.", e);
+                                       }
+            }
+           }
+       }
+
+       @Override
+       public void error(String msg) {
+               showErrorLogView();
+               super.error(msg);
+       }
+
+       public void close() {
+               IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+               manager.removeConsoles(new IConsole[] { this });
+               //ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(new MyLifecycle());
+               setOpen(false);
+       }
+       
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java b/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java
new file mode 100644 (file)
index 0000000..d799870
--- /dev/null
@@ -0,0 +1,55 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsolePageParticipant;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntConsolePageParticipant implements IConsolePageParticipant {
+
+       //private CloseConsoleAction closeAction;
+
+       public void init(IPageBookViewPage page, IConsole console) {
+               // closeAction = new IvyConsoleRemoveAction(console);
+               // IToolBarManager manager =
+               // page.getSite().getActionBars().getToolBarManager();
+               // manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
+       }
+
+       public void dispose() {
+       //      closeAction = null;
+       }
+
+       @SuppressWarnings("unchecked")
+       public Object getAdapter(Class adapter) {
+               return null;
+       }
+
+       public void activated() {
+       }
+
+       public void deactivated() {
+       }
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java b/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java
new file mode 100644 (file)
index 0000000..2431834
--- /dev/null
@@ -0,0 +1,105 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.apache.easyant4e.Activator;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * This class unpack the default EasyAnt repository in local file system.
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class RepositoryInstaller {
+       static final int BUFFER_SIZE = 102400;
+       static final String REPOSITORY_ARCHIVE_PATH = "repository.zip";
+       private URL interpreterZipUrl;
+
+       public void install(File installDir) {
+               this.interpreterZipUrl = Activator.getDefault().getBundle().getResource(REPOSITORY_ARCHIVE_PATH);
+               try {
+                       unPackArchive(installDir);
+               } catch (IOException e) {
+                       Activator.getEasyAntPlugin().log(IStatus.ERROR, "Cannot install EasyAnt repository", e);
+               }
+       }
+
+       private void unPackArchive(File installDir) throws IOException {
+               InputStream inputStream = this.interpreterZipUrl.openStream();
+               ZipInputStream zipFileStream = new ZipInputStream(inputStream);
+               ZipEntry zipEntry = zipFileStream.getNextEntry();
+               while (zipEntry != null) {
+                       File destination = new File(installDir.getPath(), zipEntry.getName());
+                       if (!zipEntry.isDirectory()) {
+                               /*
+                                * Copy files (and make sure parent directory exist)
+                                */
+                               File parentFile = destination.getParentFile();
+                               boolean parentFileExist = isFileExists(parentFile);
+                               if (!parentFileExist) {
+                                       parentFileExist = parentFile.mkdirs();
+                               }
+                               if (parentFileExist) {
+                                       OutputStream os = null;
+                                       try {
+                                               os = new FileOutputStream(destination);
+                                               byte[] buffer = new byte[BUFFER_SIZE];
+                                               while (true) {
+                                                       int len = zipFileStream.read(buffer);
+                                                       if (zipFileStream.available() == 0) {
+                                                               break;
+                                                       }
+                                                       os.write(buffer, 0, len);
+                                               }
+                                       } finally {
+                                               if (null != os) {
+                                                       os.close();
+                                               }
+                                       }
+                               } else {
+                                       Activator.getEasyAntPlugin().log(IStatus.ERROR,
+                                                       "Installing EasyAnt repository, but " + parentFile + " already exists!");
+                               }
+                       } else {
+                               boolean created = destination.mkdirs();
+                               if (!created) {
+                                       Activator.getEasyAntPlugin().log(IStatus.ERROR,
+                                                       "Installing EasyAnt repository. Cannot create directory: " + destination);
+                               }
+                       }
+                       zipFileStream.closeEntry();
+                       zipEntry = zipFileStream.getNextEntry();
+               }
+               inputStream.close();
+               zipFileStream.close();
+       }
+
+       private boolean isFileExists(File file) {
+               return (null != file && file.exists());
+       }
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java b/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java
new file mode 100644 (file)
index 0000000..d102e08
--- /dev/null
@@ -0,0 +1,330 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension.model;
+
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_BUILD_PLUGINS_ORG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_BUILD_TYPES_ORG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_AS_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MANDATORY_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODE_IMPORT;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODE_INCLUDE;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODULE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_TAG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_FILE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_NAME_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_TAG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_VALUE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_TAG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_TYPE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.IVY_INFO_TAG;
+import static org.apache.easyant4e.EasyAntConstants.IVY_MODULE_TAG;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.easyant.core.descriptor.PropertyDescriptor;
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.services.EasyantCoreService;
+import org.apache.ivyde.common.ivyfile.IvyModuleDescriptorModel;
+import org.apache.ivyde.common.model.IDocumentedValueProvider;
+import org.apache.ivyde.common.model.IvyFile;
+import org.apache.ivyde.common.model.IvyTag;
+import org.apache.ivyde.common.model.IvyTagAttribute;
+import org.apache.ivyde.eclipse.extension.ModuleDescriptorExtension;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+import com.google.inject.Inject;
+
+/**
+ * This class provide extension in order to add EasyAnt semantic information in
+ * Ivy module descriptor model.
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntModuleDescriptorExtension implements ModuleDescriptorExtension {
+
+       private IvyModuleDescriptorModel model;
+       private IvyTag rootTag;
+       private EasyantCoreService easyantCoreService;
+               
+       @Inject
+       public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
+               this.easyantCoreService=easyantCoreService;
+       }
+       
+       public EasyAntModuleDescriptorExtension() {
+               super();
+               Activator.getEasyAntPlugin().injectMembers(this);
+       }
+
+       public IvyModuleDescriptorModel contributeModel(IvyModuleDescriptorModel model) {
+               this.model = model;
+               this.rootTag = model.getRootIvyTag();
+               contributeEasyAntTag();
+               return model;
+       }
+
+       private IvyTag contributeEasyAntTag() {
+               IvyTag easyAntTag = createEasyAndTag();
+               return easyAntTag;
+       }
+
+       private IvyTag createEasyAndTag() {
+               IvyTag easyAntTag = new IvyTag(EASYANT_TAG, "Describes how to build this module with EasyAnt.");
+               easyAntTag.addAttribute(new IvyTagAttribute(EASYANT_TYPE_ATTR, "The name of the build type used to build this module.", true,
+                               createBuildTypesValueProvider()));
+               model.addTag(easyAntTag);
+               getDescriptionTag().addChildIvyTag(easyAntTag);
+               easyAntTag = createEasyAndTagChilds(easyAntTag);
+               return easyAntTag;
+       }
+
+       private IvyTag createEasyAndTagChilds(IvyTag easyAntTag) {
+               createPropertyTag(rootTag, easyAntTag);
+               createPluginTag(rootTag, easyAntTag);
+               return easyAntTag;
+       }
+
+       private IvyTag getDescriptionTag() {
+               return model.getIvyTag(IVY_INFO_TAG, IVY_MODULE_TAG);
+       }
+
+       private IDocumentedValueProvider createBuildTypesValueProvider() {
+               final List<String> buildTypes = getBuildTypes();
+               IDocumentedValueProvider buildTypesValueProvider = new IDocumentedValueProvider() {
+                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                               return buildTypes.toArray(new String[buildTypes.size()]);
+                       }
+                       public String getDocForValue(String value, IvyFile ivyFile) {
+                               String description = easyantCoreService.getBuildTypeDescription(value);
+                               return description;
+                       }
+               };
+               return buildTypesValueProvider;
+       }
+
+       private List<String> getBuildTypes() {
+               // load default build types
+               final ArrayList<String> buildTypes = new ArrayList<String>();
+               Job job = new Job("Easyant - Getting list of Build Types (" + EASYANT_BUILD_TYPES_ORG + ") " + "from repository ...") {
+                       protected IStatus run(IProgressMonitor monitor) {
+                               for (String module : easyantCoreService.getAllCoreBuildTypes()) {
+                                       String shortName = module.substring(module.indexOf("#")+1);
+                                       buildTypes.add(shortName);
+                                       buildTypes.add(module);
+                               }
+                               return Status.OK_STATUS;
+                       }
+               };
+               job.setPriority(Job.LONG);
+               job.schedule();
+               return buildTypes;
+       }
+
+       private IvyTag createPropertyTag(IvyTag root, IvyTag parent) {
+               // Contribute <property name="" value=""> Tag
+               IvyTag propertyTag = new IvyTag(EASYANT_PROPERTY_TAG, "Define a property in order to configure the build type or plugins.");
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_NAME_ATTR, "The name of property. (associated with the 'value' tag)", false,
+                               createPropertyNameValueProvider()));
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_VALUE_ATTR, "The value of property identified by the 'name' tag", false,
+                               createPropertyValueProvider()));
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_FILE_ATTR, "Define a property file containing some properties 'name=value' pairs.", false));
+               model.addTag(propertyTag);
+               parent.addChildIvyTag(propertyTag);
+               return propertyTag;
+       }
+
+       private IvyTag createPluginTag(IvyTag root, IvyTag parent) {
+               // Contribute <plugin module="" as=""> Tag
+               IvyTag propertyTag = new IvyTag(EASYANT_PLUGIN_TAG, "Define a plugin used to contribute additionnal parts of the build process.");
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MODULE_ATTR, "The name of the plugin.", true,
+                               createPluginModuleValueProvider()));
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_AS_ATTR, "The name of the prefix used to call plugin's targets, i.e. for 'as=\"myplugin\"': myplugin:target1", true));
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MODE_ATTR, "The kind of import.", true,
+                               createPluginModeValueProvider()));
+               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MANDATORY_ATTR, "The mandatory status", false,
+                               createPluginMandatoryValueProvider()));
+               model.addTag(propertyTag);
+               parent.addChildIvyTag(propertyTag);
+               return propertyTag;
+       }
+
+       private IDocumentedValueProvider createPluginModuleValueProvider() {
+               final List<String> buildPlugins = getBuildPlugins();
+               IDocumentedValueProvider pluginModuleValueProvider = new IDocumentedValueProvider() {
+                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                               return buildPlugins.toArray(new String[buildPlugins.size()]);
+                       }
+                       public String getDocForValue(String value, IvyFile ivyFile) {
+                               String description = easyantCoreService.getPluginDescription(value);
+                               return description;
+                       }
+               };
+               return pluginModuleValueProvider;
+       }
+
+       private List<String> getBuildPlugins() {
+               final ArrayList<String> buildPlugins = new ArrayList<String>();
+               // load default build plugins
+               Job job = new Job("Easyant - Getting list of Plugins (" + EASYANT_BUILD_PLUGINS_ORG + ") from repository ...") {
+                       protected IStatus run(IProgressMonitor monitor) {
+                               for (String module : easyantCoreService.getAllCorePlugins()) {
+                                       String shortName = module.substring(module.indexOf("#")+1);
+                                       buildPlugins.add(shortName);
+                                       buildPlugins.add(module);
+                               }
+                               return Status.OK_STATUS;
+                       }
+               };
+               job.setPriority(Job.LONG);
+               job.schedule();
+               return buildPlugins;
+       }
+
+       private IDocumentedValueProvider createPluginModeValueProvider() {
+               IDocumentedValueProvider pluginModeValueProvider = new IDocumentedValueProvider() {
+                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                               return new String[] { EASYANT_PLUGIN_MODE_IMPORT, EASYANT_PLUGIN_MODE_INCLUDE };
+                       }
+                       public String getDocForValue(String value, IvyFile ivyFile) {
+                               //TODO get documentation for import and include
+                               return null;
+                       }
+               };
+               return pluginModeValueProvider;
+       }
+
+       private IDocumentedValueProvider createPluginMandatoryValueProvider() {
+               IDocumentedValueProvider pluginMandatoryValueProvider = new IDocumentedValueProvider() {
+                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                               return new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
+                       }
+                       public String getDocForValue(String value, IvyFile ivyFile) {
+                               return null;
+                       }
+               };
+               return pluginMandatoryValueProvider;
+       }
+
+       private IDocumentedValueProvider createPropertyValueProvider() {
+               IDocumentedValueProvider propertyValueValueProvider = new IDocumentedValueProvider() {
+
+                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                               PropertyDescriptor propertyDescriptor = getPropertyDescriptor(att, ivyFile);
+                               if (propertyDescriptor != null) {
+                                   String value = propertyDescriptor.getDefaultValue();
+                                   if(value==null){
+                                       value = propertyDescriptor.getValue();
+                                   }
+                                   if(value!=null){
+                                       return new String[] { value };
+                    }
+                               return new String[] {};  
+                               }
+                               return new String[] {};
+                       }
+                       public String getDocForValue(String value, IvyFile ivyFile) {
+                               return null;
+                       }
+               };
+               return propertyValueValueProvider;
+       }
+
+       private IDocumentedValueProvider createPropertyNameValueProvider() {
+               IDocumentedValueProvider propertyNameValueProvider = new IDocumentedValueProvider() {
+                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                               String buildType = getBuildType(ivyFile);
+                               if (buildType != null) {
+                                       List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
+                                       String[] names = new String[propertyDescriptors.size()];
+                                       int i = 0;
+                                       for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
+                                               names[i] = propertyDescriptor.getName();
+                                               i++;
+                                       }
+                                       return names;
+                               }
+                               return new String[] {};
+                       }
+                       public String getDocForValue(String value, IvyFile ivyFile) {
+                               String buildType = getBuildType(ivyFile);
+                               if(buildType!=null){
+                                       PropertyDescriptor propertyDescriptor = getPropertyDescriptor(buildType, value);
+                                       if(propertyDescriptor!=null){
+                                               return propertyDescriptor.getDescription();
+                                       }
+                               }
+                               return null;
+                       }
+               };
+               return propertyNameValueProvider;
+       }
+
+       List<PropertyDescriptor> propertyDescriptorsCache;
+       private PropertyDescriptor getPropertyDescriptor(String buildType, String propertyName) {
+               if(propertyDescriptorsCache==null){
+                       propertyDescriptorsCache= easyantCoreService.getPropertiesForBuildType(buildType);
+               }
+               for (PropertyDescriptor propertyDescriptor : propertyDescriptorsCache) {
+                       if (propertyName.equals(propertyDescriptor.getName())) {
+                               return propertyDescriptor;
+                       }
+               }
+               return null;
+       }
+       
+       private PropertyDescriptor getPropertyDescriptor(IvyTagAttribute att, IvyFile ivyFile) {
+               String buildType = getBuildType(ivyFile);
+               if (ivyFile.getAllAttsValues().containsKey(EASYANT_PROPERTY_NAME_ATTR)) {
+                       String propertyNameValue = ivyFile.getAllAttsValues().get(EASYANT_PROPERTY_NAME_ATTR).toString();
+                       if (buildType != null && propertyNameValue != null) {
+                               List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
+                               for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
+                                       if (propertyNameValue.equals(propertyDescriptor.getName())) {
+                                               return propertyDescriptor;
+                                       }
+                               }
+                       }
+               }
+               return null;
+       }
+
+       @SuppressWarnings("unchecked")
+       private String getBuildType(IvyFile ivyFile) {
+               if (EASYANT_TAG.equals(ivyFile.getParentTagName())) {
+                       int[] indexes = ivyFile.getParentTagIndex();
+                       if (indexes != null && indexes.length > 0) {
+                               Map<String, String> allAttsValuesForEasyAntTag = ivyFile.getAllAttsValues(indexes[0] + 1);
+                               String typeValue = allAttsValuesForEasyAntTag.get(EASYANT_TYPE_ATTR);
+                               return typeValue;
+                       }
+               }else if (IVY_INFO_TAG.equals(ivyFile.getParentTagName())) {
+                       Map<String, String> allAttsValuesForEasyAntTag = ivyFile.getAllAttsValues(ivyFile.getOffset() + 1);
+                       String typeValue = allAttsValuesForEasyAntTag.get(EASYANT_TYPE_ATTR);
+                       return typeValue;
+               }
+               return null;
+       }
+       
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java b/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java
new file mode 100644 (file)
index 0000000..383436d
--- /dev/null
@@ -0,0 +1,96 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension.page;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.easyant.core.report.PhaseReport;
+import org.apache.easyant.core.report.TargetReport;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.apache.ivyde.eclipse.ui.core.IvyFileEditorInput;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class BuildLifeCycleContentProvider implements ITreeContentProvider {
+
+       private EasyantProjectService easyantProjectService;
+
+       public BuildLifeCycleContentProvider() {
+       }
+
+       @Inject
+       public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
+               this.easyantProjectService = easyantProjectService;
+       }
+
+       public Object[] getElements(Object inputElement) {
+               if (inputElement instanceof IvyFileEditorInput) {
+                       IvyFileEditorInput ivyFileEditorInput = (IvyFileEditorInput) inputElement;
+                       IFile ivyFile = ivyFileEditorInput.getFile();
+                       List<PhaseReport> phaseReports = easyantProjectService.getPhases(ivyFile);
+                       List<TargetReport> targetReports = easyantProjectService.getTargets(ivyFile);
+                       ArrayList<Object> o = new ArrayList<Object>();
+                       o.addAll(phaseReports);
+                       o.addAll(targetReports);
+                       Object[] input = o.toArray(new Object[o.size()]);
+                       return input;
+               }
+               return new Object[0];
+       }
+
+       public void dispose() {
+       }
+
+       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+       }
+
+       public Object[] getChildren(Object parentElement) {
+               if (parentElement instanceof PhaseReport) {
+                       PhaseReport phaseReport = (PhaseReport) parentElement;
+                       //if (phaseReport.getName().equals("compile")) {
+                       //      System.out.println("coucou");
+                       //}
+                       List<TargetReport> targetReports = phaseReport.getTargetReports();
+                       return targetReports.toArray(new TargetReport[targetReports.size()]);
+               }
+               return null;
+       }
+
+       public Object getParent(Object element) {
+               return null;
+       }
+
+       public boolean hasChildren(Object element) {
+               if (element instanceof PhaseReport) {
+                       PhaseReport phaseReport = (PhaseReport) element;
+                       List<TargetReport> targetReports = phaseReport.getTargetReports();
+                       return (targetReports != null && targetReports.size() > 0);
+               }
+               return false;
+       }
+
+}
diff --git a/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifecycleBlock.java b/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifecycleBlock.java
new file mode 100644 (file)
index 0000000..5e57512
--- /dev/null
@@ -0,0 +1,301 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension.page;
+
+import org.apache.easyant.core.report.PhaseReport;
+import org.apache.easyant.core.report.TargetReport;
+import org.apache.easyant4e.EasyAntConstants;
+import org.apache.easyant4e.console.EasyAntConsole;
+import org.apache.easyant4e.providers.ImageProvider;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.internal.ui.callhierarchy.HistoryListAction;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.forms.DetailsPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.MasterDetailsBlock;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+import com.google.inject.Inject;
+
+//import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class BuildLifecycleBlock extends MasterDetailsBlock {
+       private FormPage page;  
+
+       private BuildLifeCycleContentProvider buildLifeCycleContentProvider;
+       private BuildLifecycleLabelProvider buildLifecycleLabelProvider;
+       private EasyantProjectService easyantProjectService;
+       private PhaseDetailsPage phaseDetailsPage;
+       private TargetDetailsPage targetDetailsPage;
+       private EasyAntConsole console;
+       private ImageProvider imageProvider;
+       private boolean enableInfoLogLevel = false;
+       private boolean enableVerboseLogLevel = false;
+       private boolean enableDebugLogLevel = false;
+       
+       
+       public BuildLifecycleBlock() {}
+       
+       @Inject
+       public void setImageProvider(ImageProvider imageProvider) {
+               this.imageProvider = imageProvider;
+       }
+       
+       @Inject
+       public void setConsole(EasyAntConsole console) {
+               this.console = console;
+       }
+       
+       @Inject
+       public void setPhaseDetailsPage(PhaseDetailsPage phaseDetailsPage) {
+               this.phaseDetailsPage = phaseDetailsPage;
+       }
+
+       @Inject
+       public void setTargetDetailsPage(TargetDetailsPage targetDetailsPage) {
+               this.targetDetailsPage = targetDetailsPage;
+       }
+
+       @Inject
+       public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
+               this.easyantProjectService = easyantProjectService;
+       }
+
+       @Inject
+       public void setBuildLifecycleLabelProvider(BuildLifecycleLabelProvider buildLifecycleLabelProvider) {
+               this.buildLifecycleLabelProvider = buildLifecycleLabelProvider;
+       }
+
+       @Inject
+       public void setBuildLifeCycleContentProvider(BuildLifeCycleContentProvider buildLifeCycleContentProvider) {
+               this.buildLifeCycleContentProvider = buildLifeCycleContentProvider;
+       }
+
+       public void setPage(FormPage page) {
+               this.page = page;
+       }
+       
+       @Override
+       protected void createMasterPart(final IManagedForm managedForm, final Composite parent) {
+               createBuildLifecyclePart(managedForm, parent);
+       }
+
+       protected void createBuildLifecyclePart(final IManagedForm managedForm, final Composite parent) {
+               FormToolkit toolkit = managedForm.getToolkit();
+               Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
+               section.setText("Build Lifecycle");
+               section.setDescription("The build lifecycle has the following build phases:");
+               section.marginWidth = 10;
+               section.marginHeight = 5;
+               Composite client = toolkit.createComposite(section, SWT.WRAP);
+               GridLayout layout = new GridLayout();
+               layout.numColumns = 2;
+               layout.marginWidth = 2;
+               layout.marginHeight = 2;
+               client.setLayout(layout);
+               toolkit.paintBordersFor(client);
+
+               section.setClient(client);
+               final SectionPart spart = new SectionPart(section);
+               managedForm.addPart(spart);
+               TreeViewer viewer = new TreeViewer(client);
+               GridData gd = new GridData(GridData.FILL_BOTH);
+               gd.heightHint = 20;
+               gd.widthHint = 100;
+               viewer.getTree().setLayoutData(gd);
+               viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+                       public void selectionChanged(SelectionChangedEvent event) {
+                               managedForm.fireSelectionChanged(spart, event.getSelection());
+                       }
+               });
+               viewer.addDoubleClickListener(new IDoubleClickListener(){
+                       public void doubleClick(DoubleClickEvent event) {
+                               ISelection selection = event.getSelection();
+                               if(selection instanceof StructuredSelection){
+                                       StructuredSelection structuredSelection = (StructuredSelection)selection;
+                                       if(!structuredSelection.isEmpty()){
+                                               Object o = structuredSelection.getFirstElement();                                               
+                                               if(o instanceof PhaseReport){
+                                                       runPhase((PhaseReport)o);
+                                               }else if(o instanceof TargetReport){                                                    
+                                                       runTarget((TargetReport)o);
+                                               }
+                                       }
+                               }                               
+                       }                       
+               });
+               viewer.setContentProvider(buildLifeCycleContentProvider);
+               viewer.setLabelProvider(buildLifecycleLabelProvider);
+               viewer.setInput(page.getEditor().getEditorInput());
+               // viewer.expandAll();
+       }
+
+       private void runPhase(final PhaseReport phase){
+               Job job = new WorkspaceJob("Easyant running phase " + phase.getName() + "...") {
+                       @Ove