ant, codepro.exportSet

(old task name "ExportSet")

In Eclipse 2.0 and Application Developer 5.0, the "ant" Ant task is generated for nested export sets, while in Application Developer 4.0.3, the "codepro.exportSet" Ant task is generated instead.  The ExportSet wizard will convert one form to the other as appropriate when editing ExportSets generated in Application Developer 4.0.3 but then edited using Eclipse 2.0 or Application Developer 5.0.  The "codepro.exportSet" task does not work under Eclipse 2.0 and Application Developer 5.0 and must be converted to the "ant" Ant task.  More details below...

codepro.exportSet (only for use in Application Developer 4.0.3)

Very similar to the Ant task named "Ant" by which one Ant script can call another Ant script in a different file.
Example:

<codepro.exportSet path="/CodePro/export_1.xml" inheritAll="false">
	<property name="Parameter1" value="value1"/>
	<property name="Parameter2" value="value2"/>
</codepro.exportSet>

In this example, the path attribute (required) specifies the Ant file to be executed, the inheritAll attribute (optional - default true) specifies whether or not the properties defined in the calling Ant script are available to the Ant script being called.  If false, then only those property values defined as part of the ExportSet task (e.g. Parameter1 and Parameter2 in the example above) will be available to the Ant script being called.

Converting the "codepro.exportSet" Ant task to the "ant" Ant task

The "codepro.exportSet" task does not work under Eclipse 2.0 and Application Developer 5.0 and must be converted to the "ant" Ant task.  If executing an ExportSet or Ant script in Eclipse 2.0 or Application Developer 5.0 results in a build exception similar to this

 
    
    java.lang.NoClassDefFoundError: org/apache/tools/ant/Project
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
	at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
	at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled Code))
	at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled Code))
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
	at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java(Compiled Code))
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(Delegating URLClassLoader.java(Compiled Code))
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(Delegating URLClassLoader.java(Compiled Code))
	at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
	at com.instantiations.assist.eclipse.core.eclipse20.CodeProCore20.newExportSetCallProjectImpl(CodeProCore20.java:649)
	at com.instantiations.assist.eclipse.core.CodeProCore.newExportSetCallProject(CodeProCore.java:636)
	at com.instantiations.assist.eclipse.ant.ExportSetCall.init(ExportSetCall.java: 180)
then your ExportSet or Ant script may contain the codepro.exportSet task.  To have the script execute properly, convert the codepro.exportSet task into the "ant" Ant task using one of the following approaches...

1) Open the ExportSet wizard on the export set that contains the nested export set call, click "Next" to edit the script, then "Finish".  This causes the export set to be regenerated using the "ant" Ant task rather than the "codepro.exportSet" Ant task.

2) Manually edit the export set or ant script, changing each occurrence of codepro.exportSet to ant similar to the example below...

    change
        <codepro.exportSet path="/MyProject/export.xml"/>

    to
        <ant antfile="../MyProject/export.xml"/>

Make sure to include the .. between the " and the /

The antfile attribute is a relative path from the current directory.  If the export set or Ant script that contains the codepro.exportSet Ant task is not located in the project root or the baseDir used when executing the script is not a project root directory, then the ".." in the example above would need to be replaced with the appropriate path to navigate from baseDir to the eclipse workspace directory. Alternately, an absolute path can be used.

All other aspects of the "codepro.exportSet" Ant task and the "ant" Ant task are identical