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

Target platform resolution fails with certain Maven artifacts #1622

Open
rbioteau opened this issue Dec 14, 2023 · 5 comments
Open

Target platform resolution fails with certain Maven artifacts #1622

rbioteau opened this issue Dec 14, 2023 · 5 comments

Comments

@rbioteau
Copy link
Contributor

An error occurs in the latest version of the m2e PDE integration when resolving the following target platform file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="maven">
	<locations>
		<location includeDependencyDepth="infinite" includeDependencyScopes="compile" missingManifest="generate" type="Maven">
			<dependencies>
				<dependency>
					<groupId>commons-io</groupId>
					<artifactId>commons-io</artifactId>
					<version>2.15.1</version>
					<type>jar</type>
				</dependency>
			</dependencies>
		</location>
		<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
			<repository location="https://download.eclipse.org/eclipse/updates/4.30/"/>
			<unit id="org.eclipse.jdt.feature.group" version="3.19.300.v20231201-0110"/>
		</location>
	</locations>
</target>
Problems occurred while resolving the target contents
	An error occurred while collecting items to be installed
		No repository found containing: osgi.bundle,org.apache.commons.commons-io,2.15.1
		session context was:(profile=TARGET_DEFINITION:resource:/my-tp/maven.target, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

This looks like a regression from previous version. This error does not occur with Tycho 4.0.4.

@akurtakov
Copy link
Contributor

There is similar complain from @rgrunber at eclipse-jdtls/eclipse.jdt.ls#2998 which I can't reproduce.
@laeubi Any idea what could be going wrong?

@laeubi
Copy link
Member

laeubi commented Dec 14, 2023

This looks like a regression from previous version.

Can you try to replicate the behavior with:

https://github.com/eclipse-m2e/m2e-core/tree/master/org.eclipse.m2e.pde.target.tests/src/org/eclipse/m2e/pde/target/tests

this are the ones we also share with Tycho to ensure m2e and Tycho work (mostly) the same.

@laeubi
Copy link
Member

laeubi commented Dec 14, 2023

There is similar complain from @rgrunber at eclipse-jdtls/eclipse.jdt.ls#2998 which I can't reproduce.

Also please note that MIXING maven targets + and site targets where one shadow the other might suffer from this bug recently fixed in PDE:

@vhemery
Copy link

vhemery commented Dec 20, 2023

I can confirm it as a duplicate of eclipse-pde/eclipse.pde#874
(Romain & I work together on the same project)

The target platform that fails has:

  • org.apache.commons.commons-io P2 plugin

  • commons-io:commons-io maven plugin shadowed

  • org.jdom2 P2 plugin

  • org.jdom:jdom2 maven plugin shadowed

I've opened it with a snaphot IDE from https://download.eclipse.org/eclipse/downloads/drops4/I20231218-1800/ and, after adding the m2e integration, the target platform is correctly resolved. So it should be fixed in 2024-03.

Meantime, as a workaround, commenting the maven plugin out from the target platform also works, since only the P2 plugins are left then.

@jcompagner
Copy link

ah so this is a problem because of the target platform through the sites already includes this?
because i also now have it for slf4j-api
(besides the commons-io described above)

But i guess i can just remove them from the current mvn target because they should come from the other eclipse "normal" p2 sites i guess

By the way this is for me just a target file editor problem, tycho works fine with it and the stupid thing is if i quickly change it through the mvn editor of the target file so commons io back to 2.15.0 and then quickly back to 2.15.1 i can use the target..

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

5 participants