Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Comparing successive versions of Arbitrary JAR's using API Tooling

> One (hopefully) last question I am now trying to move from analyzing
> the api of arbitrary jars to performing api-usage but my attempts at
> making use of the existing support for api-usage  are failing
> 
> Approach 1:
> Environment: Eclipse 3.5.1 and ANT 1.7:
> 
> Extending your example. I now have b1 and b2 as plugin projects in my
> workspace following which:
> a) I created new plugin project c1 (in the same workspace) that has b1.
> b) Created code in c1 that made use of the b1 api. Thus requiring b1
> to be added as a required plugin in the manifest/plugin.xml
> b) I exported c1 to a local directory packing the bundle as a jar
> c) created an ANT task making use of apitooling.apiuse to report
> instances of b1 api usage within the c1 plugin.
> 
> The ant task is as follows (wherein /c1/plugins and /b1/plugins
> contained the jar'd bundles):
> 
>        <apitooling.apiuse
>             baseline="/b1"
>       scope="/c1"
>           proceedonerror="true"
>             report="/reportHome"
>             considerinternal="true"
>             considerapi="true"
>             debug="true"
>         />

Using Eclipse 3.6, the task should look like this:


        <apitooling.apiuse
                debug="true"
                considerapi="true"
                considerinternal="true"
                location="c:\temp\b1"
                report="c:\temp\report"
                scopepattern="d\.e\.f\..*"
        />

You need to point to a "location", which is the location of a directory 
containing an install ("plugins" directory). The "scopepattern" attribute 
specifies a regular expression for bundles to search. In the example above 
bundles matching "d.e.f*" will be searched. Note the use of slashes to 
escape '.'.

However, unless you need to use Ant tasks in 3.6, I would suggest using 
the External Tools UI.

Darin



Back to the top