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

Gaetan Boismal
06.18.2015 34df431587b9ad32bb2759d6d130533793d32550
OPENDJ-2388 Add opendj-dsml-servlet module

Pull Request #133
Moves the DSML servlet resources from opendj-server-legacy in a separate
module.
Removes DSML artefact from opendj-server-legacy/pom.xml
Creates a new war module which generates the DSML gateway.
Removes useless jee.jar in dsml resources.
Creates THIRDPARTYREADME specific for the DSML gateway.
2 files deleted
2 files added
16 files renamed
3 files modified
563 ■■■■■ changed files
opendj-dsml-servlet/legal-notices/THIRDPARTYREADME.txt 34 ●●●●● patch | view | raw | blame | history
opendj-dsml-servlet/pom.xml 313 ●●●●● patch | view | raw | blame | history
opendj-dsml-servlet/resources/schema/DSMLv2.xsd patch | view | raw | blame | history
opendj-dsml-servlet/resources/schema/bindings.xjb patch | view | raw | blame | history
opendj-dsml-servlet/resources/webapp/sun-web.xml patch | view | raw | blame | history
opendj-dsml-servlet/resources/webapp/web.xml patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ByteStringUtility.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAbandonOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAddOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLCompareOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLDeleteOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLExtendedOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyDNOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ResultCodeFactory.java patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/package-info.java patch | view | raw | blame | history
opendj-server-legacy/pom.xml 73 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/dsml/lib/j2ee.jar patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/dsml-war-assembly.xml 100 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java 40 ●●●●● patch | view | raw | blame | history
pom.xml 3 ●●●●● patch | view | raw | blame | history
opendj-dsml-servlet/legal-notices/THIRDPARTYREADME.txt
New file
@@ -0,0 +1,34 @@
DO NOT TRANSLATE OR LOCALIZE
***************************************************************************
The MIT License (MIT)
***************************************************************************
Version: slf4j-api.jar (1.7.5)
Copyright: Copyright (c) 2004-2011 QOS.ch. All rights reserved.
==================
Full license text:
==================
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
opendj-dsml-servlet/pom.xml
New file
@@ -0,0 +1,313 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at
  ! legal-notices/CDDLv1_0.txt.  If applicable,
  ! add the following below this CDDL HEADER, with the fields enclosed
  ! by brackets "[]" replaced with your own identifying information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !      Copyright 2015 ForgeRock AS.
  !
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.forgerock.opendj</groupId>
        <artifactId>opendj-server-parent</artifactId>
        <version>3.0.0-SNAPSHOT</version>
    </parent>
    <artifactId>opendj-dsml-servlet</artifactId>
    <name>OpenDJ DSML Gateway</name>
    <description>OpenDJ DSML Gateway</description>
    <packaging>war</packaging>
    <properties>
    </properties>
    <dependencies>
        <!-- External dependencies -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <!-- ForgeRock librairies -->
        <dependency>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>forgerock-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>i18n-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>i18n-slf4j</artifactId>
        </dependency>
        <!-- OpenDJ SDK dependencies -->
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-cli</artifactId>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-core</artifactId>
        </dependency>
        <!-- OpenDJ Server dependencies -->
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <type>jar</type>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>ca_ES</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>de</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>es</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>fr</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>ja</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>ko</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>pl</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>zh_CN</classifier>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <classifier>zh_TW</classifier>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- Parse version to generate properties (major.version, minor.version, ...) -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>parse-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Ensure that our usage of the jaxb2-maven-plugin is JDK 8 compatible -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <executions>
                    <execution>
                        <id>set-additional-system-properties</id>
                        <goals>
                            <goal>set-system-properties</goal>
                        </goals>
                        <configuration>
                            <properties>
                                <property>
                                    <name>javax.xml.accessExternalSchema</name>
                                    <value>all</value>
                                </property>
                            </properties>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Generate DSML code from XML files -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>prepare-dsml-library</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/gen</outputDirectory>
                            <schemaDirectory>${basedir}/resources/schema</schemaDirectory>
                            <schemaFiles>DSMLv2.xsd</schemaFiles>
                            <packageName>org.opends.dsml.protocol</packageName>
                            <bindingDirectory>${basedir}/resources/schema</bindingDirectory>
                            <bindingFiles>bindings.xjb</bindingFiles>
                            <target>2.1</target>
                            <npa>true</npa>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- WAR artefact is build by the assembly plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <warName>${product.name}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-DSML</warName>
                    <webResources>
                        <!-- Include CDDLv1_0.txt and binary license file (if exists) -->
                        <resource>
                            <targetPath>WEB-INF/legal-notices</targetPath>
                            <directory>${basedir}/../legal-notices</directory>
                            <excludes>
                                <exclude>README.txt</exclude>
                            </excludes>
                        </resource>
                        <!-- Include THIRDPARTYREADME.txt -->
                        <resource>
                            <targetPath>WEB-INF/legal-notices</targetPath>
                            <directory>legal-notices</directory>
                            <includes>
                                <include>THIRDPARTYREADME.txt</include>
                            </includes>
                        </resource>
                        <!-- Add web and sun-web.xml -->
                        <resource>
                            <targetPath>WEB-INF</targetPath>
                            <directory>resources/webapp</directory>
                        </resource>
                        <!-- Add schema file -->
                        <resource>
                            <targetPath>WEB-INF/classes/resources</targetPath>
                            <directory>${basedir}/resources/schema</directory>
                            <includes>
                                <include>DSMLv2.xsd</include>
                            </includes>
                        </resource>
                    </webResources>
                    <!-- Excludes transitive dependencies -->
                    <packagingExcludes>
                        WEB-INF/lib/activation-*.jar,
                        WEB-INF/lib/chf-*.jar,
                        WEB-INF/lib/forgerock-persistit*.jar,
                        WEB-INF/lib/grizzly-*.jar,
                        WEB-INF/lib/jackson-*.jar,
                        WEB-INF/lib/javax*.jar,
                        WEB-INF/lib/je*.jar,
                        WEB-INF/lib/json-*.jar,
                        WEB-INF/lib/opendj-grizzly*.jar,
                        WEB-INF/lib/opendj-rest2ldap*.jar,
                        WEB-INF/lib/opendj-server-${project.version}*.jar
                    </packagingExcludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
    <!--
       Profile to run precommit tasks: checkstyle, copyright (TODO), SVN eol check (TODO),
       unit-tests
       Tests are not run by default due to running time (average of 8-10 minutes).
    -->
        <profile>
            <id>precommit</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>2.14</version>
                        <executions>
                            <!-- Disable default from parent -->
                            <execution>
                                <id>check-src-and-tests</id>
                                <phase>none</phase>
                                <goals>
                                    <goal>checkstyle</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
