Add core to build

Issue gh-610
This commit is contained in:
Josh Cummings
2022-01-13 16:08:07 -07:00
parent e3b1d16fd5
commit 320fce68c7
6 changed files with 25 additions and 9 deletions

View File

@@ -19,6 +19,8 @@ dependencies {
implementation "org.springframework:spring-tx"
implementation "org.slf4j:slf4j-api"
provided "com.sun:ldapbp:1.0"
optional "org.springframework:spring-context"
optional "org.springframework:spring-jdbc"
optional "org.springframework:spring-orm"
@@ -28,7 +30,8 @@ dependencies {
optional "org.apache.commons:commons-pool2"
implementation 'jakarta.xml.bind:jakarta.xml.bind-api'
provided "com.sun:ldapbp:1.0"
testImplementation platform('org.junit:junit-bom')
testImplementation "org.junit.vintage:junit-vintage-engine"
testImplementation "junit:junit"
testImplementation "commons-lang:commons-lang"
@@ -37,4 +40,17 @@ dependencies {
testImplementation "org.mockito:mockito-inline"
testImplementation "org.springframework:spring-test"
testImplementation "org.assertj:assertj-core"
testImplementation "com.unboundid:unboundid-ldapsdk"
}
compileTestJava {
doFirst {
options.compilerArgs = [
'--add-exports', 'java.naming/com.sun.jndi.ldap=ALL-UNNAMED'
]
}
}
test {
jvmArgs '--add-exports', 'java.naming/com.sun.jndi.ldap=ALL-UNNAMED'
}

View File

@@ -15,8 +15,7 @@
*/
package org.springframework.ldap.control;
import com.sun.jndi.ldap.ctl.PagedResultsControl;
import javax.naming.ldap.PagedResultsControl;
import java.util.Arrays;
/**

View File

@@ -37,7 +37,7 @@ public class PagedResultsDirContextProcessorTest {
private LdapContext ldapContextMock;
private PagedResultsDirContextProcessor tested;
private PagedResultsDirContextProcessor tested;
@Before
public void setUp() throws Exception {
@@ -101,7 +101,7 @@ public class PagedResultsDirContextProcessorTest {
byte[] value = new byte[1];
value[0] = pageSize;
byte[] cookie = encodeDirSyncValue(resultSize, value);
// Using another response control to verify that it is ignored
DirSyncResponseControl control = new DirSyncResponseControl(
"dummy", true, cookie);
@@ -132,7 +132,7 @@ public class PagedResultsDirContextProcessorTest {
value[0] = 8;
int pageSize = 20;
byte[] cookie = encodeValue(pageSize, value);
BerDecoder ber = new BerDecoder(cookie, 0, cookie.length);
ber.parseSeq(null);

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.ldap.control;
import com.sun.jndi.ldap.ctl.SortControl;
import javax.naming.ldap.SortControl;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

View File

@@ -34,14 +34,14 @@ import static org.mockito.Mockito.when;
/**
* Unit tests for the SortControlDirContextProcessor class.
*
*
* @author Ulrik Sandberg
*/
public class SortControlDirContextProcessorTest {
private LdapContext ldapContextMock;
private SortControlDirContextProcessor tested;
private SortControlDirContextProcessor tested;
@Before
public void setUp() throws Exception {

View File

@@ -19,6 +19,7 @@ dependencies {
api platform("io.rsocket:rsocket-bom:1.1.1")
api platform("org.springframework.data:spring-data-bom:2022.1.0-SNAPSHOT")
api platform("com.fasterxml.jackson:jackson-bom:2.13.0")
api platform("org.junit:junit-bom:5.8.1")
constraints {
api "com.querydsl:querydsl-core:$queryDslVersion"
api "com.querydsl:querydsl-apt:$queryDslVersion"