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

Gaetan Boismal
19.16.2015 53ae9850a506ed9c1a6738411e5c306b6c647214
OPENDJ-2450 Fix upgrade OEM on windows

Create OEM bootstrap and bootstrap-client jars.
2 files added
3 files modified
164 ■■■■■ changed files
opendj-packages/opendj-zip/opendj-zip-oem/pom.xml 139 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-zip/opendj-zip-oem/src/main/assembly/opendj-zip-oem-archive-assembly.xml 12 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-zip/opendj-zip-oem/src/main/resources/bootstrap/manifest-bootstrap 6 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-zip/opendj-zip-oem/src/main/resources/bootstrap/manifest-bootstrap-client 6 ●●●●● patch | view | raw | blame | history
opendj-packages/pom.xml 1 ●●●● patch | view | raw | blame | history
opendj-packages/opendj-zip/opendj-zip-oem/pom.xml
@@ -47,20 +47,155 @@
    <properties>
        <!-- Comma separated list of file patterns to remove from standard archive -->
        <oem.file.exclusion.list>
            ${product.name.lowercase}/lib/bootstrap.jar,
            ${product.name.lowercase}/lib/bootstrap-client.jar,
            ${product.name.lowercase}/lib/je.jar,
            ${product.name.lowercase}/lib/opendj-je-backend-changelog.jar,
            ${product.name.lowercase}/legal-notices/THIRDPARTYREADME.txt
        </oem.file.exclusion.list>
        <product.locales>ca_ES,es,de,fr,ja,ko,pl,zh_CN,zh_TW</product.locales>
    </properties>
    <dependencies>
        <!--
          ! Add this dependency to have opendj-server-legacy dependencies in
          ! our classpath to build boostrap.jar and boostrap-client.jar
        -->
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-server-legacy</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.sleepycat</groupId>
                    <artifactId>je</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.forgerock.opendj</groupId>
                <artifactId>opendj-maven-plugin</artifactId>
                <version>${project.version}</version>
                <configuration>
                    <productJarName>${product.name}</productJarName>
                    <supportedLocales>${product.locales}</supportedLocales>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-bootstrap-manifest</id>
                        <goals>
                            <goal>generate-manifest</goal>
                        </goals>
                        <configuration>
                            <classPathProperty>classpath.bootstrap</classPathProperty>
                            <excludes>
                                <exclude>org.slf4j:slf4j-jdk14</exclude>
                                <exclude>org.forgerock.opendj:opendj-server-legacy</exclude>
                            </excludes>
                            <additionalJars>
                                <additionalJar>opendj-slf4j-adapter.jar</additionalJar>
                            </additionalJars>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate-bootstrap-client-manifest</id>
                        <goals>
                            <goal>generate-manifest</goal>
                        </goals>
                        <configuration>
                            <classPathProperty>classpath.bootstrap-client</classPathProperty>
                            <excludes>
                                <exclude>org.forgerock.opendj:opendj-server-legacy</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <index>false</index>
                    </archive>
                    <includes>
                        <include>nothing</include>
                    </includes>
                </configuration>
                <executions>
                    <!-- Package bootstrap jar - contains only a manifest with classpath for the server -->
                    <execution>
                        <id>build-bootstrap-jar</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <finalName>bootstrap</finalName>
                            <archive>
                                <index>false</index>
                                <manifestFile>
                                    ${project.build.outputDirectory}/bootstrap/manifest-bootstrap
                                </manifestFile>
                            </archive>
                        </configuration>
                    </execution>
                    <!-- Package bootstrap-client jar - contains only a manifest with classpath for clients -->
                    <execution>
                        <id>build-bootstrap-client-jar</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <finalName>bootstrap-client</finalName>
                            <archive>
                                <index>false</index>
                                <manifestFile>
                                    ${project.build.outputDirectory}/bootstrap/manifest-bootstrap-client
                                </manifestFile>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <!-- Unpack files from OpenDJ standard archive -->
@@ -92,7 +227,9 @@
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <finalName>${product.name}-OEM-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</finalName>
                            <finalName>
                                ${product.name}-OEM-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}
                            </finalName>
                            <descriptors>
                                <descriptor>src/main/assembly/opendj-zip-oem-archive-assembly.xml</descriptor>
                            </descriptors>
opendj-packages/opendj-zip/opendj-zip-oem/src/main/assembly/opendj-zip-oem-archive-assembly.xml
@@ -42,5 +42,17 @@
            <source>${basedir}/${legal.folder}/THIRDPARTYREADME.txt</source>
            <outputDirectory>${legal.folder}</outputDirectory>
        </file>
        <!-- bootstrap.jar OEM file -->
        <file>
            <source>${project.build.directory}/bootstrap.jar</source>
            <outputDirectory>${lib.folder}</outputDirectory>
        </file>
        <!-- bootstrap-client OEM file -->
        <file>
            <source>${project.build.directory}/bootstrap-client.jar</source>
            <outputDirectory>${lib.folder}</outputDirectory>
        </file>
    </files>
</assembly>
opendj-packages/opendj-zip/opendj-zip-oem/src/main/resources/bootstrap/manifest-bootstrap
New file
@@ -0,0 +1,6 @@
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven ${maven.version}
Built-By: ${user.name}
Build-Jdk: ${java.version}
${classpath.bootstrap}
opendj-packages/opendj-zip/opendj-zip-oem/src/main/resources/bootstrap/manifest-bootstrap-client
New file
@@ -0,0 +1,6 @@
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven ${maven.version}
Built-By: ${user.name}
Build-Jdk: ${java.version}
${classpath.bootstrap-client}
opendj-packages/pom.xml
@@ -131,6 +131,7 @@
        <product.name>OpenDJ</product.name>
        <product.name.lowercase>opendj</product.name.lowercase>
        <legal.folder>legal-notices</legal.folder>
        <lib.folder>lib</lib.folder>
        <!-- Location of the opendj service file for linux based packages. -->
        <sysv.file.location/>
    </properties>