opendj-dsml-servlet/resources/schema/DSMLv2.xsd
opendj-dsml-servlet/resources/schema/bindings.xjb
opendj-dsml-servlet/resources/webapp/sun-web.xml
opendj-dsml-servlet/resources/webapp/web.xml
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ByteStringUtility.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAbandonOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAddOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLCompareOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLDeleteOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLExtendedOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyDNOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ResultCodeFactory.java
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/package-info.java
opendj-server-legacy/pom.xml
@@ -306,30 +306,6 @@
    </pluginManagement>
    <plugins>
      <plugin>
        <!-- Ensure that our usage of the jaxb2-maven-plugin is JDK 8 compatible -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.0-alpha-2</version>
        <configuration>
          <properties>
            <property>
              <name>javax.xml.accessExternalSchema</name>
              <value>all</value>
            </property>
          </properties>
        </configuration>
        <executions>
          <execution>
            <id>set-additional-system-properties</id>
            <goals>
              <goal>set-system-properties</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Clean classes generated outside the build directory -->
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
@@ -596,7 +572,6 @@
                <source>src/messages/src</source>
                <source>src/admin/generated</source>
                <source>src/build-tools</source>
                <source>src/dsml</source>
                <source>${project.build.directory}/java-stubs</source>
              </sources>
            </configuration>
@@ -1005,7 +980,6 @@
                <exclude>java-stubs/**</exclude>
                <exclude>bootstrap/**</exclude>
                <exclude>META-INF/**</exclude>
                <exclude>org/opends/dsml/**</exclude>
                <exclude>**/*_ca_ES.properties</exclude>
                <exclude>**/*_de.properties</exclude>
                <exclude>**/*_es.properties</exclude>
