Gli script Ant vengono generati di solito utilizzando il PDE (Plug-in Development Environment), me č possibile anche crearli manualmente o da altri script.
In effetti il PDE espone le attivitā Ant per creare i vari script di generazione.
Le funzioni di creazione degli script di generazione risiedono nelle seguenti attivitā. Per ogni attivitā vengono anche elencati gli argomenti.
elements: |
the entry that will be fetched. Il formato previsto č type@id come specificato nel formato dei file di directory; |
buildDirectory: |
the directory into which fetch scripts will be generated and into which features and plug-in projects will be checked out; |
directory: |
the path to a directory file; |
children: |
optional, specifies whether the script generation for contained plug-ins and fragments should be invoked. L'impostazione predefinita č true; |
cvspassfile: |
optional, the name of a CVS password file; |
fetchTag: |
optional, overrides the tag provided in directory file by the given value; |
configInfo: |
optional, an ampersand separated list of configuration indicating the targeted configuration. L'impostazione predefinita prevede che sia indipendente dalla piattaforma; |
recursiveGeneration: |
optional, specify whether or not fetch scripts should be generated for nested features. L'impostazione predefinita č true. |
elements : |
the entry to be built. Il formato della voce previsto sarā type@id, come viene specificato nel formato dei file di directory; |
buildDirectory : |
the directory where the features and plug-ins to build are located; |
children : |
optional, specifies whether the script generation for contained plug-ins and fragments should be invoked. L'impostazione predefinita č true; |
recursiveGeneration : |
optional, specified whether the script generation for contained features should be invoked. L'impostazione predefinita č true; |
devEntries : |
optional, a comma separated list of directories to be given to the compile classpath; |
buildingOSGi : |
optional, indicates if the
target is 3.x.
or 2.1. Default is true; |
baseLocation : |
optional, indicates a folder which containing a target eclipse install with features/ and plugins/ subdirectories. |
configInfo : |
optional, an ampersand separated list of configuration indicates the targeted configuration. L'impostazione predefinita prevede che sia indipendente dalla piattaforma; |
pluginPath : |
optional, a platform file separator separated list of locations from which to find additional plug-ins |
archivesFormat : |
optional, an ampersand separated list of configs and the expected output format for each of those. Il formato č separato da un trattino (-) dalla configurazione. I valori supportati sono: folder, tar, zip, antZip, che indicano rispettivamente non archiviare, utilizza tar per creare l'archivio, utilizza la versione dello zip delle informazioni disponibili sulla piattaforma, utilizza zip ant. Il valore predefinito č antZip. |
product : |
optional, '/' separated path to the location of an RCP product being built. Il primo segmento del percorso fa riferimento all'ID di plugin di un plugin contenente il file .product. |
signJars : |
optional, indicates if the scripts generated must sign jars for features and plug-ins. Il valore predefinito č false. I parametri dell'attivitā sono controllati dalle seguenti proprietā ant: sign.alias, sign.keystore e sign.storepass rispettivamente trasmessi ai parametri alias, keystore e storepass dall'ant signJar task. Il valore predefinito č false. |
generateJnlp : |
optional, indicates if a jnlp file should be generated for all the features being built. |
outputUpdateJars : |
optional, generates plug-ins and features in the update site format when set. Il valore predefinito č false. Note that the site.xml is not generated nor updated |
forceContextQualifier : |
optional, uses the given
value to
replace the .qualifier being by plug-ins and features. (Vedere anche Qualificatori di versione) |
generateFeatureVersionSuffix: | optional, whether or not to generate the feature version suffix. |
groupConfiguration
: |
optional, whether or not to
group all configurations being built into a single archive. |
generateVersionsLists : |
optional, whether or not to
generate properties files listing the versions of features and plug-ins
that were built. |
featureId : |
The id to give to the
generated Feature. |
buildDirectory: |
the directory where the
features and plug-ins (in /features and /plugins subdirectories) to
include are located. The generated feature will be placed in the
/features subdirectory. |
baseLocation : |
optional, indicates a folder
which contains installed features and plug-ins |
productFile : |
optional, a product file on
which to base the generated feature. |
verify : |
Whether or not to use the
resolver to verify that the provided plug-ins and features are
available. This also determines whether or not the the feature
will be able to correctly handle platform specific fragments and
plug-ins that will be JARed. If all the elements to be included
in the feature are available locally, then verify should be set to
True. If the elements need to be fetched from a repository, set
verify to False, use the resulting feature to fetch the required
plug-ins and features, then regenerate the container feature using
verify = True. |
pluginPath : |
optional, a platform file separator separated list of locations from which to find additional plug-ins |
configInfo : |
optional, an ampersand separated list of configuration indicates the targeted configuration. L'impostazione predefinita prevede che sia indipendente dalla piattaforma; |
pluginList : |
optional, a comma separated
list of plug-in ids to include in the generated feature. |
featureList : |
optional, a comma separated
list of feature ids to include in the generated feature. |
fragmentList : |
optional, a comma separated
list of fragment ids to include in the generated feature. |
<eclipse.fetch elements="bundle@org.eclipse.osgi"
buildDirectory="c:\toBuild"
directory="directory.txt"
configInfo="win32,win32,x86 & linux, motif, x86"
/>
<eclipse.buildScript elements="bundle@org.eclipse.osgi"
buildDirectory="c:\toBuild"
archivesFormat="macosx, carbon, ppc - tar"/>
Le attivitā descritte in precedenza funzionano solo se Eclipse č in esecuzione. Nel particolare scenario dell'esecuzione di script Ant che utilizzano attivitā Eclipse, gli script devono essere eseguiti mediante l'applicazione Eclipse Ant Runner. La riga comandi da utilizzare in questo caso specifico č la seguente:
java -cp startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -buildfile build.xml
Tenere presente che i parametri visualizzati dopo l'applicazione sono i parametri trasmessi a Ant.