<?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
|
! trunk/opendj3/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
|
! trunk/opendj3/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 2011-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-project</artifactId>
|
<version>3.0.0-SNAPSHOT</version>
|
</parent>
|
<artifactId>opendj-server-legacy</artifactId>
|
<packaging>jar</packaging>
|
<name>OpenDJ</name>
|
<description>
|
This module provides the OpenDJ server.
|
</description>
|
<inceptionYear>2006</inceptionYear>
|
|
<repositories>
|
<repository>
|
<id>oracle-repository</id>
|
<name>Oracle Maven Repository</name>
|
<url>http://download.oracle.com/maven</url>
|
<releases>
|
<enabled>true</enabled>
|
</releases>
|
<snapshots>
|
<enabled>false</enabled>
|
</snapshots>
|
</repository>
|
</repositories>
|
|
<properties>
|
<!-- General server-wide properties -->
|
<docgen.dir>${project.build.directory}/docgen</docgen.dir>
|
<jars.dir>${project.build.directory}/jars</jars.dir>
|
|
<!-- Product information properties -->
|
<shortProductName>OpenDJ</shortProductName>
|
<lowerCaseProductName>opendj</lowerCaseProductName>
|
<patchFixIds></patchFixIds>
|
<isDebugBuild>false</isDebugBuild>
|
<docHomepageUrl>http://opendj.forgerock.org/</docHomepageUrl>
|
<docWikiUrl>http://opendj.forgerock.org/docs.html</docWikiUrl>
|
<docGuideRefUrl>http://opendj.forgerock.org/doc/admin-guide/index.html</docGuideRefUrl>
|
<docGuideAdminUrl>http://opendj.forgerock.org/doc/admin-guide/index.html</docGuideAdminUrl>
|
<locales>ca_ES,es,de,fr,ja,ko,pl,zh_CN,zh_TW</locales>
|
|
<!-- Dependencies version properties -->
|
<project.version>3.0.0-SNAPSHOT</project.version>
|
<i18n.version>1.4.2-SNAPSHOT</i18n.version>
|
|
<!-- Other properties -->
|
<checkstyleHeaderLocation>org/forgerock/checkstyle/opendj-java-header</checkstyleHeaderLocation>
|
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
|
<!-- Could be removed once migration to new config framework will be done-->
|
<old.config.files.path>${project.build.directory}/config/admin/defn/org/opends/server/admin/std</old.config.files.path>
|
|
</properties>
|
|
<dependencies>
|
<!-- ForgeRock libraries -->
|
<dependency>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-rest2ldap-servlet</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
<dependency>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>i18n-slf4j</artifactId>
|
</dependency>
|
<dependency>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-config</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
<dependency>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-server</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
<dependency>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-legacy</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
|
<dependency>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-cli</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
|
<dependency>
|
<groupId>org.forgerock</groupId>
|
<artifactId>forgerock-build-tools</artifactId>
|
<version>${forgerockBuildToolsVersion}</version>
|
<scope>test</scope>
|
</dependency>
|
|
<dependency>
|
<groupId>org.slf4j</groupId>
|
<artifactId>slf4j-jdk14</artifactId>
|
</dependency>
|
|
<!-- servlet and mail -->
|
<dependency>
|
<groupId>javax.servlet</groupId>
|
<artifactId>javax.servlet-api</artifactId>
|
<version>3.1-b02</version>
|
</dependency>
|
<dependency>
|
<groupId>org.glassfish.grizzly</groupId>
|
<artifactId>grizzly-http-servlet</artifactId>
|
<version>2.3.16</version>
|
<exclusions>
|
<exclusion>
|
<groupId>javax.servlet</groupId>
|
<artifactId>javax.servlet-api</artifactId>
|
</exclusion>
|
</exclusions>
|
</dependency>
|
<dependency>
|
<groupId>javax.mail</groupId>
|
<artifactId>mail</artifactId>
|
<version>1.4.7</version>
|
</dependency>
|
|
<!-- Tests -->
|
<dependency>
|
<groupId>org.testng</groupId>
|
<artifactId>testng</artifactId>
|
<version>6.0.1</version>
|
<scope>test</scope>
|
</dependency>
|
|
<dependency>
|
<groupId>org.assertj</groupId>
|
<artifactId>assertj-core</artifactId>
|
<version>1.7.0</version>
|
<scope>test</scope>
|
</dependency>
|
<dependency>
|
<groupId>org.mockito</groupId>
|
<artifactId>mockito-core</artifactId>
|
<version>1.9.5</version>
|
<scope>test</scope>
|
</dependency>
|
<dependency>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-core</artifactId>
|
<type>test-jar</type>
|
<version>${project.version}</version>
|
<scope>test</scope>
|
</dependency>
|
|
<!-- Databases -->
|
<dependency>
|
<groupId>com.sleepycat</groupId>
|
<artifactId>je</artifactId>
|
<version>5.0.104</version>
|
</dependency>
|
<dependency>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>forgerock-persistit-core</artifactId>
|
<version>4.0.0-SNAPSHOT</version>
|
</dependency>
|
</dependencies>
|
|
<build>
|
<resources>
|
<!-- Main resources -->
|
<resource>
|
<directory>src/main/resources</directory>
|
<filtering>true</filtering>
|
<excludes>
|
<exclude>java-stubs/</exclude>
|
</excludes>
|
</resource>
|
<!-- Property files used in test sources -->
|
<resource>
|
<directory>src/test/java</directory>
|
<filtering>false</filtering>
|
<includes>
|
<include>**/*.properties</include>
|
</includes>
|
</resource>
|
<!-- Images for quicksetup must be explicitely copied from sources -->
|
<resource>
|
<directory>src/quicksetup</directory>
|
<filtering>false</filtering>
|
<includes>
|
<include>**/images/*.gif</include>
|
<include>**/images/*.png</include>
|
</includes>
|
</resource>
|
<!-- Images for guitools must be explicitely copied from sources -->
|
<resource>
|
<directory>src/guitools</directory>
|
<filtering>false</filtering>
|
<includes>
|
<include>**/images/*.gif</include>
|
<include>**/images/*.png</include>
|
</includes>
|
</resource>
|
<!-- .plist files for macos must be filtered to include build properties -->
|
<resource>
|
<directory>resource/mac</directory>
|
<filtering>true</filtering>
|
<includes>
|
<include>**/Info.plist</include>
|
</includes>
|
</resource>
|
<!-- Generation of DynamicConstants class from build properties -->
|
<resource>
|
<directory>src/main/resources/java-stubs</directory>
|
<filtering>true</filtering>
|
<targetPath>${project.build.directory}/java-stubs</targetPath>
|
</resource>
|
</resources>
|
|
<pluginManagement>
|
<plugins>
|
<!--This plugin's configuration is used to store Eclipse m2e settings only. It
|
has no influence on the Maven build itself. This section instructs Eclipse's
|
Maven builder to invoke the antrun plugin for generating the configuration
|
framework files, e.g. core.manifest, during a *clean* build. Execution
|
during an incremental build is not supported. -->
|
<plugin>
|
<groupId>org.eclipse.m2e</groupId>
|
<artifactId>lifecycle-mapping</artifactId>
|
<version>1.0.0</version>
|
<configuration>
|
<lifecycleMappingMetadata>
|
<pluginExecutions>
|
<pluginExecution>
|
<pluginExecutionFilter>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
<versionRange>[1.7,)</versionRange>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
</pluginExecutionFilter>
|
<action>
|
<execute>
|
<runOnIncremental>false</runOnIncremental>
|
</execute >
|
</action>
|
</pluginExecution>
|
</pluginExecutions>
|
</lifecycleMappingMetadata>
|
</configuration>
|
</plugin>
|
</plugins>
|
</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>
|
<configuration>
|
<filesets>
|
<fileset>
|
<directory>${basedir}/src</directory>
|
<includes>
|
<include>admin/generated/**</include>
|
<include>messages/generated/**</include>
|
</includes>
|
<followSymlinks>false</followSymlinks>
|
</fileset>
|
</filesets>
|
</configuration>
|
</plugin>
|
|
<!-- Unpack configuration files from opendj-maven-plugin -->
|
<!-- This plugin could be removed once the migration to the new config framework will be done -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>unpack</id>
|
<phase>generate-sources</phase>
|
<goals>
|
<goal>unpack</goal>
|
</goals>
|
<configuration>
|
<artifactItems>
|
<artifactItem>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-maven-plugin</artifactId>
|
<version>${project.version}</version>
|
<type>jar</type>
|
<overWrite>true</overWrite>
|
<outputDirectory>${project.build.directory}/config/admin/defn/org/opends/server/admin/std</outputDirectory>
|
<includes>config/xml/**/*.xml</includes>
|
</artifactItem>
|
</artifactItems>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Generate i18n messages -->
|
<plugin>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>i18n-maven-plugin</artifactId>
|
<executions>
|
<execution>
|
<phase>generate-sources</phase>
|
<goals>
|
<goal>generate-messages</goal>
|
</goals>
|
<configuration>
|
<resourceDirectory>${basedir}/src/messages</resourceDirectory>
|
<targetDirectory>${basedir}/src/messages/generated/</targetDirectory>
|
<force>true</force>
|
<messageFiles>
|
<!-- Warning: messageFile must contains at least one "/" -->
|
<messageFile>org/opends/messages/access_control.properties</messageFile>
|
<messageFile>org/opends/messages/admin.properties</messageFile>
|
<messageFile>org/opends/messages/admin_tool.properties</messageFile>
|
<messageFile>org/opends/messages/backend.properties</messageFile>
|
<messageFile>org/opends/messages/config.properties</messageFile>
|
<messageFile>org/opends/messages/core.properties</messageFile>
|
<messageFile>org/opends/messages/dsconfig.properties</messageFile>
|
<messageFile>org/opends/messages/extension.properties</messageFile>
|
<messageFile>org/opends/messages/jeb.properties</messageFile>
|
<messageFile>org/opends/messages/logger.properties</messageFile>
|
<messageFile>org/opends/messages/plugin.properties</messageFile>
|
<messageFile>org/opends/messages/protocol.properties</messageFile>
|
<messageFile>org/opends/messages/quickSetup.properties</messageFile>
|
<messageFile>org/opends/messages/replication.properties</messageFile>
|
<messageFile>org/opends/messages/runtime.properties</messageFile>
|
<messageFile>org/opends/messages/schema.properties</messageFile>
|
<messageFile>org/opends/messages/task.properties</messageFile>
|
<messageFile>org/opends/messages/tool.properties</messageFile>
|
<messageFile>org/opends/messages/utility.properties</messageFile>
|
<messageFile>org/opends/messages/version.properties</messageFile>
|
</messageFiles>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<artifactId>maven-resources-plugin</artifactId>
|
<executions>
|
<!-- Copy messages properties files for inclusion in main jar -->
|
<execution>
|
<id>copy-l10n-messages</id>
|
<phase>validate</phase>
|
<goals>
|
<goal>copy-resources</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${project.build.outputDirectory}/org/opends/messages</outputDirectory>
|
<resources>
|
<resource>
|
<directory>src/messages/org/opends/messages</directory>
|
<filtering>false</filtering>
|
</resource>
|
</resources>
|
</configuration>
|
</execution>
|
<execution>
|
<id>copy-l10n-config-messages</id>
|
<phase>validate</phase>
|
<goals>
|
<goal>copy-resources</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${project.build.outputDirectory}/admin/messages/org/opends/server/admin/std/meta</outputDirectory>
|
<resources>
|
<resource>
|
<directory>src/admin/messages</directory>
|
<filtering>false</filtering>
|
</resource>
|
</resources>
|
</configuration>
|
</execution>
|
<execution>
|
<id>copy-guitools-resources</id>
|
<phase>validate</phase>
|
<goals>
|
<goal>copy-resources</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${project.build.outputDirectory}/org/opends/guitools</outputDirectory>
|
<resources>
|
<resource>
|
<directory>src/main/java/org/opends/guitools</directory>
|
<filtering>false</filtering>
|
</resource>
|
</resources>
|
</configuration>
|
</execution>
|
<execution>
|
<id>copy-quicksetup-resources</id>
|
<phase>validate</phase>
|
<goals>
|
<goal>copy-resources</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${project.build.outputDirectory}/org/opends/quicksetup</outputDirectory>
|
<resources>
|
<resource>
|
<directory>src/main/java/org/opends/quicksetup</directory>
|
<filtering>false</filtering>
|
</resource>
|
</resources>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-maven-plugin</artifactId>
|
<version>${project.version}</version>
|
<executions>
|
<execution>
|
<id>generate-bootstrap-manifest</id>
|
<goals>
|
<goal>generate-manifest</goal>
|
</goals>
|
<configuration>
|
<classPathProperty>classpath.bootstrap</classPathProperty>
|
<productJarName>${shortProductName}</productJarName>
|
<supportedLocales>${locales}</supportedLocales>
|
<excludes>
|
<exclude>org.slf4j:slf4j-jdk14</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>
|
<productJarName>${shortProductName}</productJarName>
|
<supportedLocales>${locales}</supportedLocales>
|
</configuration>
|
</execution>
|
|
<!-- Generate configuration classes from XML definitions -->
|
<!-- Leave default lifecycle phase once new config framework migration is done -->
|
<execution>
|
<id>generate-config</id>
|
<!-- <phase>generate-sources</phase> -->
|
<phase>none</phase>
|
<goals>
|
<goal>generate-config</goal>
|
</goals>
|
<configuration>
|
<packageName>org.forgerock.opendj.server.config</packageName>
|
<isExtension>false</isExtension>
|
</configuration>
|
</execution>
|
|
<!-- Create consolidated schema file for use in upgrade -->
|
<execution>
|
<id>creates-base-schema-files</id>
|
<goals>
|
<goal>concat</goal>
|
</goals>
|
<configuration>
|
<schemaDirectory>${basedir}/resource/schema</schemaDirectory>
|
<outputDirectory>${project.build.directory}/upgrade</outputDirectory>
|
<outputFile>schema.ldif.${buildRevision}</outputFile>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
<version>1.8</version>
|
<executions>
|
<!-- Take into account several sources directories for the build -->
|
<execution>
|
<id>main-java-sources</id>
|
<phase>generate-sources</phase>
|
<goals>
|
<goal>add-source</goal>
|
</goals>
|
<configuration>
|
<sources>
|
<source>src/messages/generated</source>
|
<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>
|
</execution>
|
<!-- Parse version to generate properties (major.version, minor.version, ...) -->
|
<execution>
|
<id>parse-version</id>
|
<goals>
|
<goal>parse-version</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Retrieve the SVN revision number and the build timestamp -->
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
<version>1.3</version>
|
<executions>
|
<execution>
|
<id>generate-buildnumber</id>
|
<goals>
|
<goal>create</goal>
|
</goals>
|
<configuration>
|
<useLastCommittedRevision>true</useLastCommittedRevision>
|
<buildNumberPropertyName>buildRevision</buildNumberPropertyName>
|
<revisionOnScmFailure>-1</revisionOnScmFailure>
|
</configuration>
|
</execution>
|
<execution>
|
<id>generate-timestamp</id>
|
<goals>
|
<goal>create</goal>
|
</goals>
|
<configuration>
|
<format>{0,date,yyyyMMddHHmmss}</format>
|
<items>
|
<item>timestamp</item>
|
</items>
|
<buildNumberPropertyName>buildDateTime</buildNumberPropertyName>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Compile unit tests -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>default-testCompile</id>
|
<goals>
|
<goal>testCompile</goal>
|
</goals>
|
<configuration>
|
<testSourceDirectory>src/test/java</testSourceDirectory>
|
<showDeprecation>false</showDeprecation>
|
<showWarnings>false</showWarnings>
|
<testCompilerArgument>-nowarn</testCompilerArgument>
|
<testExcludes>
|
<testExclude>**/org/opends/server/snmp/**</testExclude>
|
</testExcludes>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Disable surefire plugin because all tests are run with failsafe plugin -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>default-test</id>
|
<phase>none</phase>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<artifactId>maven-jar-plugin</artifactId>
|
<executions>
|
<!-- Package boostrap 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>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>bootstrap</finalName>
|
<includes>
|
<include>nothing</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<manifestFile>${project.build.outputDirectory}/bootstrap/manifest-bootstrap</manifestFile>
|
</archive>
|
</configuration>
|
</execution>
|
<!-- Package boostrap-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>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>bootstrap-client</finalName>
|
<includes>
|
<include>nothing</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<manifestFile>${project.build.outputDirectory}/bootstrap/manifest-bootstrap-client</manifestFile>
|
</archive>
|
</configuration>
|
</execution>
|
<!-- Package build-tools jar -->
|
<execution>
|
<id>create-build-tools-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>build-tools</finalName>
|
<includes>
|
<include>**/messages/Severity.class</include>
|
<include>**/messages/Category.class</include>
|
<include>**/messages/Message.class</include>
|
<include>**/messages/MessagePropertyKey.class</include>
|
<include>**/messages/MessageDescriptor.class</include>
|
<include>**/server/types/PublicAPI.class</include>
|
<include>**/server/types/StabilityLevel.class</include>
|
<include>**/javax/jnlp/*</include>
|
<include>**/netscape/ldap/*</include>
|
<include>**/build/tools/*</include>
|
</includes>
|
</configuration>
|
</execution>
|
<!-- Package quicksetup jar -->
|
<execution>
|
<id>build-quicksetup-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>quicksetup</finalName>
|
<includes>
|
<include>**/quicksetup/**</include>
|
<include>**/org/opends/admin/ads/*</include>
|
<include>**/org/opends/server/util/SetupUtils.class</include>
|
<include>**/org/opends/server/util/CertificateManager.class</include>
|
<include>**/org/opends/server/util/DynamicConstants.class</include>
|
<include>**/org/opends/server/types/OperatingSystem.class</include>
|
<include>**/org/opends/messages/Message.class</include>
|
<include>**/org/opends/messages/MessageBuilder.class</include>
|
<include>**/org/opends/messages/MessageDescriptor.class</include>
|
<include>**/org/opends/messages/Severity.class</include>
|
<include>**/org/opends/messages/Category.class</include>
|
<include>**/org/opends/messages/QuickSetupMessages.class</include>
|
<include>**/org/opends/server/types/OpenDsException.class</include>
|
</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>
|
<id>build-caES-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_ca_ES</finalName>
|
<includes>
|
<include>**/*_ca_ES.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-de-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_de</finalName>
|
<includes>
|
<include>**/*_de.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-es-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_es</finalName>
|
<includes>
|
<include>**/*_es.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-fr-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_fr</finalName>
|
<includes>
|
<include>**/*_fr.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-ja-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_ja</finalName>
|
<includes>
|
<include>**/*_ja.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-ko-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_ko</finalName>
|
<includes>
|
<include>**/*_ko.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-pl-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_pl</finalName>
|
<includes>
|
<include>**/*_pl.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-zh-CN-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_zh_CN</finalName>
|
<includes>
|
<include>**/*_zh_CN.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<execution>
|
<id>build-zh-TW-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}_zh_TW</finalName>
|
<includes>
|
<include>**/*_zh_TW.properties</include>
|
</includes>
|
<archive>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
<!-- Main jar -->
|
<execution>
|
<id>default-jar</id>
|
<phase>package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>${shortProductName}</finalName>
|
<excludes>
|
<exclude>*.app/**</exclude>
|
<exclude>java-stubs/**</exclude>
|
<exclude>bootstrap/**</exclude>
|
<exclude>javax/jnlp/**</exclude>
|
<exclude>netscape/**</exclude>
|
<exclude>META-INF/**</exclude>
|
<exclude>org/opends/dsml/**</exclude>
|
<exclude>**/*_ca_ES.properties</exclude>
|
<exclude>**/*_de.properties</exclude>
|
<exclude>**/*_es.properties</exclude>
|
<exclude>**/*_fr.properties</exclude>
|
<exclude>**/*_ja.properties</exclude>
|
<exclude>**/*_ko.properties</exclude>
|
<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>
|
<index>true</index>
|
</archive>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<artifactId>maven-assembly-plugin</artifactId>
|
<executions>
|
<!-- Package the example plugin in a zip -->
|
<execution>
|
<id>build-example-package</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>single</goal>
|
</goals>
|
<configuration>
|
<finalName>example-plugin</finalName>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<appendAssemblyId>false</appendAssemblyId>
|
<attach>false</attach>
|
<descriptors>
|
<descriptor>src/main/assembly/example-plugin-assembly.xml</descriptor>
|
</descriptors>
|
<formats>
|
<format>zip</format>
|
</formats>
|
</configuration>
|
</execution>
|
<!-- Creates the archive folder -->
|
<execution>
|
<id>build-opendj-archive</id>
|
<phase>package</phase>
|
<goals>
|
<goal>single</goal>
|
</goals>
|
<configuration>
|
<finalName>${lowerCaseProductName}</finalName>
|
<outputDirectory>${project.build.directory}/package</outputDirectory>
|
<appendAssemblyId>false</appendAssemblyId>
|
<attach>false</attach>
|
<descriptors>
|
<descriptor>src/main/assembly/opendj-archive-assembly.xml</descriptor>
|
</descriptors>
|
<formats>
|
<format>dir</format>
|
</formats>
|
<archive>
|
<manifestFile>${project.build.outputDirectory}/bootstrap/manifest-bootstrap</manifestFile>
|
</archive>
|
</configuration>
|
</execution>
|
<!-- Package DSML war -->
|
<execution>
|
<id>build-dsml-war</id>
|
<phase>package</phase>
|
<goals>
|
<goal>single</goal>
|
</goals>
|
<configuration>
|
<finalName>${shortProductName}-${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>
|
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
<executions>
|
<execution>
|
<!-- Temporary solution for configuration classes until migration to new config framework -->
|
<!-- Change package name and XML namespaces references to match the old config framework -->
|
<id>configure-config-files</id>
|
<phase>generate-sources</phase>
|
<configuration>
|
<target>
|
<move todir="${old.config.files.path}">
|
<fileset dir="${old.config.files.path}/config/xml/org/forgerock/opendj/server/config/" />
|
</move>
|
<delete dir="${old.config.files.path}/config" />
|
<replace dir="${old.config.files.path}"
|
token="org.forgerock.opendj.server.config"
|
value="org.opends.server.admin.std"/>
|
<replace dir="${old.config.files.path}"
|
token="http://opendj.forgerock.org/admin"
|
value="http://www.opends.org/admin"/>
|
</target>
|
</configuration>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
</execution>
|
|
<execution>
|
<!-- Temporary solution for configuration classes until migration to new config framework -->
|
<id>generate-config</id>
|
<phase>generate-sources</phase>
|
<configuration>
|
<target>
|
<ant antfile="${basedir}/build.xml">
|
<target name="generateadmin" />
|
</ant>
|
</target>
|
</configuration>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
</execution>
|
|
<execution>
|
<!-- Copy config.ldif in build dir (needed if snmp config merge is needed) -->
|
<id>copy-config-ldif</id>
|
<phase>generate-resources</phase>
|
<configuration>
|
<target>
|
<copy todir="${project.build.directory}/template/config" file="${basedir}/resource/config/config.ldif"/>
|
</target>
|
</configuration>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
</execution>
|
|
<!-- Generate final zip and attach artefact -->
|
<execution>
|
<id>attach-artifact</id>
|
<phase>package</phase>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
<configuration>
|
<target>
|
<zip
|
destfile="${project.build.directory}/package/${shortProductName}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.zip">
|
<zipfileset
|
dir="${project.build.directory}/package/${lowerCaseProductName}"
|
includes="**/*"
|
excludes="bin/*,template/**/*,lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh,setup,uninstall,upgrade,QuickSetup.app/Contents/MacOS/JavaApplicationStub,Uninstall.app/Contents/MacOS/JavaApplicationStub,bin/ControlPanel.app/Contents/MacOS/JavaApplicationStub"
|
filemode="644" dirmode="755" prefix="opendj" />
|
<zipfileset
|
dir="${project.build.directory}/package/${lowerCaseProductName}"
|
includes="lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh"
|
filemode="755" dirmode="755" prefix="opendj" />
|
<zipfileset
|
dir="${project.build.directory}/package/${lowerCaseProductName}"
|
includes="bin/*" filemode="755" dirmode="755"
|
prefix="opendj" />
|
<zipfileset
|
dir="${project.build.directory}/package/${lowerCaseProductName}"
|
includes="setup,uninstall,upgrade,QuickSetup.app/Contents/MacOS/JavaApplicationStub,Uninstall.app/Contents/MacOS/JavaApplicationStub,bin/ControlPanel.app/Contents/MacOS/JavaApplicationStub"
|
filemode="755" dirmode="755" prefix="opendj" />
|
<zipfileset
|
dir="${project.build.directory}/package/${lowerCaseProductName}"
|
includes="template/**/*" filemode="444" dirmode="744"
|
prefix="opendj" />
|
</zip>
|
<attachartifact
|
file="${project.build.directory}/package/${shortProductName}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.zip"
|
type="zip" />
|
</target>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Build javadoc -->
|
<plugin>
|
<groupId>org.forgerock.maven.plugins</groupId>
|
<artifactId>javadoc-updater-maven-plugin</artifactId>
|
<version>1.0.0</version>
|
<executions>
|
<execution>
|
<phase>site</phase>
|
<goals>
|
<goal>fixjavadoc</goal>
|
</goals>
|
<configuration>
|
<directory>${project.build.directory}/site/javadoc</directory>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Release project -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-release-plugin</artifactId>
|
<configuration>
|
<!-- Required for release:perform: the parent pom specifies a value
|
for "arguments" in the plugin configuration. This prevents command line setting
|
of the option. -->
|
<arguments>-Penforce -Dopendmk.lib.dir=${opendmk.lib.dir}</arguments>
|
</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>
|
<configuration>
|
<skip>true</skip>
|
</configuration>
|
</plugin>
|
</plugins>
|
</build>
|
|
<reporting>
|
<plugins>
|
<!-- No javadoc generation for the server -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
<configuration>
|
<skip>true</skip>
|
</configuration>
|
</plugin>
|
</plugins>
|
</reporting>
|
|
<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>
|
<!-- Check svn:eol-style property on modified files -->
|
<!-- TODO: Remove once Git migration over -->
|
<plugin>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-svn-property-check-maven-plugin</artifactId>
|
<version>1.0.0-SNAPSHOT</version>
|
<executions>
|
<execution>
|
<id>check-eol-property</id>
|
<goals>
|
<goal>check-svn-property</goal>
|
</goals>
|
<configuration>
|
<svnPropertyName>svn:eol-style</svnPropertyName>
|
<svnPropertyExpectedValue>native</svnPropertyExpectedValue>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Enforce Checkstyle -->
|
<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>
|
<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/**,javax/jnlp/**,netscape/ldap/**</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>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeResources>false</includeResources>
|
<!-- Only output errors if we're not expecting any -->
|
<consoleOutput>${checkstyleFailOnError}</consoleOutput>
|
<failsOnError>${checkstyleFailOnError}</failsOnError>
|
</configuration>
|
<phase>process-test-classes</phase>
|
<goals>
|
<goal>check</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!--
|
Run unit/integration tests.
|
|
A lot of existing tests requires a running server, which is why the tests are
|
run using failsafe instead of surefire.
|
|
It should be possible in the future to separate tests into unit (no server) and
|
integration (with server), by using respectively surefire and failsafe plugin
|
to run them, but it will require identifying them.
|
We could use an "unit" marker in TestNG groups to do so.
|
-->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
<executions>
|
<execution>
|
<goals>
|
<goal>integration-test</goal>
|
<goal>verify</goal>
|
</goals>
|
<configuration>
|
<testSourceDirectory>src/test/java</testSourceDirectory>
|
<excludes>
|
<exclude>org/opends/server/snmp/**</exclude>
|
<exclude>org/opends/quicksetup/**</exclude>
|
<exclude>org/opends/quicksetup/**</exclude>
|
</excludes>
|
<includes>
|
<include>**/Test*.java</include>
|
<include>**/*Test.java</include>
|
<include>**/*Tests.java</include>
|
<include>**/*TestCase.java</include>
|
<include>**/*TestCases.java</include>
|
</includes>
|
<properties>
|
<property>
|
<name>usedefaultlisteners</name>
|
<value>false</value>
|
</property>
|
<property>
|
<name>listener</name>
|
<value>org.opends.server.TestListener</value>
|
</property>
|
<property>
|
<name>excludegroups</name>
|
<value>slow</value>
|
</property>
|
<property>
|
<name>configfailurepolicy</name>
|
<value>skip</value>
|
</property>
|
</properties>
|
<systemPropertyVariables>
|
<org.opends.server.BuildRoot>${basedir}</org.opends.server.BuildRoot>
|
<org.opends.server.BuildDir>${project.build.directory}</org.opends.server.BuildDir>
|
<org.opends.test.replicationDbImpl>LOG</org.opends.test.replicationDbImpl>
|
<!-- <jvmarg value="-Dorg.opends.server.snmp.opendmk=${opendmk.lib.dir}"/> -->
|
<org.opends.server.CleanupDirectories>true</org.opends.server.CleanupDirectories>
|
<org.opends.test.suppressOutput>true</org.opends.test.suppressOutput>
|
<org.opends.test.pauseOnFailure>false</org.opends.test.pauseOnFailure>
|
<org.opends.test.copyClassesToTestPackage>false</org.opends.test.copyClassesToTestPackage>
|
</systemPropertyVariables>
|
<argLine>-server -Xms1024M -Xmx1024M</argLine>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
</plugins>
|
</build>
|
</profile>
|
|
<!--
|
Profile to build SNMP extension.
|
|
This profile is only actived when command line contains the 'opendmk.lib.dir'
|
property that must point to the directory where OpenDMK jars are located.
|
Example: mvn install -Dopendmk.lib.dir=/path/to/opendmk/jars
|
-->
|
<profile>
|
<id>snmp</id>
|
<activation>
|
<property>
|
<name>opendmk.lib.dir</name>
|
</property>
|
</activation>
|
|
<properties>
|
<snmp.dir>${basedir}/src/snmp</snmp.dir>
|
<snmp.gen.dir>${snmp.dir}/generated</snmp.gen.dir>
|
<snmp.mib.dir>${snmp.dir}/resource/mib</snmp.mib.dir>
|
</properties>
|
|
<dependencies>
|
<dependency>
|
<groupId>opendmk</groupId>
|
<artifactId>jdmkrt</artifactId>
|
<version>1.0</version>
|
<scope>system</scope>
|
<systemPath>${opendmk.lib.dir}/jdmkrt.jar</systemPath>
|
</dependency>
|
<dependency>
|
<groupId>opendmk</groupId>
|
<artifactId>jdmktk</artifactId>
|
<version>1.0</version>
|
<scope>system</scope>
|
<systemPath>${opendmk.lib.dir}/jdmktk.jar</systemPath>
|
</dependency>
|
</dependencies>
|
|
<build>
|
<resources>
|
<resource>
|
<directory>src/snmp/resource</directory>
|
</resource>
|
</resources>
|
<plugins>
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
<version>1.7</version>
|
<executions>
|
<!-- Add snmp source directory and snmp generated directory as sources -->
|
<execution>
|
<id>snmp-java-sources</id>
|
<phase>generate-sources</phase>
|
<goals>
|
<goal>add-source</goal>
|
</goals>
|
<configuration>
|
<sources>
|
<source>src/snmp</source>
|
</sources>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Cleans SNMP directory -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>createMibDir</id>
|
<phase>initialize</phase>
|
<configuration>
|
<target>
|
<delete dir="${snmp.gen.dir}/org/opends/server/snmp" />
|
<mkdir dir="${snmp.gen.dir}/org/opends/server/snmp" />
|
</target>
|
</configuration>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
</execution>
|
<execution>
|
<!-- Append snmp config to the config.ldif -->
|
<id>generate-config-ldif</id>
|
<phase>prepare-package</phase>
|
<configuration>
|
<target>
|
<concat destfile="${project.build.directory}/template/config/config.ldif" append="true">
|
<filelist dir="${snmp.dir}/resource/config" files="config.snmp.ldif"/>
|
</concat>
|
</target>
|
</configuration>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- MIB generation -->
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>exec-maven-plugin</artifactId>
|
<version>1.3.2</version>
|
<executions>
|
<execution>
|
<id>mib-generation</id>
|
<phase>generate-sources</phase>
|
<goals>
|
<goal>exec</goal>
|
</goals>
|
<configuration>
|
<executable>java</executable>
|
<classpathScope>compile</classpathScope>
|
<arguments>
|
<argument>-classpath</argument>
|
<classpath />
|
<argument>com.sun.jdmk.tools.MibGen</argument>
|
<argument>-X:use-display-hint</argument>
|
<argument>-d</argument>
|
<argument>${snmp.gen.dir}/org/opends/server/snmp</argument>
|
<argument>-mc</argument>
|
<argument>-desc</argument>
|
<argument>-tp</argument>
|
<argument>org.opends.server.snmp</argument>
|
<argument>${snmp.mib.dir}/rfc2605.txt</argument>
|
<argument>${snmp.mib.dir}/mib_core.txt</argument>
|
<argument>${snmp.mib.dir}/rfc2021.txt</argument>
|
<argument>${snmp.mib.dir}/rfc2788.txt</argument>
|
</arguments>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Creates snmp-mib2605 jar file -->
|
<plugin>
|
<artifactId>maven-jar-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>create-snmp-jar</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>jar</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${jars.dir}</outputDirectory>
|
<finalName>snmp-mib2605</finalName>
|
<includes>
|
<include>org/opends/server/snmp/**</include>
|
<include>admin/extension.manifest</include>
|
</includes>
|
<archive>
|
<index>true</index>
|
<addMavenDescriptor>false</addMavenDescriptor>
|
<manifestEntries>
|
<Extension-Name>snmp-mib2605</Extension-Name>
|
<Implementation-Version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</Implementation-Version>
|
<Revision-Number>${buildRevision}</Revision-Number>
|
</manifestEntries>
|
</archive>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Package the final zip -->
|
<plugin>
|
<artifactId>maven-assembly-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>build-opendj-archive</id>
|
<phase>package</phase>
|
<goals>
|
<goal>single</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${project.build.directory}/package</outputDirectory>
|
<finalName>${lowerCaseProductName}</finalName>
|
<descriptors>
|
<descriptor>src/main/assembly/opendj-snmp-archive-assembly.xml</descriptor>
|
</descriptors>
|
<appendAssemblyId>false</appendAssemblyId>
|
<formats>
|
<format>dir</format>
|
</formats>
|
<archive>
|
<manifestFile>${project.build.outputDirectory}/bootstrap/manifest-bootstrap</manifestFile>
|
</archive>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
</plugins>
|
</build>
|
</profile>
|
|
<profile>
|
<!-- Build man pages -->
|
<id>man-pages</id>
|
|
<build>
|
<plugins>
|
<plugin>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-doc-maven-plugin</artifactId>
|
<version>${project.version}</version>
|
<executions>
|
<execution>
|
<id>generate-man-pages</id>
|
<goals>
|
<goal>generate-refentry</goal>
|
</goals>
|
<phase>process-classes</phase>
|
<configuration>
|
<outputDir>${project.build.directory}/docbkx-sources/man-pages</outputDir>
|
<tools>
|
<tool>
|
<name>backup</name>
|
<application>org.opends.server.tools.BackUpDB</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-1.xml</trailingSectionPath>
|
<trailingSectionPath>backup-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>base64</name>
|
<application>org.opends.server.util.Base64</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>base64-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>control-panel</name>
|
<application>org.opends.guitools.controlpanel.ControlPanelLauncher</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>control-panel-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>create-rc-script</name>
|
<application>org.opends.server.tools.CreateRCScript</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>create-rc-script-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>dbtest</name>
|
<application>org.opends.server.tools.DBTest</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>dbtest-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>dsconfig</name>
|
<application>org.forgerock.opendj.config.dsconfig.DSConfig</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>dsconfig-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>dsjavaproperties</name>
|
<application>org.opends.server.tools.JavaPropertiesTool</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>dsjavaproperties-files.xml</trailingSectionPath>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>dsjavaproperties-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>dsreplication</name>
|
<application>org.opends.server.tools.dsreplication.ReplicationCliMain</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>dsreplication-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>encode-password</name>
|
<application>org.opends.server.tools.EncodePassword</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
|
<trailingSectionPath>encode-password-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>export-ldif</name>
|
<application>org.opends.server.tools.ExportLDIF</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>export-ldif-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>import-ldif</name>
|
<application>org.opends.server.tools.ImportLDIF</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>export-ldif-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldapcompare</name>
|
<application>org.opends.server.tools.LDAPCompare</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>ldapcompare-exit-codes.xml</trailingSectionPath>
|
<trailingSectionPath>files.xml</trailingSectionPath>
|
<trailingSectionPath>ldapcompare-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldapdelete</name>
|
<application>org.opends.server.tools.LDAPDelete</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
|
<trailingSectionPath>files.xml</trailingSectionPath>
|
<trailingSectionPath>ldapdelete-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldapmodify</name>
|
<application>org.opends.server.tools.LDAPModify</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
|
<trailingSectionPath>files.xml</trailingSectionPath>
|
<trailingSectionPath>ldapmodify-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldappasswordmodify</name>
|
<application>org.opends.server.tools.LDAPPasswordModify</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
|
<trailingSectionPath>files.xml</trailingSectionPath>
|
<trailingSectionPath>ldappasswordmodify-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldapsearch</name>
|
<application>org.opends.server.tools.LDAPSearch</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>filters.xml</trailingSectionPath>
|
<trailingSectionPath>attributes.xml</trailingSectionPath>
|
<trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
|
<trailingSectionPath>files.xml</trailingSectionPath>
|
<trailingSectionPath>ldapsearch-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldif-diff</name>
|
<application>org.opends.server.tools.LDIFDiff</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
|
<trailingSectionPath>ldif-diff-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldifmodify</name>
|
<application>org.opends.server.tools.LDIFModify</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>ldifmodify-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>ldifsearch</name>
|
<application>org.opends.server.tools.LDIFSearch</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>ldifsearch-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>list-backends</name>
|
<application>org.opends.server.tools.ListBackends</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>list-backends-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>make-ldif</name>
|
<application>org.opends.server.tools.makeldif.MakeLDIF</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>make-ldif-examples.xml</trailingSectionPath>
|
<trailingSectionPath>make-ldif-see-also.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>manage-account</name>
|
<application>org.opends.server.tools.ManageAccount</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
|
<trailingSectionPath>manage-account-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>manage-tasks</name>
|
<application>org.opends.server.tools.ManageTasks</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>manage-tasks-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>rebuild-index</name>
|
<application>org.opends.server.tools.RebuildIndex</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>rebuild-index-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>restore</name>
|
<application>org.opends.server.tools.RestoreDB</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>restore-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>setup</name>
|
<application>org.opends.quicksetup.installer.SetupLauncher</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>setup-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>start-ds</name>
|
<application>org.opends.server.core.DirectoryServer</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>start-ds-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>status</name>
|
<application>org.opends.server.tools.status.StatusCli</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>status-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>stop-ds</name>
|
<application>org.opends.server.tools.StopDS</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>stop-ds-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>uninstall</name>
|
<application>org.opends.guitools.uninstaller.UninstallLauncher</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
|
<trailingSectionPath>uninstall-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>upgrade</name>
|
<application>org.opends.server.tools.upgrade.UpgradeCli</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>upgrade-exit-codes.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
|
<tool>
|
<name>verify-index</name>
|
<application>org.opends.server.tools.VerifyIndex</application>
|
<trailingSectionPaths>
|
<trailingSectionPath>verify-index-exit-codes.xml</trailingSectionPath>
|
<trailingSectionPath>verify-index-examples.xml</trailingSectionPath>
|
</trailingSectionPaths>
|
</tool>
|
</tools>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
</plugins>
|
</build>
|
</profile>
|
|
<profile>
|
<!-- Build documentation -->
|
<id>docs</id>
|
|
<build>
|
<plugins>
|
<plugin>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>enforce-man-pages-exist</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>enforce</goal>
|
</goals>
|
<configuration>
|
<rules>
|
<requireFilesExist>
|
<files>
|
<file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
|
</files>
|
<message>
|
Man pages not found. You must build with -P man-pages.
|
</message>
|
</requireFilesExist>
|
</rules>
|
<fail>true</fail>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.forgerock.opendj</groupId>
|
<artifactId>opendj-doc-maven-plugin</artifactId>
|
<version>${project.version}</version>
|
<executions>
|
<execution>
|
<id>generate-schema-reference-doc</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>generate-schema-ref</goal>
|
</goals>
|
</execution>
|
|
<execution>
|
<id>generate-log-reference-doc</id>
|
<goals>
|
<goal>generate-xml-messages-doc</goal>
|
</goals>
|
<phase>prepare-package</phase>
|
<configuration>
|
<messagesDirectory>${basedir}/src/messages/org/opends/messages</messagesDirectory>
|
<outputDirectory>${project.build.directory}/docbkx-sources/reference</outputDirectory>
|
<messageFileNames>
|
<!-- for xxx_yyy.properties generates a log-ref-xxx-yyy.xml file -->
|
<messageFileName>admin</messageFileName>
|
<messageFileName>backend</messageFileName>
|
<messageFileName>config</messageFileName>
|
<messageFileName>core</messageFileName>
|
<messageFileName>dsconfig</messageFileName>
|
<messageFileName>extension</messageFileName>
|
<messageFileName>jeb</messageFileName>
|
<messageFileName>logger</messageFileName>
|
<messageFileName>plugin</messageFileName>
|
<messageFileName>protocol</messageFileName>
|
<messageFileName>replication</messageFileName>
|
<messageFileName>schema</messageFileName>
|
<messageFileName>task</messageFileName>
|
<messageFileName>tool</messageFileName>
|
<messageFileName>utility</messageFileName>
|
|
<!-- Ignore following message files as we document only serious errors. -->
|
<!-- <messageFileName>access_control</messageFileName> -->
|
<!-- <messageFileName>admin_tool</messageFileName> -->
|
<!-- <messageFileName>quicksetup.properties</messageFileName> -->
|
<!-- <messageFileName>runtime_information.properties</messageFileName> -->
|
<!-- <messageFileName>version.properties</messageFileName> -->
|
</messageFileNames>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>forgerock-doc-maven-plugin</artifactId>
|
<inherited>false</inherited>
|
<executions>
|
<execution>
|
<id>build-doc</id>
|
<phase>pre-site</phase>
|
<goals>
|
<goal>process</goal>
|
<goal>build</goal>
|
</goals>
|
</execution>
|
<execution>
|
<id>layout-doc</id>
|
<phase>site</phase>
|
<goals>
|
<goal>site</goal>
|
<goal>release</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
</plugins>
|
</build>
|
</profile>
|
|
<!-- Build the debian package -->
|
<profile>
|
<id>package-deb</id>
|
|
<properties>
|
<deb.prefix>/opt/${lowerCaseProductName}</deb.prefix>
|
<deb.docprefix>/usr/share/doc/${lowerCaseProductName}</deb.docprefix>
|
<deb.release>1</deb.release>
|
<deb.maintainer>opendj@forgerock.org</deb.maintainer>
|
<manpage.dir>${project.build.directory}/docbkx/manpages/reference</manpage.dir>
|
</properties>
|
|
<build>
|
<plugins>
|
<plugin>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>enforce-man-pages-exist</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>enforce</goal>
|
</goals>
|
<configuration>
|
<rules>
|
<requireFilesExist>
|
<files>
|
<file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
|
</files>
|
<message>
|
Man pages not found. You must build with -P man-pages.
|
</message>
|
</requireFilesExist>
|
</rules>
|
<fail>true</fail>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Format man pages -->
|
<plugin>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>forgerock-doc-maven-plugin</artifactId>
|
<configuration>
|
<formats combine.self="override">
|
<format>man</format>
|
</formats>
|
</configuration>
|
<executions>
|
<execution>
|
<id>build-man-pages</id>
|
<phase>package</phase>
|
<goals>
|
<goal>process</goal>
|
<goal>build</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Filter deb install and remove scripts -->
|
<plugin>
|
<artifactId>maven-resources-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>copy-deb-scripts</id>
|
<phase>verify</phase>
|
<goals>
|
<goal>copy-resources</goal>
|
</goals>
|
<configuration>
|
<outputDirectory>${project.build.directory}/deb/control</outputDirectory>
|
<resources>
|
<resource>
|
<directory>${basedir}/resource/debian/control</directory>
|
<filtering>true</filtering>
|
</resource>
|
</resources>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Generates changelog.Debian.gz file -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>generate-deb-gzipped-changelog</id>
|
<phase>verify</phase>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
<configuration>
|
<target>
|
<gzip src="resource/debian/changelog" destfile="${project.build.directory}/deb/changelog.Debian.gz" />
|
</target>
|
</configuration>
|
</execution>
|
<execution>
|
<id>gzip-man-pages</id>
|
<phase>verify</phase>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
<configuration>
|
<target>
|
<apply executable="gzip"><!-- Must we also build these packages on Windows? -->
|
<arg value="-9" />
|
<fileset dir="${manpage.dir}" />
|
</apply>
|
</target>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Generates the deb package -->
|
<plugin>
|
<groupId>org.vafer</groupId>
|
<artifactId>jdeb</artifactId>
|
<version>1.3</version>
|
<executions>
|
<execution>
|
<phase>verify</phase>
|
<goals>
|
<goal>jdeb</goal>
|
</goals>
|
<configuration>
|
<deb>${project.build.directory}/deb/${lowerCaseProductName}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${deb.release}.${maven.build.timestamp}_all.deb</deb>
|
<controlDir>${project.build.directory}/deb/control</controlDir>
|
<dataSet>
|
<!-- OpenDJ service file -->
|
<data>
|
<src>${basedir}/resource/sysv/opendj</src>
|
<type>file</type>
|
<mapper>
|
<type>perm</type>
|
<prefix>/etc/init.d</prefix>
|
<filemode>755</filemode>
|
</mapper>
|
</data>
|
|
<!-- Debian copyright file in documentation -->
|
<data>
|
<src>${basedir}/resource/debian/copyright</src>
|
<type>file</type>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.docprefix}</prefix>
|
</mapper>
|
</data>
|
|
<!-- Debian changelog file in documentation -->
|
<data>
|
<src>${project.build.directory}/deb/changelog.Debian.gz</src>
|
<type>file</type>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.docprefix}</prefix>
|
</mapper>
|
</data>
|
|
<!-- OpenDJ archive documentation files -->
|
<data>
|
<src>${project.build.directory}/package/${lowerCaseProductName}</src>
|
<type>directory</type>
|
<includes>legal-notices/**, copyright, example-plugin.zip, changelog.Debian.gz</includes>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.docprefix}</prefix>
|
</mapper>
|
</data>
|
|
<!-- OpenDJ man pages -->
|
<data>
|
<src>${manpage.dir}</src>
|
<type>directory</type>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.prefix}/share/man</prefix>
|
</mapper>
|
</data>
|
|
<!-- OpenDJ archive files without specific permission -->
|
<data>
|
<src>${project.build.directory}/package/${lowerCaseProductName}</src>
|
<type>directory</type>
|
<excludes>**/bat/**, **/*.app/**, **/*.bat*, **/*.exe*, bin/*, template/**/*, lib/*.sh, setup, uninstall, upgrade, legal-notices/**, copyright, README, example-plugin.zip, opendj</excludes>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.prefix}</prefix>
|
</mapper>
|
</data>
|
|
<!-- OpenDJ archive files with specific permission -->
|
<data>
|
<src>${project.build.directory}/package/${lowerCaseProductName}</src>
|
<type>directory</type>
|
<includes>lib/*.sh, bin/*, setup, uninstall, upgrade</includes>
|
<excludes>bin/ControlPanel.app/**</excludes>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.prefix}</prefix>
|
<filemode>755</filemode>
|
</mapper>
|
</data>
|
|
<!-- OpenDJ archive template folder -->
|
<data>
|
<src>${project.build.directory}/package/${lowerCaseProductName}</src>
|
<type>directory</type>
|
<includes>template/**/*</includes>
|
<mapper>
|
<type>perm</type>
|
<prefix>${deb.prefix}</prefix>
|
<filemode>444</filemode>
|
</mapper>
|
</data>
|
</dataSet>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
</plugins>
|
</build>
|
</profile>
|
|
<!-- Build the RPM package -->
|
<profile>
|
<id>package-rpm</id>
|
|
<properties>
|
<rpm.prefix>/opt/${lowerCaseProductName}</rpm.prefix>
|
<rpm.release>1</rpm.release>
|
</properties>
|
|
<build>
|
<plugins>
|
<plugin>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>enforce-man-pages-exist</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>enforce</goal>
|
</goals>
|
<configuration>
|
<rules>
|
<requireFilesExist>
|
<files>
|
<file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
|
</files>
|
<message>
|
Man pages not found. You must build with -P man-pages.
|
</message>
|
</requireFilesExist>
|
</rules>
|
<fail>true</fail>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Format man pages -->
|
<plugin>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>forgerock-doc-maven-plugin</artifactId>
|
<configuration>
|
<formats combine.self="override">
|
<format>man</format>
|
</formats>
|
</configuration>
|
<executions>
|
<execution>
|
<id>build-man-pages</id>
|
<phase>package</phase>
|
<goals>
|
<goal>process</goal>
|
<goal>build</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>rpm-maven-plugin</artifactId>
|
<version>2.0.1</version>
|
<executions>
|
<execution>
|
<id>generate-rpm-package</id>
|
<phase>verify</phase>
|
<goals>
|
<goal>rpm</goal>
|
</goals>
|
</execution>
|
</executions>
|
<configuration>
|
<summary>${shortProductName}</summary>
|
<name>${lowerCaseProductName}</name>
|
<version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</version>
|
<release>${rpm.release}.${maven.build.timestamp}</release>
|
<prefix>${rpm.prefix}</prefix>
|
<license>CDDL</license>
|
<group>Productivity/Networking/LDAP/Servers</group>
|
<url>${docHomepageUrl}</url>
|
<needarch>noarch</needarch>
|
<targetOS>linux</targetOS>
|
|
<defineStatements>
|
<defineStatement>arch noarch</defineStatement>
|
<defineStatement>_prefix ${rpm.prefix}</defineStatement>
|
<defineStatement>_pre ${shortProductName}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</defineStatement>
|
<defineStatement>__os_install_post %{nil}</defineStatement>
|
</defineStatements>
|
|
<mappings>
|
<!-- Add directories -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/bin</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/lib</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/lib/extensions</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/share</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/share/man</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/snmp</directory>
|
</mapping>
|
<mapping>
|
<directory>${rpm.prefix}/snmp/mib</directory>
|
</mapping>
|
|
<!-- Add service script -->
|
<mapping>
|
<directory>/etc/init.d</directory>
|
<directoryIncluded>false</directoryIncluded>
|
<filemode>755</filemode>
|
<sources>
|
<source>
|
<location>${basedir}/resource/sysv/opendj</location>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add documentation sources -->
|
<mapping>
|
<documentation>true</documentation>
|
<directory>/usr/share/doc/${lowerCaseProductName}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/package/${lowerCaseProductName}</location>
|
<includes>
|
<include>**/*.doc</include>
|
<include>**/*.txt</include>
|
<include>**/*example-plugin*</include>
|
</includes>
|
<excludes>
|
<exclude>**/template/**</exclude>
|
<exclude>**/legals/**</exclude>
|
<exclude>**/snmp/**</exclude>
|
</excludes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add executable scripts and libraries -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
<filemode>755</filemode>
|
<sources>
|
<source>
|
<location>${project.build.directory}/package/${lowerCaseProductName}</location>
|
<includes>
|
<include>bin/**</include>
|
<include>lib/*.sh</include>
|
<include>setup</include>
|
<include>uninstall</include>
|
<include>upgrade</include>
|
</includes>
|
<excludes>
|
<exclude>**/*.exe</exclude>
|
<exclude>**/*bat</exclude>
|
<exclude>**/*.app/**</exclude>
|
<exclude>**/*.app</exclude>
|
</excludes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add man pages -->
|
<mapping>
|
<directory>${rpm.prefix}/share/man</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/docbkx/manpages/reference</location>
|
<includes>
|
<include>**/*.*</include>
|
</includes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add other files to the rpm -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/package/${lowerCaseProductName}</location>
|
<excludes>
|
<exclude>template/**</exclude>
|
<exclude>bin/**</exclude>
|
<exclude>lib/*.sh</exclude>
|
<exclude>setup</exclude>
|
<exclude>uninstall</exclude>
|
<exclude>upgrade</exclude>
|
<exclude>**/*.exe</exclude>
|
<exclude>**/*bat</exclude>
|
<exclude>**/readme</exclude>
|
<exclude>**/README</exclude>
|
<exclude>**/*.app/**</exclude>
|
<exclude>**/*.app</exclude>
|
<exclude>**/legal-notices</exclude>
|
<exclude>**/*.doc</exclude>
|
<exclude>**/*.txt</exclude>
|
<exclude>**/*example-plugin*</exclude>
|
</excludes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add files excluded in documentation mapping -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/package/${lowerCaseProductName}</location>
|
<includes>
|
<include>**/legals/**/*.doc</include>
|
<include>**/legals/**/*.txt</include>
|
<include>**/snmp/**/*.doc</include>
|
<include>**/snmp/**/*.txt</include>
|
</includes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add template dir -->
|
<mapping>
|
<directory>${rpm.prefix}/template</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/package/${lowerCaseProductName}/template</location>
|
</source>
|
</sources>
|
</mapping>
|
</mappings>
|
<preinstallScriptlet>
|
<scriptFile>${basedir}/resource/rpm/specs/preinstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</preinstallScriptlet>
|
<postinstallScriptlet>
|
<scriptFile>${basedir}/resource/rpm/specs/postinstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</postinstallScriptlet>
|
<preremoveScriptlet>
|
<scriptFile>${basedir}/resource/rpm/specs/preuninstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</preremoveScriptlet>
|
<postremoveScriptlet>
|
<scriptFile>${basedir}/resource/rpm/specs/postuninstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</postremoveScriptlet>
|
<cleanScriptlet>
|
<scriptFile>${basedir}/resource/rpm/specs/clean.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</cleanScriptlet>
|
<changelogFile>${basedir}/resource/rpm/changelog</changelogFile>
|
</configuration>
|
</plugin>
|
</plugins>
|
</build>
|
</profile>
|
|
<!-- Build the solaris package -->
|
<profile>
|
<id>package-svr4</id>
|
<build>
|
<plugins>
|
<plugin>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>enforce-man-pages-exist</id>
|
<phase>prepare-package</phase>
|
<goals>
|
<goal>enforce</goal>
|
</goals>
|
<configuration>
|
<rules>
|
<requireFilesExist>
|
<files>
|
<file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
|
</files>
|
<message>
|
Man pages not found. You must build with -P man-pages.
|
</message>
|
</requireFilesExist>
|
</rules>
|
<fail>true</fail>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!-- Format man pages -->
|
<plugin>
|
<groupId>org.forgerock.commons</groupId>
|
<artifactId>forgerock-doc-maven-plugin</artifactId>
|
<configuration>
|
<formats combine.self="override">
|
<format>man</format>
|
</formats>
|
</configuration>
|
<executions>
|
<execution>
|
<id>build-man-pages</id>
|
<phase>package</phase>
|
<goals>
|
<goal>process</goal>
|
<goal>build</goal>
|
</goals>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>generate-svr4-package</id>
|
<phase>verify</phase>
|
<goals>
|
<goal>run</goal>
|
</goals>
|
<configuration>
|
<target>
|
<ant antfile="${basedir}/build-svr4.xml">
|
<target name="svr4" />
|
</ant>
|
</target>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
</plugins>
|
</build>
|
</profile>
|
|
</profiles>
|
|
</project>
|