@@ -1074,26 +1048,6 @@
              </archive>
            </configuration>
          </execution>
          <!-- Package DSML war -->
          <execution>
            <id>build-dsml-war</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <finalName>${product.name}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-DSML</finalName>
              <outputDirectory>${project.build.directory}/package</outputDirectory>
              <appendAssemblyId>false</appendAssemblyId>
              <addMavenDescriptor>false</addMavenDescriptor>
              <descriptors>
                <descriptor>src/main/assembly/dsml-war-assembly.xml</descriptor>
              </descriptors>
              <formats>
                <format>war</format>
              </formats>
            </configuration>
          </execution>
        </executions>
      </plugin>
@@ -1204,31 +1158,6 @@
        </configuration>
      </plugin>
      <!-- Generate DSML code from XML files -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jaxb2-maven-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>prepare-dsml-library</id>
            <goals>
              <goal>xjc</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/dsml/gen</outputDirectory>
              <schemaDirectory>${basedir}/resource/dsml/schema</schemaDirectory>
              <schemaFiles>DSMLv2.xsd</schemaFiles>
              <packageName>org.opends.dsml.protocol</packageName>
              <bindingDirectory>${basedir}/resource/dsml/schema</bindingDirectory>
              <bindingFiles>bindings.xjb</bindingFiles>
              <target>2.1</target>
              <npa>true</npa>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
@@ -1268,7 +1197,7 @@
              <execution>
                <id>check-src-and-tests-alternative</id>
                <configuration>
                  <excludes>generated/org/opends/server/snmp/**,org/opends/messages/**,**/server/admin/std/**,**/config/meta/**,**/config/client/**,**/config/server/**,**/dsml/protocol/**</excludes>
                  <excludes>generated/org/opends/server/snmp/**,org/opends/messages/**,**/server/admin/std/**,**/config/meta/**,**/config/client/**,**/config/server/**</excludes>
                  <configLocation>${project.build.outputDirectory}/org/forgerock/checkstyle/opends-checkstyle.xml</configLocation>
                  <headerLocation>${project.build.outputDirectory}/org/forgerock/checkstyle/opendj.sourceheader</headerLocation>
                  <suppressionsLocation>${project.build.outputDirectory}/org/forgerock/checkstyle/unit-test-suppressions.xml</suppressionsLocation>
opendj-server-legacy/resource/dsml/lib/j2ee.jar
Binary files differ
opendj-server-legacy/src/main/assembly/dsml-war-assembly.xml
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java
@@ -149,31 +149,6 @@
  /**
   * Retrieves a set of File objects that point to directories that contain
   * DSML gateway source.
   *
   * @return  A set of File objects that point to directories that contain
   *          DSML gateway source.
   */
  @DataProvider(name = "dsmlSourceDirectories")
  public Object[][] getDSMLSourceDirectories()
  {
    File dsmlSourceRoot = new File(sourceRoot, "dsml");
    ArrayList<File> sourceDirs = new ArrayList<>();
    getSourceDirectories(dsmlSourceRoot, sourceDirs);
    Object[][] returnArray = new Object[sourceDirs.size()][1];
    for (int i=0; i < returnArray.length; i++)
    {
      returnArray[i][0] = sourceDirs.get(i);
    }
    return returnArray;
  }
  /**
   * Retrieves a set of File objects that point to directories that contain
   * GUI tools source.
   *
   * @return  A set of File objects that point to directories that contain
@@ -329,21 +304,6 @@
  /**
   * Ensure that all DSML gateway source file packages include a
   * package-info.java file.
   *
   * @param  sourceDirectory  The directory for which to make the determination.
   */
  @Test(dataProvider="dsmlSourceDirectories")
  public void testDSMLPackageInfoExists(File sourceDirectory)
         throws Exception
  {
    checkPackageInfoFileExistsInternal(sourceDirectory);
  }
  /**
   * Ensure that all GUI tools source file packages include a package-info.java
   * file.
   *
pom.xml
@@ -90,6 +90,7 @@
      <url>${siteDistributionURL}</url>
    </site>
  </distributionManagement>
  <modules>
    <module>opendj-maven-plugin</module>
    <module>opendj-config</module>
@@ -98,7 +99,9 @@
    <module>opendj-server-example-plugin</module>
    <module>opendj-legacy</module>
    <module>opendj-server-legacy</module>
    <module>opendj-dsml-servlet</module>
  </modules>
  <properties>
    <mavenRepoSnapshots>http://maven.forgerock.org/repo/snapshots</mavenRepoSnapshots>
    <mavenRepoReleases>http://maven.forgerock.org/repo/releases</mavenRepoReleases>