Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Unable to test Plugin using Custom Annotation Processor

Most likely your test bundle does not properly declare all dependencies
and either annotations processor or some of its dependencies are
missing. This works in PDE because it blindly includes in the test
runtime every bundle from workspace and workspace target platform. Tycho
only includes direct and indirect dependencies of the test bundle.


On 12-01-25 2:20 PM, rawad assaf wrote:

I am trying to use "tycho-surefire-plugin" to test a plugin I have written.

In a nutshell, the plugin takes the Xml output of an annotation
processor and displays its content in the "Problems" view.

To test this, I need to make sure that the annotation processor is
activated on the Projects created in the test. This is done with the
following code:

IJavaProject javaProject = ....
org.eclipse.jdt.apt.core.util.AptConfig.setEnabled(javaProject, true);

The problem is the following. When I launch the test I wrote through the
Eclipse Launcher, everything works perfectly and the annotation
processor generates the Xml file.

On the other, when I launch the test through the maven command line the
Xml file is not generated and the annotation processor is never inoked.

Do you have any ideas how I can proceed to solve this problem? Don't
hesitate to ask me if I need to include more info.

Thanks a lot,

tycho-user mailing list

Back to the top