[
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
|
Hi Igor,
My actual bundle has the dependency to jdt/apt support in the Manifest.
Since my test bundle depends on my bundle I assumed it would see them too. Should I re-declare the specified bundles in my test bundle too? If yes, where? In the manifest or the tycho-surefire-plugin configuration section?
Thanks,
Rawad
On Wed, Jan 25, 2012 at 9:44 PM, Igor Fedorenko
<igor@xxxxxxxxxxxxxx> wrote:
Does your test bundle directly or indirectly depend on jdt/apt support
bundles?
--
Regards,
Igor
On 12-01-25 2:40 PM, rawad assaf wrote:
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
<mailto:
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 <mailto:tycho-user@xxxxxxxxxxx>
https://dev.eclipse.org/__mailman/listinfo/tycho-user
<https://dev.eclipse.org/mailman/listinfo/tycho-user>
_________________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
https://dev.eclipse.org/__mailman/listinfo/tycho-user
<https://dev.eclipse.org/mailman/listinfo/tycho-user>
--
--
Rawad.