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

Thanks a lot Igor for your prompt reply.

You mean the dependencies declared in the manifest of the test fragment?

Actually my test fragment project is named: pdt-eclipse-bundle-tests 

My plugin is named pdt-eclipse-bundle and contains the annotation processor that I am able to see when I launch it in a forked eclipse.

In the manifest of my test fragment I have declared:

Require-Bundle: org.junit,
 pgop-pdt-eclipse-bundle

I have also added pgop-pdt-eclipse-bundle as a pom dependency although I know it's not necessary.

Am i missing something? 

Thanks again,
Rawad

On Wed, Jan 25, 2012 at 9:29 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
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.

--
Regards,
Igor


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

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,
Rawad.


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Rawad.

Back to the top