Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tycho-document-bundle-plugin tests depend on PATH #471

Closed
Bananeweizen opened this issue Jan 2, 2022 · 1 comment
Closed

tycho-document-bundle-plugin tests depend on PATH #471

Bananeweizen opened this issue Jan 2, 2022 · 1 comment
Milestone

Comments

@Bananeweizen
Copy link
Contributor

After lots of trial and error I've just found one reason for failing integration tests. The document-bundle-plugin tests run javadoc by just invoking the javadoc executable without using any path. Therefore whatever is first on the local PATH environment variable will be called. Since there are subtle differences between Java 8 (what I had on the path) and Java 11 Javadoc, the verification groovy script fails with some files not found, some files not matching content and finally even NoClassDefFoundError (for the Doclet).

What is a good way to avoid that? I can imagine these solutions:

  • Somehow get the toolchain definition from maven (how?) and use that path to create a FQN
  • verify the generated files to contain "Generated by javadoc (11" (which they have as HTML comment)

Any better ideas?

@laeubi
Copy link
Member

laeubi commented Jan 2, 2022

Maybe we can check how the maven-javadoc-plugin works?

Bananeweizen added a commit to Bananeweizen/tycho that referenced this issue Jan 2, 2022
Use also JAVA_HOME to find a suitable javadoc executable. That logic is
similar to what plexus JavacCompiler does.
@laeubi laeubi added this to the 2.7 milestone Jan 4, 2022
@Bananeweizen Bananeweizen modified the milestones: 2.7, 2.6 Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants