Search in sources :

Example 6 with IContentId

use of org.eclipse.dash.licenses.IContentId in project dash-licenses by eclipse.

the class MavenIdParserTests method testRetainQualifier2.

@Test
public void testRetainQualifier2() {
    IContentId value = parser.parseId("com.google.guava:guava:jar:28.0-jre:compile");
    assertEquals("28.0-jre", value.getVersion());
}
Also used : IContentId(org.eclipse.dash.licenses.IContentId) Test(org.junit.jupiter.api.Test)

Example 7 with IContentId

use of org.eclipse.dash.licenses.IContentId in project dash-licenses by eclipse.

the class MavenIdParserTests method testOrbitBundle.

@Test
public void testOrbitBundle() {
    IContentId value = parser.parseId("p2.eclipse-plugin:org.eclipse.core.jobs:jar:3.8.0.v20160509-0411");
    assertEquals("p2", value.getType());
    assertEquals("orbit", value.getSource());
    assertEquals("p2.eclipse-plugin", value.getNamespace());
    assertEquals("org.eclipse.core.jobs", value.getName());
    assertEquals("3.8.0.v20160509-0411", value.getVersion());
}
Also used : IContentId(org.eclipse.dash.licenses.IContentId) Test(org.junit.jupiter.api.Test)

Example 8 with IContentId

use of org.eclipse.dash.licenses.IContentId in project dash-licenses by eclipse.

the class MavenIdParserTests method testWithNestedJar.

/**
 * "p2.eclipse-plugin:org.jaxen:jar:lib/jaxen-1.1.6.jar:1.1.6.201804090728:system"
 * maps to maven/mavencentral/org.jaxen/jaxen/1.1.6
 */
@Disabled
@Test
public void testWithNestedJar() {
    IContentId value = parser.parseId("p2.eclipse-plugin:org.jaxen:jar:lib/jaxen-1.1.6.jar:1.1.6.201804090728:system");
    assertEquals("jaxen", value.getName());
    assertEquals("org.jaxen", value.getNamespace());
    assertEquals("1.1.6", value.getVersion());
    assertEquals("maven", value.getType());
    assertEquals("mavencentral", value.getSource());
}
Also used : IContentId(org.eclipse.dash.licenses.IContentId) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 9 with IContentId

use of org.eclipse.dash.licenses.IContentId in project dash-licenses by eclipse.

the class MavenIdParserTests method testWithVersionInNestedJar.

@Test
@Disabled
public void testWithVersionInNestedJar() {
    IContentId value = parser.parseId("p2.eclipse-plugin:org.eclipse.wst.jsdt.chromium:jar:lib/json_simple/json_simple-1.1.jar:0.5.200.v201610211901:system");
    assertEquals("p2", value.getType());
    assertEquals("orbit", value.getSource());
    assertEquals("org.eclipse.wst.jsdt.chromium", value.getNamespace());
    assertEquals("json_simple", value.getName());
    assertEquals("1.1", value.getVersion());
}
Also used : IContentId(org.eclipse.dash.licenses.IContentId) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 10 with IContentId

use of org.eclipse.dash.licenses.IContentId in project dash-licenses by eclipse.

the class MavenIdParserTests method testWithNonNumericVersionWithoutPhase.

@Test
public void testWithNonNumericVersionWithoutPhase() {
    IContentId value = parser.parseId("com.google.javascript:closure-compiler-externs:jar:v20160315");
    assertEquals("v20160315", value.getVersion());
}
Also used : IContentId(org.eclipse.dash.licenses.IContentId) Test(org.junit.jupiter.api.Test)

Aggregations

IContentId (org.eclipse.dash.licenses.IContentId)26 Test (org.junit.jupiter.api.Test)23 StringReader (java.io.StringReader)4 LicenseData (org.eclipse.dash.licenses.LicenseData)4 YarnLockFileReader (org.eclipse.dash.licenses.cli.YarnLockFileReader)3 Guice (com.google.inject.Guice)2 Injector (com.google.inject.Injector)2 File (java.io.File)2 FileOutputStream (java.io.FileOutputStream)2 InputStream (java.io.InputStream)2 OutputStream (java.io.OutputStream)2 StandardCharsets (java.nio.charset.StandardCharsets)2 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 List (java.util.List)2 ISettings (org.eclipse.dash.licenses.ISettings)2 LicenseChecker (org.eclipse.dash.licenses.LicenseChecker)2 PackageLockFileReader (org.eclipse.dash.licenses.cli.PackageLockFileReader)2 Disabled (org.junit.jupiter.api.Disabled)2 Json (jakarta.json.Json)1