From 34df431587b9ad32bb2759d6d130533793d32550 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Tue, 10 Nov 2015 16:45:33 +0000
Subject: [PATCH] OPENDJ-2388 Add opendj-dsml-servlet module

---
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyDNOperation.java |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java   |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java           |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/package-info.java          |    0 
 opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java    |   40 ----
 pom.xml                                                                               |    3 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ByteStringUtility.java     |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLDeleteOperation.java   |    0 
 /dev/null                                                                             |  100 ----------
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAbandonOperation.java  |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyOperation.java   |    0 
 opendj-dsml-servlet/pom.xml                                                           |  313 +++++++++++++++++++++++++++++++
 opendj-server-legacy/pom.xml                                                          |   73 -------
 opendj-dsml-servlet/resources/webapp/web.xml                                          |    0 
 opendj-dsml-servlet/resources/schema/bindings.xjb                                     |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLCompareOperation.java  |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAddOperation.java      |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ResultCodeFactory.java     |    0 
 opendj-dsml-servlet/legal-notices/THIRDPARTYREADME.txt                                |   34 +++
 opendj-dsml-servlet/resources/schema/DSMLv2.xsd                                       |    0 
 opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLExtendedOperation.java |    0 
 opendj-dsml-servlet/resources/webapp/sun-web.xml                                      |    0 
 22 files changed, 351 insertions(+), 212 deletions(-)

diff --git a/opendj-dsml-servlet/legal-notices/THIRDPARTYREADME.txt b/opendj-dsml-servlet/legal-notices/THIRDPARTYREADME.txt
new file mode 100644
index 0000000..cb7451b
--- /dev/null
+++ b/opendj-dsml-servlet/legal-notices/THIRDPARTYREADME.txt
@@ -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.
diff --git a/opendj-dsml-servlet/pom.xml b/opendj-dsml-servlet/pom.xml
new file mode 100644
index 0000000..8848066
--- /dev/null
+++ b/opendj-dsml-servlet/pom.xml
@@ -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>
diff --git a/opendj-server-legacy/resource/dsml/schema/DSMLv2.xsd b/opendj-dsml-servlet/resources/schema/DSMLv2.xsd
similarity index 100%
rename from opendj-server-legacy/resource/dsml/schema/DSMLv2.xsd
rename to opendj-dsml-servlet/resources/schema/DSMLv2.xsd
diff --git a/opendj-server-legacy/resource/dsml/schema/bindings.xjb b/opendj-dsml-servlet/resources/schema/bindings.xjb
similarity index 100%
rename from opendj-server-legacy/resource/dsml/schema/bindings.xjb
rename to opendj-dsml-servlet/resources/schema/bindings.xjb
diff --git a/opendj-server-legacy/resource/dsml/webapp/sun-web.xml b/opendj-dsml-servlet/resources/webapp/sun-web.xml
similarity index 100%
rename from opendj-server-legacy/resource/dsml/webapp/sun-web.xml
rename to opendj-dsml-servlet/resources/webapp/sun-web.xml
diff --git a/opendj-server-legacy/resource/dsml/webapp/web.xml b/opendj-dsml-servlet/resources/webapp/web.xml
similarity index 100%
rename from opendj-server-legacy/resource/dsml/webapp/web.xml
rename to opendj-dsml-servlet/resources/webapp/web.xml
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ByteStringUtility.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ByteStringUtility.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAbandonOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAbandonOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAddOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAddOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLCompareOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLCompareOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLDeleteOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLDeleteOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLExtendedOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLExtendedOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyDNOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyDNOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLModifyOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLModifyOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLServlet.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLServlet.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/ResultCodeFactory.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ResultCodeFactory.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/ResultCodeFactory.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ResultCodeFactory.java
diff --git a/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/package-info.java b/opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/package-info.java
similarity index 100%
rename from opendj-server-legacy/src/dsml/org/opends/dsml/protocol/package-info.java
rename to opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/package-info.java
diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml
index 79f9217..7f86eac 100644
--- a/opendj-server-legacy/pom.xml
+++ b/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>
diff --git a/opendj-server-legacy/resource/dsml/lib/j2ee.jar b/opendj-server-legacy/resource/dsml/lib/j2ee.jar
deleted file mode 100644
index 72457ef..0000000
--- a/opendj-server-legacy/resource/dsml/lib/j2ee.jar
+++ /dev/null
Binary files differ
diff --git a/opendj-server-legacy/src/main/assembly/dsml-war-assembly.xml b/opendj-server-legacy/src/main/assembly/dsml-war-assembly.xml
deleted file mode 100644
index 3c8ca31..0000000
--- a/opendj-server-legacy/src/main/assembly/dsml-war-assembly.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
-  ! 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.
-  !
--->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>dsml-war</id>
-  <baseDirectory></baseDirectory>
-  <!-- Put un-versioned dependencies (jars) into lib directory -->
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>WEB-INF/lib</outputDirectory>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-      <includes>
-        <include>org.forgerock.commons:forgerock-util</include>
-        <include>org.forgerock.commons:i18n-core</include>
-        <include>org.forgerock.commons:i18n-slf4j</include>
-        <include>org.slf4j:slf4j-api</include>
-        <include>org.forgerock.opendj:opendj-cli</include>
-        <include>org.forgerock.opendj:opendj-config</include>
-        <include>org.forgerock.opendj:opendj-core</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-
-  <fileSets>
-    <!-- Include the Forgerock binary license file if exists -->
-    <fileSet>
-      <directory>${project.build.directory}/legal-notices</directory>
-      <outputDirectory>legal-notices</outputDirectory>
-    </fileSet>
-
-    <!-- Add legal-notices/THIRDPARTYREADME.txt -->
-    <fileSet>
-      <directory>${basedir}/legal-notices</directory>
-      <outputDirectory>WEB-INF/legal-notices</outputDirectory>
-      <includes>
-        <include>THIRDPARTYREADME.txt</include>
-      </includes>
-    </fileSet>
-
-    <!-- Add legal-notices/CDDLv1_0.txt -->
-    <fileSet>
-      <directory>${basedir}/../legal-notices</directory>
-      <outputDirectory>WEB-INF/legal-notices</outputDirectory>
-      <includes>
-        <include>CDDLv1_0.txt</include>
-      </includes>
-    </fileSet>
-
-    <fileSet>
-      <directory>${jars.dir}/</directory>
-      <outputDirectory>WEB-INF/lib</outputDirectory>
-      <includes>
-        <include>${shortProductName}*.jar</include>
-      </includes>
-    </fileSet>
-
-    <fileSet>
-      <directory>${project.build.outputDirectory}/org/opends/dsml/protocol</directory>
-      <outputDirectory>WEB-INF/classes/org/opends/dsml/protocol</outputDirectory>
-    </fileSet>
-
-    <fileSet>
-      <directory>${basedir}/resource/dsml/webapp</directory>
-      <outputDirectory>WEB-INF</outputDirectory>
-    </fileSet>
-  </fileSets>
-	<files>
-    <!-- DSMLv2.xsd -->
-    <file>
-      <source>${basedir}/resource/dsml/schema/DSMLv2.xsd</source>
-      <outputDirectory>WEB-INF/classes/resources</outputDirectory>
-   </file>
-	</files>
-</assembly>
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java
index e56bcf2..fa837f0 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java
+++ b/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.
    *
diff --git a/pom.xml b/pom.xml
index 92caba4..f975ec0 100644
--- a/pom.xml
+++ b/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>

--
Gitblit v1.10.0