Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Make Jersey's custom JavaDoc doclet ResourceDoclet Tycho-aware

Generally, Tycho is expected to inject bundle dependencies back into
maven model as <dependency> elements. This does not happen for
dependencies with nested jars, but otherwise this should just work. If
you can provide a small standalone example that shows the problem, I can
have a quick look to see what's going on exactly.

--
Regards,
Igor

On 2013-06-06 7:27 AM, Gunnar Wagenknecht wrote:
Hi,

I'm looking for some guidelines/best practices in order to make a custom
doclet aware of a Tycho computed dependency tree for a project.

My use-case is to integrate the Jersey ResourceDoclet into a Tycho
build. That works mostly. However, some of the classes processed by
ResourceDoclet references classes from other bundles. It seems that the
Jersey ResourceDoclet isn't capable of loading them.

[WARNING] ...ResourceDoclet getSerializedLinkFromTag
[WARNING] INFO: Have classloader: class java.net.URLClassLoader
[WARNING] ...ResourceDoclet getSerializedLinkFromTag
[WARNING] INFO: Have thread classloader class
com.sun.jersey.wadl.resourcedoc.ResourceDoclet$Loader
[WARNING] ...ResourceDoclet getSerializedLinkFromTag
[WARNING] INFO: Have system classloader class
sun.misc.Launcher$AppClassLoader
[WARNING] ...ResourceDoclet getSerializedLinkFromTag
[WARNING] SEVERE: Could not get field ...Examples.SAMPLE_ERROR
[WARNING] java.lang.ClassNotFoundException: ....RestExamples
[WARNING] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[WARNING] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[WARNING] at java.security.AccessController.doPrivileged(Native Method)
[WARNING] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[WARNING] at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
[WARNING] at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
[WARNING] at java.lang.Class.forName0(Native Method)
[WARNING] at java.lang.Class.forName(Class.java:266)
[WARNING] at
com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedLinkFromTag(ResourceDoclet.java:515)



I have two options now. Either I patch ResourceDoclet to make it aware
of a Tycho-Maven computed classpath of the project it runs in or I
somehow confince Tycho to dump the computed project classpath as a
string variable which I could pass via -classpath option to the
ResourceDoclet.

Is that possible?

Thanks,
Gunnar



Back to the top