Ant-taak API blokkeren

Doel

Deze taak geeft API's aan die zijn toegevoegd aan, gewijzigd in of verwijderd uit een API-basislijn. De taak moet zorgen dat er geen API-wijzigingen plaatsvinden na het blokkeren van de API.

Gebruik

Beschrijving

De naam van de ant-taak is apitooling.apifreeze. Om deze te kunnen gebruiken, moet het JAR-bestand apitooling-ant.jar zich in het ant-klassenpad bevinden.

<apitooling.apifreeze
	baseline="..."
	profile="..."
	report="..."
	excludelist="..."
	includelist="..."
	debug="..."
		eefile="..."
/>

Parameters

Kenmerk Beschrijving Verplicht
baseline Dit kenmerk geeft de locatie van de desbetreffende basislijn aan.

Dit kan een bestand met de extensie zip, jar, tgz of tar.gz zijn, maar ook een directory die correspondeert met de Eclipse-installatiemap. Dit is de directory waarin het uitvoerbare Eclipse-bestand is opgeslagen.

De locatie wordt opgegeven als absoluut pad.
True
profile Dit kenmerk geeft de locatie aan van het huidige product of profiel dat u wilt vergelijken met de basislijn.

Dit kan een bestand met de extensie zip, jar, tgz of tar.gz zijn, maar ook een directory die correspondeert met de Eclipse-installatiemap. Dit is de directory waarin het uitvoerbare Eclipse-bestand is opgeslagen.

De locatie wordt opgegeven als absoluut pad.
True
report Instellen van de naam van het te genereren rapportbestand.

Deze moet worden opgegeven als absoluut pad.
This must be a file location, not a directory.
True
excludelist Instelling van de locatie van de uitsluitingslijst.

The exclude list location specifies a text file listing bundles to be excluded from the analysis. By default all bundles in the profile are analyzed. The include and exclude list attributes can be used to selectively include and exclude bundles. In addition, this task supports listing members in the include and exclude lists. The include list seeds the set of bundles and members to be analyzed (when omitted, all bundles and members are included), and the exclude list is then applied. Each line of the file specifies one of:
  • a specific bundle name
  • a specific member name
  • a regular expression to match against bundle or member names (lines being with "R:")
  • a comment (lines being with '#')

De locatie wordt opgegeven als absoluut pad.
Following is an example exclude list:
# ECLIPSE MEMBERS
org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListContentProvider#getElements(Ljava/lang/Object;)[Ljava/lang/Object;
# ECLIPSE BUNDLES
org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_DEC_FIELD_ERROR
org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_DEC_FIELD_WARNING
org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_ELCL_COLLAPSEALL
# NON-ECLIPSE BUNDLES
com.ibm.icu
R:javax\..*
...
Nee
includelist Set the include list location.

The include list location specifies a text file listing bundles to be included in the analysis. By default all bundles in the profile are analyzed. The include and exclude list attributes can be used to selectively include and exclude bundles. In addition, this task supports listing members in the include and exclude lists. The include list seeds the set of bundles and members to be analyzed (when omitted, all bundles and members are included), and the exclude list is then applied. Each line of the file specifies one of:
  • a specific bundle name
  • a specific member name
  • a regular expression to match against bundle or member names (lines being with "R:")
  • a comment (lines being with '#')

De locatie wordt opgegeven als absoluut pad.
Following is an example include list:
# ECLIPSE MEMBERS
org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListContentProvider#getElements(Ljava/lang/Object;)[Ljava/lang/Object;
# ECLIPSE BUNDLES
org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_DEC_FIELD_ERROR
org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_DEC_FIELD_WARNING
org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_ELCL_COLLAPSEALL
# NON-ECLIPSE BUNDLES
com.ibm.icu
R:javax\..*
...
Nee
debug Instellen van de foutopsporingswaarde.

De mogelijke waarden zijn true en false.
De standaardwaarde is false.
Nee
eefile Instellen van de uitvoeringsomgeving.

Standaard wordt een uitvoeringsomgevingsbestand gebruikt dat correspondeert met een JavaSE-1.6-uitvoeringsomgeving.

De indeling van het bestand wordt beschreven in deze wikipagina.

Het bestand wordt opgegeven als absoluut pad.
Nee

Voorbeelden

	<apitooling.apifreeze
		baseline="D:\eclipse\3.4.1\eclipse"
		profile="D:\eclipse-SDK-I20081118-0800-linux-gtk.tar.gz"
		report="D:\report\report.xml"
		excludelist="D:\exclude_list.txt"
		debug="true"
	/>

Hiermee wordt de taak gestart voor het maken van report.xml in de map D:\report. De uitsluitingslijst D:\exclude_list_external.txt wordt gebruikt om het aantal te rapporteren problemen te verminderen.

Omdat de foutopsporing is ingeschakeld, zijn er enige foutopsporingsgegevens te zien in de ant-console.

Verwante onderwerpen

Ant-taak Analyse
Ant-taak Bestanden genereren
API Use Ant Task
Ant-taak Analyserapport converteren
Ant-taak API-blokkeringsrapport converteren
Ant-taak API-depreciëring
Ant-taak API-depreciëringsrapport converteren
Ant-taak API-gebruiksrapport converteren