LDAP-279: Fiddling with logging dependencies.
This commit is contained in:
@@ -108,7 +108,7 @@ def customizePom(pom, gradleProject) {
|
||||
version = '8.1.14.v20131031'
|
||||
configuration {
|
||||
webAppConfig {
|
||||
contextPath = projectName
|
||||
contextPath = "/" + projectName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
apply from: JAVA_SCRIPT
|
||||
apply plugin: 'war'
|
||||
apply plugin: 'jetty'
|
||||
apply from: SAMPLE_WAR_GRADLE
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-ldap-test'),
|
||||
'log4j:log4j:1.2.9',
|
||||
'javax.servlet:jstl:1.2',
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-webmvc:$springVersion"
|
||||
|
||||
provided "javax.servlet:servlet-api:2.5"
|
||||
|
||||
runtime 'ch.qos.logback:logback-classic:1.0.13'
|
||||
|
||||
testCompile "org.springframework:spring-test:$springVersion",
|
||||
"junit:junit:$junitVersion"
|
||||
}
|
||||
@@ -6,4 +6,4 @@ The core Spring application context of the sample is defined in resources/applic
|
||||
This ApplicationContext will start an in-process Apache Directory Server instance, automatically populated
|
||||
with some test data. The data will be reset every time the application is restarted.
|
||||
|
||||
To run the example, do 'gradle jettyRun', and then navigate to http://localhost:8080/spring-ldap-plain-sample
|
||||
To run the example, do `gradle jettyRun` or `mvn jetty:run`, and then navigate to `http://localhost:8080/spring-ldap-plain-sample`
|
||||
@@ -1,7 +0,0 @@
|
||||
log4j.rootCategory=INFO, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
log4j.logger.org.apache.directory=ERROR
|
||||
14
samples/odm/src/main/resources/logback.xml
Normal file
14
samples/odm/src/main/resources/logback.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are assigned the type
|
||||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -6,4 +6,4 @@ The core Spring application context of the sample is defined in resources/applic
|
||||
This ApplicationContext will start an in-process Apache Directory Server instance, automatically populated
|
||||
with some test data. The data will be reset every time the application is restarted.
|
||||
|
||||
To run the example, do 'gradle jettyRun', and then navigate to http://localhost:8080/spring-ldap-plain-sample
|
||||
To run the example, do `gradle jettyRun` or `mvn jetty:run`, and then navigate to `http://localhost:8080/spring-ldap-plain-sample`
|
||||
@@ -88,7 +88,7 @@
|
||||
<version>8.1.14.v20131031</version>
|
||||
<configuration>
|
||||
<webAppConfig>
|
||||
<contextPath>spring-ldap-user-admin-sample</contextPath>
|
||||
<contextPath>/spring-ldap-user-admin-sample</contextPath>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
</plugin>
|
||||
@@ -101,18 +101,18 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.0.13</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap-test</artifactId>
|
||||
<version>2.0.0.CI-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.0.13</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
|
||||
@@ -8,20 +8,26 @@ The core Spring application context of the sample is defined in resources/applic
|
||||
By default this ApplicationContext will start an in-process Apache Directory Server instance, automatically populated
|
||||
with some test data. The data will be reset every time the application is restarted.
|
||||
|
||||
To run the example, do 'gradle jettyRun', and then navigate to http://localhost:8080/spring-ldap-user-admin-sample
|
||||
To run the example, do `gradle jettyRun`, or `mvn jetty:run`, and then navigate to `http://localhost:8080/spring-ldap-user-admin-sample`
|
||||
|
||||
It is also possible to run this sample application against a remote LDAP server as opposed to starting an in-process
|
||||
LDAP server. To do this, use the following system properties:
|
||||
|
||||
* spring.profiles.active - set this to `no-apacheds` to prevent the in-process ApacheDs to be launched
|
||||
* sample.ldap.url - the URL of the target LDAP server
|
||||
* sample.ldap.userDn - principal to use for authentication against the LDAP server
|
||||
* sample.ldap.password - authentication password
|
||||
* sample.ldap.base - the directory root to use - note that by default all data under this node will be deleted and replaced with test data
|
||||
* sample.ldap.clean - set this property to false to *not* clear the root node
|
||||
* sample.ldap.directory.type - NORMAL or AD. Specify AD if running against Active Directory in order to enable some particular AD tweaks
|
||||
* `spring.profiles.active` - set this to `no-apacheds` to prevent the in-process ApacheDs to be launched
|
||||
* `sample.ldap.url` - the URL of the target LDAP server
|
||||
* `sample.ldap.userDn` - principal to use for authentication against the LDAP server
|
||||
* `sample.ldap.password` - authentication password
|
||||
* `sample.ldap.base` - the directory root to use - note that by default all data under this node will be deleted and replaced with test data
|
||||
* `sample.ldap.clean` - set this property to false to *not* clear the root node
|
||||
* `sample.ldap.directory.type` - NORMAL or AD. Specify AD if running against Active Directory in order to enable some particular AD tweaks
|
||||
|
||||
Example:
|
||||
`gradle jettyRun -Dspring.profiles.active=no-apacheds -Dsample.ldap.url=ldaps://127.0.0.1:636 -Dsample.ldap.userDn=CN=ldaptest,CN=Users,DC=261consulting,DC=local -Dsample.ldap.password=secret -Dsample.ldap.base=ou=test,dc=261consulting,dc=local -Dsample.ldap.directory.type=AD`
|
||||
`gradle jettyRun -Dspring.profiles.active=no-apacheds -Dsample.ldap.url=ldaps://127.0.0.1:636 \
|
||||
-Dsample.ldap.userDn=CN=ldaptest,CN=Users,DC=261consulting,DC=local -Dsample.ldap.password=secret \
|
||||
-Dsample.ldap.base=ou=test,dc=261consulting,dc=local -Dsample.ldap.directory.type=AD`
|
||||
|
||||
This sample includes Bootstrap - copyright 2013 Twitter, Inc; distributed under the Apache 2 License.
|
||||
`mvn jetty:run -Dspring.profiles.active=no-apacheds -Dsample.ldap.url=ldaps://127.0.0.1:636 \
|
||||
-Dsample.ldap.userDn=CN=ldaptest,CN=Users,DC=261consulting,DC=local -Dsample.ldap.password=secret \
|
||||
-Dsample.ldap.base=ou=test,dc=261consulting,dc=local -Dsample.ldap.directory.type=AD`
|
||||
|
||||
This sample uses Bootstrap to present a decent web design - copyright 2013 Twitter, Inc; distributed under the Apache 2 License.
|
||||
@@ -11,8 +11,12 @@ dependencies {
|
||||
"org.springframework:spring-core:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-test:$springVersion",
|
||||
"org.apache.directory.server:apacheds-all:1.5.5"
|
||||
"org.springframework:spring-test:$springVersion"
|
||||
|
||||
|
||||
compile("org.apache.directory.server:apacheds-all:1.5.5") {
|
||||
exclude group: "org.slf4j", module: "slf4j-api"
|
||||
}
|
||||
|
||||
provided "junit:junit:$junitVersion"
|
||||
}
|
||||
Reference in New Issue
Block a user