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

Failure loading target platform with different hosted p2 repositories #2937

Closed
thahnen opened this issue Oct 18, 2023 · 4 comments
Closed

Failure loading target platform with different hosted p2 repositories #2937

thahnen opened this issue Oct 18, 2023 · 4 comments

Comments

@thahnen
Copy link
Contributor

thahnen commented Oct 18, 2023

TL;DR

When consuming a target platform in Tycho 4 (it was the same issue with Tycho 3) with a unit from a repository that returns a response in octet-stream format, the Maven build fails as it cannot work with that content type. In comparison, Eclipse can load it directly inside the IDE without any issue.

Expected behavior

The build succeeds like default for other units from a repository, no issue is thrown. This will be like having the same behavior inside the Eclipse IDE which can work nevertheless the response format.

Actual behavior

I was trying this with our SonarLint for Eclipse project, I've created a specific branch containing the following information. Both "states" mentioned below are different commits (the two recent ones) if someone wants to take a look themself!

I tried consuming the PyDev plug-in which is publishing its artifacts to GitHub as a release and to SourceForge. First I started with using GitHub as the repository as it seemed to be more convenient, doing so in Eclipse worked perfectly when refreshing and reloading the target platform (and when I installed the plug-in standalone and didn't consume it):

Target-Platform_GitHub

But when running our Maven build I got the following error (the last part is German but roughly translates to "content type is not allowed in the prologue"):

Tycho4-Error-Content-Type

Then I switched to using SourceForge as the repository and again, in Eclipse everything worked as expected including refreshing and reloading the target platform (and once again installing the plug-in standalone):

Target-Platform_SourceForge

This time the Maven build succeeded and threw no error regarding some response content type. In addition to that I've checked if there is any configuration missing but I found none and therefore assume this is a bug.

We consume the target platform in our pom.xml as follows:

<plugin>
  <groupId>org.eclipse.tycho</groupId>
  <artifactId>target-platform-configuration</artifactId>
  <configuration>
    <target>
      <!-- this one consumes another target platform containing changes I mentioned above -->
      <file>../target-platforms/build.target</file>
    </target>
    <environments>
      <!-- here are some environments, nothing fancy -->
    </environments>
  </configuration>
</plugin>

Edit 18.10.2023

Ping me when trying to fix the issue, I'd like to contribute if possible (and only for adding an integration test) 😄

@thahnen thahnen changed the title Failure on loading target platform with different p2 repository Failure loading target platform with different p2 repository Oct 18, 2023
@thahnen thahnen changed the title Failure loading target platform with different p2 repository Failure loading target platform with different hosted p2 repositories Oct 18, 2023
@thahnen
Copy link
Contributor Author

thahnen commented Oct 19, 2023

stacktrace.txt

@laeubi
Copy link
Member

laeubi commented Oct 21, 2023

@thahnen interesting issue, can you provide an integration-test to demonstrate the issue so we have a reproducer before working on a fix?

@laeubi
Copy link
Member

laeubi commented Oct 21, 2023

Might be the same issue as described here:

@thahnen
Copy link
Contributor Author

thahnen commented Oct 26, 2023

I'm not sure if it is the same issue, looks similar indeed. I'll provide a IT and then we can check if it is already fixed by the PR changes done for the issue you mentioned.

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