This is an appendix to the overall Derby release instructions found here: DerbySnapshotOrRelease

This page contains deprecated release instructions.

Table of Contents


Maven deploy

  1. Deploy to Maven repository.
    1. If you do not already have the latest Maven 1 distribution, download it, unpack it, and put the bin directory into your path so that you can run maven commands.

      • {i} As of this writing, the latest 1.x version of Maven was 1.1.

    2. cd into Derby's maven directory. Typically this will be in the same sandbox that you used to build the release, but this is not strictly required.

    3. Edit project.xml so that it contains the correct version number for this release between the <currentversion> tags.

    4. Edit

      • Add username, and password for your account on so you can properly authenticate and copy the files to people. The scpexe protocol should work without problems, especially if you have an ssh public key already on people.

      • Make sure derby.jars points to the directory holding the release jars. jars/insane is the default, so if you backed up the jars somewhere else when you built the release you must adjust this property accordingly. You also need modify this property if you are using a sandbox other than the one you used to build the release.

      • Uncomment #maven.repo.list=apache. It commented out by default to prevent accidental deployments. Your local diff should look something like:

    5. Run the Maven commands.
      • Run maven to attain the multiproject:install goal to install the artifacts into your local maven repo.

        • {X} Note: For I had to type maven multiproject:install to get this to work.

      • Run maven clean to attain the multiproject:clean goal to clean up the maven tree.

      • Run maven multiproject:deploy to copy all the artifacts into the apachecvs repository.

        <!> The multiproject:deploy command will not work unelss you uncomment the maven.repo.list property in

        {i} This does not build using maven, it works by copying the jars pointed to by ${derby.jars} (jars/${sanity} by default).

    6. Sign the individual jars.
      • Unfortunately, Maven renames the jars during deployment, so the jars now found in the Maven repository have the version number embedded in the file name. E.g derby.jar has become derby-x.y.z.w.jar. The name of the signature file needs to same as the name of jar with the asc extension, but Maven apparently knows nothing about signatures, so we have to create correctly named signatures by hand. The following script signs and renames the jars appropriately, and should be run in the ${derby.jars} directory.

        for i in *.jar
          gpg --armor --detach-sign $i   // enter your PGP passphrase for each iteration.
        for i in *.jar.asc
          PREFIX=`echo $i | sed 's/.jar.asc//g'`
          NEWNAME=$PREFIX-x.y.z.w.jar.asc   //use the correct version number for this release.
          mv $i $NEWNAME
    7. Upload the signatures to the jars directory:
      • sftp {username}
        cd /www/
        put *.jar.asc

        {i} If you don't upload the signatures for the jar files, you will probably receive an email saying that you did not upload appropriate PGP signatures for the new files added to

    8. {X} Ensure that the uploaded files have useful permissions. They need to be rw-r--r-- (chmod 644).

    9. Revert local modifications in the maven directory.

      {i} The deployment of the jars and poms to the Maven 1 repository will be automatically converted to appropriate jars and poms for Maven 2 and deployed to that repository as well. See DERBY-1378 for more information on the automatic conversion to Maven 2.

  2. {X} The maven deploy step expects to do scp without prompting for passwords. If you can normally do scp, but get an error reflecting 'Failed to deploy', in org.apache.maven.wagon.providers.ssh.external.ScpExternalWagon.put, you may not have this set up. If this is the problem, one workaround is to do the copying manually, as outlined in the next section. Or you can do the following steps (and ensure that you append .ssh/authorized_keys, not overwrite):

    • $ ssh-keygen -t dsa
      --> press ENTER when prompted for a pass-phrase to get a null phrase.
      $ scp ~/.ssh/
      $ ssh
      $ cat >> .ssh/authorized_keys
  3. {X} Maven may not work for you especially on Windows. If Maven does not copy the build artifacts to subdirectories under /www/, then you will have to do this yourself. In this scenario, you must use Maven to deploy the build artifacts to your local file system, sign them and then sftp the results to

    1. To deploy the build artifacts to your local file system, set up something like this:
      • maven.repo.list=apache
    2. Then do
      • $ maven clean $ maven multiproject:deploy This will build the artifacts into a subtree rooted at /home/myself/zdir/garbage.
    3. Sign the jars using the following script:
      •    for i in `ls *.jar`
             gpg --armor --detach-sign $i
    4. Use sftp to bulk put the artifacts into the corresponding subdirectories of www/ Note that there are 3 directories of files (jars, poms, wars) which must be sftp'd from your machine to the tree on

Symlinks to the current release were dropped in September 2011 (see thread on derby-dev). 

DeprecatedReleaseInstructions (last edited 2011-09-08 08:58:28 by cm-84)