|
21 | 21 | * Tests that the content of a location matches the expectation
|
22 | 22 | */
|
23 | 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 |
| - } |
| 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 | + |
| 51 | + @Test |
| 52 | + public void testJettyWithInDependencies() throws Exception { |
| 53 | + ITargetLocation target = resolveMavenTarget( |
| 54 | + """ |
| 55 | + <location includeDependencyDepth="infinite" includeDependencyScopes="compile,provided,runtime" includeSource="false" label="Jetty" missingManifest="error" type="Maven"> |
| 56 | + <dependencies> |
| 57 | + <dependency> |
| 58 | + <groupId>org.eclipse.jetty.ee10.websocket</groupId> |
| 59 | + <artifactId>jetty-ee10-websocket-jakarta-server</artifactId> |
| 60 | + <version>12.0.9</version> |
| 61 | + <type>jar</type> |
| 62 | + </dependency> |
| 63 | + </dependencies> |
| 64 | + </location> |
| 65 | + """); |
| 66 | + assertStatusOk(getTargetStatus(target)); |
| 67 | + List<ExpectedBundle> expectedBundles = List.of(bundle("org.eclipse.jetty.ee10.plus", "12.0.9"), |
| 68 | + bundle("jakarta.enterprise.lang-model", "4.0.1"), bundle("jakarta.transaction-api", "2.0.1"), |
| 69 | + bundle("org.eclipse.jetty.http", "12.0.9"), bundle("slf4j.api", "2.0.12"), |
| 70 | + bundle("jakarta.servlet-api", "6.0.0"), bundle("org.eclipse.jetty.ee10.webapp", "12.0.9"), |
| 71 | + bundle("org.eclipse.jetty.io", "12.0.9"), bundle("org.eclipse.jetty.util", "12.0.9"), |
| 72 | + bundle("jakarta.websocket-api", "2.1.1"), bundle("org.eclipse.jetty.ee10.annotations", "12.0.9"), |
| 73 | + bundle("jakarta.annotation-api", "2.1.1"), bundle("org.eclipse.jetty.websocket.core.common", "12.0.9"), |
| 74 | + bundle("org.eclipse.jetty.jndi", "12.0.9"), bundle("org.eclipse.jetty.security", "12.0.9"), |
| 75 | + bundle("jakarta.enterprise.cdi-api", "4.0.1"), bundle("jakarta.websocket-client-api", "2.1.1"), |
| 76 | + bundle("org.eclipse.jetty.ee10.servlet", "12.0.9"), |
| 77 | + bundle("org.eclipse.jetty.websocket.core.client", "12.0.9"), bundle("org.objectweb.asm.tree", "9.7"), |
| 78 | + bundle("org.eclipse.jetty.ee10.websocket.jakarta.client", "12.0.9"), |
| 79 | + bundle("org.eclipse.jetty.server", "12.0.9"), bundle("jakarta.el-api", "5.0.0"), |
| 80 | + bundle("org.eclipse.jetty.ee10.websocket.jakarta.server", "12.0.9"), |
| 81 | + bundle("org.eclipse.jetty.ee10.websocket.servlet", "12.0.9"), |
| 82 | + bundle("org.eclipse.jetty.ee10.websocket.jakarta.common", "12.0.9"), |
| 83 | + bundle("org.eclipse.jetty.websocket.core.server", "12.0.9"), |
| 84 | + bundle("org.eclipse.jetty.client", "12.0.9"), bundle("org.eclipse.jetty.session", "12.0.9"), |
| 85 | + bundle("org.eclipse.jetty.ee", "12.0.9"), bundle("org.eclipse.jetty.plus", "12.0.9"), |
| 86 | + bundle("org.objectweb.asm.commons", "9.7"), bundle("jakarta.inject.jakarta.inject-api", "2.0.1"), |
| 87 | + bundle("org.eclipse.jetty.alpn.client", "12.0.9"), bundle("org.objectweb.asm", "9.7"), |
| 88 | + bundle("org.eclipse.jetty.xml", "12.0.9"), bundle("jakarta.interceptor-api", "2.1.0")); |
| 89 | + assertTargetBundles(target, expectedBundles); |
| 90 | + } |
50 | 91 | }
|
0 commit comments