Skip to content

Commit 92a6765

Browse files
committed
Add testcase to check managed transitive dependencies
Signed-off-by: Christoph Läubrich <[email protected]>
1 parent 294e168 commit 92a6765

File tree

2 files changed

+50
-29
lines changed

2 files changed

+50
-29
lines changed

org.eclipse.m2e.pde.target.tests/src/org/eclipse/m2e/pde/target/tests/IncludedContentTest.java

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 Christoph Läubrich and others
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License 2.0 which is available at
6+
* https://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* Christoph Läubrich - initial API and implementation
12+
*******************************************************************************/
13+
package org.eclipse.m2e.pde.target.tests;
14+
15+
import java.util.List;
16+
17+
import org.eclipse.pde.core.target.ITargetLocation;
18+
import org.junit.Test;
19+
20+
/**
21+
* Tests that the content of a location matches the expectation
22+
*/
23+
public class MavenContentTest extends AbstractMavenTargetTest {
24+
@Test
25+
public void testIncludeProvidedInfinite() throws Exception {
26+
ITargetLocation target = resolveMavenTarget(
27+
"""
28+
<location includeDependencyDepth="infinite" includeDependencyScopes="provided" includeSource="false" missingManifest="ignore" type="Maven">
29+
<dependencies>
30+
<dependency>
31+
<groupId>org.osgi</groupId>
32+
<artifactId>org.osgi.test.common</artifactId>
33+
<version>1.3.0</version>
34+
<type>jar</type>
35+
</dependency>
36+
</dependencies>
37+
</location>
38+
""");
39+
assertStatusOk(getTargetStatus(target));
40+
List<ExpectedBundle> expectedBundles = List.of( //
41+
originalOSGiBundle("osgi.annotation", "8.1.0.202202082230", "org.osgi:osgi.annotation", "8.1.0"),
42+
originalOSGiBundle("org.osgi.util.tracker", "1.5.4.202109301733", "org.osgi:org.osgi.util.tracker",
43+
"1.5.4"),
44+
originalOSGiBundle("org.osgi.test.common", "1.3.0", "org.osgi:org.osgi.test.common"),
45+
originalOSGiBundle("org.osgi.dto", "1.0.0.201505202023", "org.osgi:org.osgi.dto", "1.0.0"),
46+
originalOSGiBundle("org.osgi.framework", "1.8.0.201505202023", "org.osgi:org.osgi.framework", "1.8.0"),
47+
originalOSGiBundle("org.osgi.resource", "1.0.0.201505202023", "org.osgi:org.osgi.resource", "1.0.0"));
48+
assertTargetBundles(target, expectedBundles);
49+
}
50+
}

0 commit comments

Comments
 (0)