Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to use API tools in headless mode?
How to use API tools in headless mode? [message #46950] Fri, 13 February 2009 19:36 Go to next message
Zhongyu Zhang is currently offline Zhongyu ZhangFriend
Messages: 7
Registered: July 2009
Junior Member
Hello,

I am trying to get API analysis working on command line (batch mode), but
couldn't find any helpful document. I found this article
http://wiki.eclipse.org/index.php/PDE_UI_Incubator_ApiTools_ Compare but am
not sure it is valid. I could not find a way to get the API Tools dialogs
and don't know where is the "ApiTools" utility.

In the article
http://www.ibm.com/developerworks/opensource/library/os-ecli pse-api-tools/
the author mentioned that there is a way to run in headless mode but
didn't provide a link. He also mentioned Ant tasks in
org.eclipse.pde.api.tools plug-in. I found there are some apitooling.* Ant
tasks available in Preferences->Ant Runtime. But I couldn't make it work.

When I run apitooling.apitoolsverification task in ant, if I don't use
"taskdef" (it's supposed to work without taskdef) it complains "failed to
create task or type apitooling.apitoolsverification
Cause: The name is undefined.". If I add "taskdef", then it complains
"taskdef A class needed by class
org.eclipse.pde.api.tools.internal.tasks.APIToolsVerificatio nTask cannot
be found". Adding apitooling-ant.jar to the ant classpath doesn't help.

Probably I missed something here. Anyone has experience on API tools or
know how to use ant tasks provided by Eclipse? Some documents will help
too.

Thanks,
Zhongyu
Re: How to use API tools in headless mode? [message #47159 is a reply to message #46950] Mon, 16 February 2009 17:58 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Zhongyu Zhang wrote:
> Probably I missed something here. Anyone has experience on API tools or
> know how to use ant tasks provided by Eclipse? Some documents will help
> too.

Sure, we run API Tools heedlessly at Eclipse for our builds. The
documentation isn't available at help.eclipse.org because Galileo hasn't
been released yet and that release will contained updated documentation.
However, if you download say the Eclipse 3.5M5 build, you can see the
API Tooling Ant Tasks at:

Plug-in Development Environment Guide -> Reference -> API Tools and Ant
Tasks

Regarding your weird problems regarding missing taskdefs, I think you
have to ensure that the JRE you run your Ant tasks with is the same as
the running Eclipse. In the JRE tab of your Ant launch configuration,
there should be an option to use "Run in the same JRE as the workspace."
That should solve your problems.

Cheers,


Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: How to use API tools in headless mode? [message #47240 is a reply to message #47159] Tue, 17 February 2009 02:14 Go to previous message
Zhongyu Zhang is currently offline Zhongyu ZhangFriend
Messages: 7
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:

> However, if you download say the Eclipse 3.5M5 build, you can see the
> API Tooling Ant Tasks at:

> Plug-in Development Environment Guide -> Reference -> API Tools and Ant
> Tasks

Thank you very much for this information. I tried this build and it works.
I will read the document you mentioned about how to use these ant tasks. I
tried apitooling.analysis first and pointed it to a build of our
application. But it just report all of our plug-ins are non-API bundles
although we already set some with apiAnalysisNature. What step did I miss
here?

> Regarding your weird problems regarding missing taskdefs, I think you
> have to ensure that the JRE you run your Ant tasks with is the same as
> the running Eclipse. In the JRE tab of your Ant launch configuration,
> there should be an option to use "Run in the same JRE as the workspace."
> That should solve your problems.

I indeed missed this option in eclipse 3.4. But after I checked this
option, I only went a little further. Then I got this error

"build.34.xml:48: Could not unzip SDK into :
C:\DOCUME~1\zzhang\LOCALS~1\Temp\reference"

Do you know what is the problem?

Thank you very much,
Zhongyu
Re: How to use API tools in headless mode? [message #592055 is a reply to message #46950] Mon, 16 February 2009 17:58 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Zhongyu Zhang wrote:
> Probably I missed something here. Anyone has experience on API tools or
> know how to use ant tasks provided by Eclipse? Some documents will help
> too.

Sure, we run API Tools heedlessly at Eclipse for our builds. The
documentation isn't available at help.eclipse.org because Galileo hasn't
been released yet and that release will contained updated documentation.
However, if you download say the Eclipse 3.5M5 build, you can see the
API Tooling Ant Tasks at:

Plug-in Development Environment Guide -> Reference -> API Tools and Ant
Tasks

Regarding your weird problems regarding missing taskdefs, I think you
have to ensure that the JRE you run your Ant tasks with is the same as
the running Eclipse. In the JRE tab of your Ant launch configuration,
there should be an option to use "Run in the same JRE as the workspace."
That should solve your problems.

Cheers,


Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: How to use API tools in headless mode? [message #592067 is a reply to message #47159] Tue, 17 February 2009 02:14 Go to previous message
Zhongyu Zhang is currently offline Zhongyu ZhangFriend
Messages: 7
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:

> However, if you download say the Eclipse 3.5M5 build, you can see the
> API Tooling Ant Tasks at:

> Plug-in Development Environment Guide -> Reference -> API Tools and Ant
> Tasks

Thank you very much for this information. I tried this build and it works.
I will read the document you mentioned about how to use these ant tasks. I
tried apitooling.analysis first and pointed it to a build of our
application. But it just report all of our plug-ins are non-API bundles
although we already set some with apiAnalysisNature. What step did I miss
here?

> Regarding your weird problems regarding missing taskdefs, I think you
> have to ensure that the JRE you run your Ant tasks with is the same as
> the running Eclipse. In the JRE tab of your Ant launch configuration,
> there should be an option to use "Run in the same JRE as the workspace."
> That should solve your problems.

I indeed missed this option in eclipse 3.4. But after I checked this
option, I only went a little further. Then I got this error

"build.34.xml:48: Could not unzip SDK into :
C:\DOCUME~1\zzhang\LOCALS~1\Temp\reference"

Do you know what is the problem?

Thank you very much,
Zhongyu
Previous Topic:Create a filter rule in New Project Wizard
Next Topic:When is a plugin Editable?
Goto Forum:
  


Current Time: Mon Jun 14 07:05:28 GMT 2021

Powered by FUDForum. Page generated in 0.02089 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top