mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
13.21.2015 19ce4ef105e1929c42aaf5c86bc51f085ad4118a
OPENDJ-1777 Merged opendj-slf4j-adapter module into opendj-server-legacy in order to avoid cyclic dependencies

As a consequence:

* opendj-slf4j-adapter is no longer an artifact and must be packaged separately as a JAR
* update manifest class path plugin to support addition of JARs which are not artifacts
* simplify the ZIP assembly and include the SLF4J adapter.
4 files deleted
4 files renamed
4 files modified
752 ■■■■■ changed files
opendj-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateManifestClassPathMojo.java 11 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/pom.xml 35 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/opendj-archive-component.xml 51 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/slf4j/impl/StaticLoggerBinder.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/slf4j/impl/StaticMDCBinder.java 4 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/slf4j/impl/StaticMarkerBinder.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/slf4j/impl/package-info.java patch | view | raw | blame | history
opendj-slf4j-adapter/pom.xml 89 ●●●●● patch | view | raw | blame | history
opendj-slf4j-adapter/src/main/java/org/opends/server/loggers/OpenDJLoggerAdapter.java 463 ●●●●● patch | view | raw | blame | history
opendj-slf4j-adapter/src/main/java/org/opends/server/loggers/OpenDJLoggerFactory.java 62 ●●●●● patch | view | raw | blame | history
opendj-slf4j-adapter/src/main/java/org/opends/server/loggers/package-info.java 30 ●●●●● patch | view | raw | blame | history
pom.xml 1 ●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateManifestClassPathMojo.java
@@ -82,6 +82,12 @@
    private List<String> includes;
    /**
     * List of additional JARs to include in the classpath. Each item must be of format "file.jar".
     */
    @Parameter
    private List<String> additionalJars;
    /**
     * Name of product jar, e.g. "OpenDJ".
     */
    @Parameter
@@ -158,6 +164,11 @@
            }
            classpathItems.add(0, productJarName + ".jar");
        }
        // add additional JARs
        if (additionalJars != null) {
            classpathItems.addAll(additionalJars);
        }
        return classpathItems;
    }
opendj-server-legacy/pom.xml
@@ -94,17 +94,6 @@
    </dependency>
    <dependency>
      <groupId>org.forgerock.opendj</groupId>
      <artifactId>opendj-slf4j-adapter</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.forgerock.opendj</groupId>
          <artifactId>opendj3-server-dev</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.forgerock.opendj</groupId>
      <artifactId>opendj-config</artifactId>
      <version>${project.version}</version>
    </dependency>
@@ -376,6 +365,9 @@
              <excludes>
                <exclude>org.slf4j:slf4j-jdk14</exclude>
              </excludes>
              <additionalJars>
                 <additionalJar>opendj-slf4j-adapter.jar</additionalJar>
              </additionalJars>
            </configuration>
          </execution>
          <execution>
@@ -387,9 +379,6 @@
              <classPathProperty>classpath.bootstrap-client</classPathProperty>
              <productJarName>${shortProductName}</productJarName>
              <supportedLocales>${locales}</supportedLocales>
              <excludes>
                <exclude>org.forgerock.opendj:opendj-slf4j-adapter</exclude>
              </excludes>
            </configuration>
          </execution>
@@ -661,6 +650,22 @@
              </includes>
            </configuration>
          </execution>
          <!-- Package OpenDJ SL4J Logger Adapter jar -->
          <execution>
            <id>build-opendj-slf4j-adapter-jar</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <outputDirectory>${jars.dir}</outputDirectory>
              <finalName>opendj-slf4j-adapter</finalName>
              <includes>
                <include>**/org/slf4j/**</include>
                <include>**/org/opends/server/loggers/OpenDJLogger*</include>
              </includes>
            </configuration>
          </execution>
          <!-- Build localized jars (one per supported locale) -->
          <!-- (is there a way to avoid all these repeated executions ?) -->
          <execution>
