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

Gaetan Boismal
08.28.2016 c48eedf2c052ae945cd56d260be753bcbcb764fc
OPENDJ-2941 Fix tools extension informations

The issue was a side effect of the configuration framework migration
(see OPENDJ-1238).
With the legacy configuration framework, we ensured that the file
admin/extension.manifest was present in the extension jar like snmp-
mib2605.jar.
Now it seems that we check if the file META-
INF/services/org.forgerock.opendj.config.AbstractManagedObjectDefinition
exists in the extension jar.
In order to prevent unit-tests classpath corruption (with multiple
org.forgerock.opendj.config.AbstractManagedObjectDefinition files) we
now build the snmp-mib2605.jar with an assembly.
The only difference is that there is no more META-INF/INDEX.LIST file in
the new jar.
2 files added
1 files modified
67 ■■■■ changed files
opendj-server-legacy/pom.xml 30 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/snmp-jar-assembly.xml 37 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/snmp/resource/META-INF/services/org.forgerock.opendj.config.AbstractManagedObjectDefinition patch | view | raw | blame | history
opendj-server-legacy/pom.xml
@@ -1262,11 +1262,6 @@
      </dependencies>
      <build>
        <resources>
          <resource>
            <directory>src/snmp/resource</directory>
          </resource>
        </resources>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
@@ -1360,22 +1355,26 @@
            </executions>
          </plugin>
          <!-- Creates snmp jar file -->
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <!-- Package snmp jar -->
              <execution>
                <id>create-snmp-jar</id>
                <id>build-snmp-jar</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>jar</goal>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <outputDirectory>${jars.dir}</outputDirectory>
                  <finalName>${snmp.jar.name}</finalName>
                  <includes>
                    <include>org/opends/server/snmp/**</include>
                  </includes>
                  <descriptors>
                    <descriptor>src/main/assembly/snmp-jar-assembly.xml</descriptor>
                  </descriptors>
                  <appendAssemblyId>false</appendAssemblyId>
                  <formats>
                    <format>jar</format>
                  </formats>
                  <archive>
                    <index>true</index>
                    <addMavenDescriptor>false</addMavenDescriptor>
@@ -1387,13 +1386,8 @@
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Package the final zip -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <!-- Package the final zip -->
              <execution>
                <id>build-opendj-archive</id>
                <phase>package</phase>
opendj-server-legacy/src/main/assembly/snmp-jar-assembly.xml
New file
@@ -0,0 +1,37 @@
<!--
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2016 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>snmp-jar-generation</id>
    <includeBaseDirectory>false</includeBaseDirectory>
    <!-- Assembly descriptor SNMP complement for OpenDJ archive -->
    <fileSets>
        <!-- Adds snmp binairies -->
        <fileSet>
            <directory>${project.build.outputDirectory}/org/opends/server/snmp</directory>
            <outputDirectory>org/opends/server/snmp</outputDirectory>
        </fileSet>
    </fileSets>
    <files>
        <!-- Adds generated mib rfc 2605 file -->
        <file>
            <source>src/snmp/resource/META-INF/services/org.forgerock.opendj.config.AbstractManagedObjectDefinition</source>
            <outputDirectory>META-INF/services</outputDirectory>
        </file>
    </files>
</assembly>
opendj-server-legacy/src/snmp/resource/META-INF/services/org.forgerock.opendj.config.AbstractManagedObjectDefinition