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

Gaetan Boismal
05.49.2016 f975e01f95fba614e63ca3a05b18fc98c08b5878
OPENDJ-2569 Make archive names consistent

* Renames OpenDJ-OEM-4.0.0.zip to opendj-
oem-4.0.0[-[SNAPSHOT|RCX|MX]].zip
* Renames opendj[-oem]_4.0.0-1.yyyymmdd-hhmm_all.deb to
opendj[-oem]_4.0.0[-[SNAPSHOT|RCX|MX]]-1_all.deb
* Renames opendj[-oem]-4.0.0[-[SNAPSHOT|RCX|MX]]_1.noarch.rpm to
opendj[-oem]-4.0.0[_[SNAPSHOT|RCX|MX]]-1.noarch.rpm
* Renames opendj-4.0.0.msi to opendj-4.0.0-SNAPSHOT.msi

For the rpm package name, the version cannot contains any dash.
So if the maven version contains a dash (i.e if it is not a release
version), we replace dash character by an underscore.
4 files modified
56 ■■■■■ changed files
opendj-packages/opendj-deb/pom.xml 6 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-msi/opendj-msi-standard/pom.xml 6 ●●●● patch | view | raw | blame | history
opendj-packages/opendj-rpm/pom.xml 37 ●●●● patch | view | raw | blame | history
opendj-packages/opendj-zip/opendj-zip-oem/pom.xml 7 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-deb/pom.xml
@@ -21,7 +21,7 @@
  !
  ! CDDL HEADER END
  !
  !      Copyright 2015 ForgeRock AS.
  !      Copyright 2015-2016 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">
@@ -160,9 +160,7 @@
                                <goal>jdeb</goal>
                            </goals>
                            <configuration>
                                <deb>
                                    ${project.build.directory}/${deb.product.name.lowercase}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${deb.release}.${maven.build.timestamp}_all.deb
                                </deb>
                                <deb>${project.build.directory}/${deb.product.name.lowercase}_${project.version}-${deb.release}_all.deb</deb>
                                <controlDir>${project.build.directory}/deb/control</controlDir>
                                <dataSet>
                                    <!-- OpenDJ service file -->
opendj-packages/opendj-msi/opendj-msi-standard/pom.xml
@@ -21,7 +21,7 @@
  !
  ! CDDL HEADER END
  !
  !      Copyright 2015 ForgeRock AS.
  !      Copyright 2015-2016 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">
@@ -133,13 +133,13 @@
                                        <exec executable="light.exe" dir="${project.build.directory}/msi">
                                            <arg value="-nologo" />
                                            <arg value="-ext" /> <arg value="WixUIExtension" />
                                            <arg value="-out" /> <arg value="dist/${product.name.lowercase}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.msi" />
                                            <arg value="-out" /> <arg value="dist/${product.name.lowercase}-${project.version}.msi" />
                                            <arg value="build/package.wixobj" />
                                            <arg value="build/payload.wixobj" />
                                        </exec>
                                        <!-- Attach msi artifact to the build -->
                                        <attachartifact file="${project.build.directory}/msi/dist/${product.name.lowercase}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.msi" />
                                        <attachartifact file="${project.build.directory}/msi/dist/${product.name.lowercase}-${project.version}.msi" />
                                    </target>
                                </configuration>
                            </execution>
opendj-packages/opendj-rpm/pom.xml
@@ -21,7 +21,7 @@
  !
  ! CDDL HEADER END
  !
  !      Copyright 2015 ForgeRock AS.
  !      Copyright 2015-2016 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">
@@ -88,20 +88,37 @@
                    </executions>
                </plugin>
                <!--
                    This plugin execution is used to replace the dash in the project version (if any) by an
                    underscore since an rpm package name must follow the Name-Version-Release pattern so the
                    Version field cannot contains dash.
                -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>regex-property</id>
                            <goals>
                                <goal>regex-property</goal>
                            </goals>
                            <configuration>
                                <name>rpm.version</name>
                                <value>${project.version}</value>
                                <regex>(.*)[-](.*)</regex>
                                <replacement>$1_$2</replacement>
                                <failIfNoMatch>false</failIfNoMatch>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>rpm-maven-plugin</artifactId>
                    <version>2.1.4</version>
                    <executions>
                        <execution>
                            <id>properties</id>
                            <phase>package</phase>
                            <goals>
                                <goal>version</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>generate-rpm-package</id>
                            <phase>package</phase>
                            <goals>
@@ -137,7 +154,7 @@
                        <defineStatements>
                            <defineStatement>arch noarch</defineStatement>
                            <defineStatement>_prefix ${rpm.prefix}</defineStatement>
                            <defineStatement>_pre ${rpm.product.name.lowercase}-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</defineStatement>
                            <defineStatement>_pre ${rpm.product.name.lowercase}-${rpm.version}</defineStatement>
                            <defineStatement>__os_install_post %{nil}</defineStatement>
                        </defineStatements>
opendj-packages/opendj-zip/opendj-zip-oem/pom.xml
@@ -21,7 +21,7 @@
  !
  ! CDDL HEADER END
  !
  !      Copyright 2015 ForgeRock AS.
  !      Copyright 2015-2016 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">
@@ -52,6 +52,7 @@
            ${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>
        <product.archive.name>${product.name.lowercase}-oem-${project.version}</product.archive.name>
    </properties>
    <dependencies>
@@ -225,9 +226,7 @@
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <finalName>
                                ${product.name}-OEM-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}
                            </finalName>
                            <finalName>${product.archive.name}</finalName>
                            <descriptors>
                                <descriptor>src/main/assembly/opendj-zip-oem-archive-assembly.xml</descriptor>
                            </descriptors>