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

Jean-Noel Rouvignac
02.59.2013 d2bef6fba55a6b2ea9af34d60d4860a886de502c
Added "prepare-release" build target, made b2.6 depend on the latest from b2.6-sdk



build.xml:
Added targets "prepare-release", "check-no-snapshot-dependencies" and "resolve-snapshots-separately".

ivy.xml:
Now depends on the latest from b2.6-sdk.




Sample output on failure:
------------------------------------------------------------------------
branches/b2.6 $ ant prepare-release
Buildfile: /opendj2/branches/b2.6/build.xml
Trying to override old definition of task javac

clean-lib:

check-ivy-installed:

download-ivy:

install-ivy:

resolve-snapshots-separately:
[ivy:retrieve] ...
[ivy:retrieve] 23 artifacts copied, 0 already retrieved (9038kB/30ms)

check-no-snapshot-dependencies:

BUILD FAILED
/opendj2/branches/b2.6/build.xml:2775: The project must not depend on snapshot dependencies. Found: opendj-ldap-sdk-2.6.5-SNAPSHOT.jar;opendj-rest2ldap-2.6.5-SNAPSHOT.jar;opendj-rest2ldap-servlet-2.6.5-SNAPSHOT.jar;opendj-server2x-adapter-2.6.5-SNAPSHOT.jar
------------------------------------------------------------------------




Sample output on success:
------------------------------------------------------------------------
[ivy:retrieve] 23 artifacts copied, 0 already retrieved (9038kB/28ms)

check-no-snapshot-dependencies:
[echo] OK.

prepare-release:
[echo]
[echo] Previous checks succeeded.
[echo]
[echo] Please:
[echo] 1- Check the archive has no build number
[echo] 2- Check the archive contains the license
[echo] 3- Run the tests
[echo] 4- Check that documentation refers to forgerock.com instead of forgerock.org
[echo]
------------------------------------------------------------------------
2 files modified
50 ■■■■■ changed files
opends/build.xml 42 ●●●●● patch | view | raw | blame | history
opends/ivy.xml 8 ●●●● patch | view | raw | blame | history
opends/build.xml
@@ -270,6 +270,18 @@
       description="Perform all processing needed for weekly builds.">
  </target>
  <target name="prepare-release" depends="check-no-snapshot-dependencies"
       description="Performs all the checks to prepare a release.">
    <echo>
Previous checks succeeded.
Please:
1- Check the archive has no build number
2- Check the archive contains the license
3- Run the tests
4- Check that documentation refers to forgerock.com instead of forgerock.org
    </echo>
  </target>
@@ -2830,10 +2842,36 @@
    <ivy:retrieve pattern="${lib.dir}/[type]/[artifact].[ext]"/>
  </target>
  <property name="snapshots.dir" value="${lib.dir}/snapshots" />
  <target name="resolve-snapshots-separately" depends="install-ivy">
    <ivy:retrieve type="jar,bundle" pattern="${lib.dir}/[artifact]-[revision].[ext]">
      <firstmatchmapper>
        <globmapper from="${lib.dir}/*-SNAPSHOT.jar" to="${snapshots.dir}/*-SNAPSHOT.jar" />
        <globmapper from="${lib.dir}/*" to="${lib.dir}/releases/*" />
      </firstmatchmapper>
    </ivy:retrieve>
  </target>
  <fileset dir="${snapshots.dir}" id="snapshots.dir.ref" erroronmissingdir="false">
    <include name="**"/>
  </fileset>
  <target name="check-no-snapshot-dependencies" depends="cleanlib,resolve-snapshots-separately">
    <fail message="The project must not depend on snapshot dependencies. Found: ${toString:snapshots.dir.ref}">
      <condition>
        <resourcecount refid="snapshots.dir.ref" when="greater" count="0" />
      </condition>
    </fail>
    <antcall target="cleanlib" />
    <echo message="OK." />
  </target>
  <target name="cleanlib" description="--> clean the lib directory">
    <delete>
    <delete includeemptydirs="true">
      <fileset dir="${lib.dir}">
        <include name="**/*.jar" />
        <include name="**" />
        <exclude name="opendj_service.exe" />
        <exclude name="winlauncher.exe" />
        <exclude name="launcher_administrator.exe" />
      </fileset>
    </delete>
  </target>
opends/ivy.xml
@@ -36,7 +36,13 @@
<ivy-module version="2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
  <info organisation="org.forgerock" module="opendj"/>
  <info organisation="org.forgerock" module="opendj" branch="b2.6">
    <license     name="CDDL v1.0"    url="http://forgerock.org/license/CDDLv1.0.html" />
    <ivyauthor   name="ForgeRock AS" url="http://forgerock.com" />
    <description homepage="http://opendj.forgerock.org/" />
  </info>
  <dependencies>
    <!-- compile + runtime libs -->