@@ -852,6 +857,8 @@
                <exclude>**/*_pl.properties</exclude>
                <exclude>**/*_zh_CN.properties</exclude>
                <exclude>**/*_zh_TW.properties</exclude>
                <exclude>org/slf4j/**</exclude>
                <exclude>org/opends/server/loggers/OpenDJLogger*</exclude>
              </excludes>
              <archive>
                <addMavenDescriptor>false</addMavenDescriptor>
opendj-server-legacy/src/main/assembly/opendj-archive-component.xml
@@ -64,7 +64,7 @@
        <exclude>_*.sh</exclude>
        <exclude>*.bat</exclude>
      </excludes>
      <fileMode>755</fileMode>
      <fileMode>755</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
@@ -115,7 +115,7 @@
      <fileMode>755</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
    <!-- Adds Mac Info.plist files at the archive root -->
    <fileSet>
      <directory>${project.build.outputDirectory}</directory>
@@ -250,16 +250,9 @@
    <fileSet>
      <directory>${jars.dir}</directory>
      <outputDirectory>lib</outputDirectory>
      <includes>
        <include>${shortProductName}_*.jar</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>${jars.dir}</directory>
      <outputDirectory>lib</outputDirectory>
      <includes>
        <include>bootstrap*.jar</include>
      </includes>
      <excludes>
        <exclude>build-tools.jar</exclude>
      </excludes>
    </fileSet>
    <fileSet>
      <directory>.</directory>
@@ -269,37 +262,27 @@
      </excludes>
    </fileSet>
  </fileSets>
    <files>
        <!-- Adds logo png to root directory -->
        <file>
            <source>${basedir}/resource/images/opendj_logo.png</source>
            <outputDirectory></outputDirectory>
        </file>
        <!-- Main jar (OpenDJ) -->
  <files>
    <!-- Adds logo png to root directory -->
    <file>
      <source>${jars.dir}/${shortProductName}.jar</source>
      <outputDirectory>lib</outputDirectory>
      <source>${basedir}/resource/images/opendj_logo.png</source>
      <outputDirectory></outputDirectory>
    </file>
    <!-- quicksetup jar -->
    <!-- Adds buildinfo to configuration template/config -->
    <file>
      <source>${jars.dir}/quicksetup.jar</source>
      <outputDirectory>lib</outputDirectory>
    </file>
        <!-- Adds buildinfo to configuration template/config -->
    <file>
        <source>${project.build.outputDirectory}/META-INF/product/buildinfo</source>
        <outputDirectory>template/config</outputDirectory>
      <source>${project.build.outputDirectory}/META-INF/product/buildinfo</source>
      <outputDirectory>template/config</outputDirectory>
    </file>
    <!-- Adds base schema that may be used during the upgrade process -->
    <file>
        <source>${project.build.directory}/upgrade/schema.ldif.${buildRevision}</source>
        <outputDirectory>template/config/upgrade</outputDirectory>
      <source>${project.build.directory}/upgrade/schema.ldif.${buildRevision}</source>
      <outputDirectory>template/config/upgrade</outputDirectory>
    </file>
    <!-- Adds example-plugin.zip to root directory -->
    <file>
        <source>${project.build.directory}/example-plugin.zip</source>
        <outputDirectory></outputDirectory>
      <source>${project.build.directory}/example-plugin.zip</source>
      <outputDirectory></outputDirectory>
    </file>
    </files>
  </files>
</component>
opendj-server-legacy/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
File was renamed from opendj-slf4j-adapter/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -27,11 +27,10 @@
import org.opends.server.loggers.OpenDJLoggerFactory;
import org.slf4j.ILoggerFactory;
import org.slf4j.LoggerFactory;
import org.slf4j.spi.LoggerFactoryBinder;
/**
 * Binds {@link LoggerFactory} class with an instance of {@link ILoggerFactory}.
 * Binds {@link org.slf4j.LoggerFactory} class with an instance of {@link ILoggerFactory}.
 */
//@Checkstyle:off
public class StaticLoggerBinder implements LoggerFactoryBinder {
opendj-server-legacy/src/main/java/org/slf4j/impl/StaticMDCBinder.java
File was renamed from opendj-slf4j-adapter/src/main/java/org/slf4j/impl/StaticMDCBinder.java
@@ -25,13 +25,11 @@
 */
package org.slf4j.impl;
import org.slf4j.IMarkerFactory;
import org.slf4j.MarkerFactory;
import org.slf4j.helpers.BasicMDCAdapter;
import org.slf4j.spi.MDCAdapter;
/**
 * Binds {@link MarkerFactory} class with an instance of {@link IMarkerFactory}.
 * Binds {@link org.slf4j.MarkerFactory} class with an instance of {@link org.slf4j.IMarkerFactory}.
 */
//@Checkstyle:off
public class StaticMDCBinder {
opendj-server-legacy/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
File was renamed from opendj-slf4j-adapter/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
@@ -26,12 +26,11 @@
package org.slf4j.impl;
import org.slf4j.IMarkerFactory;
import org.slf4j.MarkerFactory;
import org.slf4j.helpers.BasicMarkerFactory;
import org.slf4j.spi.MarkerFactoryBinder;
/**
 * Binds {@link MarkerFactory} class with an instance of {@link IMarkerFactory}.
 * Binds {@link org.slf4j.MarkerFactory} class with an instance of {@link IMarkerFactory}.
 */
//@Checkstyle:off
public class StaticMarkerBinder implements MarkerFactoryBinder {
opendj-server-legacy/src/main/java/org/slf4j/impl/package-info.java
opendj-slf4j-adapter/pom.xml
File was deleted
opendj-slf4j-adapter/src/main/java/org/opends/server/loggers/OpenDJLoggerAdapter.java
File was deleted
opendj-slf4j-adapter/src/main/java/org/opends/server/loggers/OpenDJLoggerFactory.java
File was deleted
opendj-slf4j-adapter/src/main/java/org/opends/server/loggers/package-info.java
File was deleted
pom.xml
@@ -102,7 +102,6 @@
    <module>opendj-rest2ldap-servlet</module>
    <module>opendj-server</module>
    <module>opendj-server-example-plugin</module>
    <module>opendj-slf4j-adapter</module>
    <module>opendj-legacy</module>
    <module>opendj-server-legacy</module>
  </modules>