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

ApiAnalysisMojo fails with API error if build.properties has missing 'output.. = bin/' entry #3019

Closed
jukzi opened this issue Nov 8, 2023 · 9 comments

Comments

@jukzi
Copy link

jukzi commented Nov 8, 2023

Without "output.. = bin/" all builds fail

for example
eclipse-platform/eclipse.platform#841
eclipse-platform/eclipse.platform.ui#1286
eclipse-equinox/p2#382

@jukzi
Copy link
Author

jukzi commented Nov 8, 2023

probably caused by
#2996

@jukzi
Copy link
Author

jukzi commented Nov 8, 2023

@akurtakov can you please help?

@laeubi
Copy link
Member

laeubi commented Nov 8, 2023

@jukzi can you please link the documentation that shows that "default"?

I can't find any defaults described here:

https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Freference%2Fpde_feature_generating_build.htm

@laeubi laeubi changed the title All tycho build fail with API error if build.properties uses default output ApiAnalysisMojo fails with API error if build.properties has missing 'output.. = bin/' entry Nov 8, 2023
@jukzi
Copy link
Author

jukzi commented Nov 8, 2023

pde only creates the file and uses JDT to interpret the javaproject output. JDT then adds the default value.

@laeubi
Copy link
Member

laeubi commented Nov 8, 2023

Correct so there is no default, you could be happy that Tycho is not that strict here and always includes the default folder, because according to the spec a missing output.. = bin/ would mean the bundle should be empty == contain no classes at all.

@jukzi
Copy link
Author

jukzi commented Nov 8, 2023

In eclipse.jdt.debug\org.eclipse.jdt.debug\build.properties the workaround does not help
There is already a output.jdimodel.jar
Adding a output.. = bin/ would introduce a warning Redundant entry for output folder 'bin/'. It does not correspond to any source folder in 'source..' entry.

laeubi added a commit to laeubi/tycho that referenced this issue Nov 8, 2023
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 9, 2023
by "placing output.. = bin/" in build.properties
laeubi added a commit to laeubi/tycho that referenced this issue Nov 9, 2023
@laeubi
Copy link
Member

laeubi commented Nov 9, 2023

Adding a output.. = bin/ would introduce a warning Redundant entry for output folder 'bin/'. It does not correspond to any source folder in 'source..' entry.

this build configuration is just odd... what it does is putting everything from bin/ into a jdimodel.jar

output.jdimodel.jar = bin/

this jar then is used as the bundle content, if you look at the jar it looks like this:

grafik

No idea why one needs jdimodel.jar and can't put it directly in the bundle, searching for jdimodel.jar in java files did not reveal any usage where it might be used (and even if in such case the bundle itself could be used), but as it uses Eclipse-BundleShape: dir it seem to want extract it somehow on the file system (again, no clue why the bundle itself is not suitable here).

But in general it should work, so is there a minimal PR where one can see the problem?

@laeubi
Copy link
Member

laeubi commented Nov 9, 2023

The problem might be here that multiple source(jar) folders map to the same output folder, will investigate this.

laeubi added a commit to laeubi/tycho that referenced this issue Nov 9, 2023
Actually each source.<jar> should have a corresponding output.<jar> but
there are some cases where this is not true... lets cheat and look at
the classpath instead...

Fix eclipse-tycho#3019
@laeubi
Copy link
Member

laeubi commented Nov 9, 2023

I think the problem is that if there is no dedicated output folder for the jar Tycho uses the default output folder, that's a bit inconsistent but I'll se if I can even account for this.

laeubi added a commit that referenced this issue Nov 9, 2023
@laeubi laeubi closed this as completed in 8289287 Nov 9, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Nov 9, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Nov 9, 2023
Actually each source.<jar> should have a corresponding output.<jar> but
there are some cases where this is not true... lets cheat and look at
the classpath instead...

Fix eclipse-tycho#3019
laeubi added a commit that referenced this issue Nov 9, 2023
laeubi added a commit that referenced this issue Nov 9, 2023
Actually each source.<jar> should have a corresponding output.<jar> but
there are some cases where this is not true... lets cheat and look at
the classpath instead...

Fix #3019
fedejeanne added a commit to fedejeanne/eclipse.platform that referenced this issue Nov 16, 2023
sratz added a commit to eclipse-platform/eclipse.platform that referenced this issue Nov 20, 2023
fedejeanne added a commit to fedejeanne/eclipse.platform that referenced this issue Nov 22, 2023
iloveeclipse pushed a commit to eclipse-platform/eclipse.platform that referenced this issue Nov 23, 2023
iloveeclipse pushed a commit to eclipse-platform/eclipse.platform that referenced this issue Nov 23, 2023
iloveeclipse pushed a commit to eclipse-platform/eclipse.platform that referenced this issue Nov 23, 2023
Michael5601 pushed a commit to CodeLtDave/eclipse.platform that referenced this issue Feb 12, 2024
Michael5601 pushed a commit to CodeLtDave/eclipse.platform that referenced this issue Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants