Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h2. Prerequisite

h3. 

Prerequisite

1. Use Genesis 2.0 as a parent pom

...


{code
:xml
xml
}
<parent>
    <groupId>org.apache.geronimo.genesis</groupId>
    <artifactId>genesis-java5-flava</artifactId>
    <version>2.0</version>
</parent>

{code}

* genesis-java5-flava-2.0.pom

...


** genesis-default-flava-2.0.pom

...


*** genesis-2.0.pom

...


**** apache-6.pom

...



h3. 2. Use Maven 2.2.1 (not try if 2.0.10 or 2.0.11 can run)

...



* Enable Apache Servers (refer: [http://maven.apache.org/developers/committer-settings.html])

...



{code
:xml
xml
}
<settings>
...
  <servers>
    <!-- To publish a snapshot of some part of Maven -->
    <server>
      <id>apache.snapshots.https</id>
      <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
      <password> <!-- YOUR APACHE LDAP PASSWORD --> </password>
    </server>
    <!-- To publish a website of some part of Maven -->
    <server>
      <id>apache.website</id>
      <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
      <filePermissions>664</filePermissions>
      <directoryPermissions>775</directoryPermissions>
    </server>
    <!-- To stage a release of some part of Maven -->
    <server>
      <id>apache.releases.https</id>
      <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
      <password> <!-- YOUR APACHE LDAP PASSWORD --> </password>
    </server>
    <!-- To stage a website of some part of Maven -->
    <server>
      <id>stagingSite</id> <!-- must match hard-coded repository identifier in site:stage-deploy -->
      <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
      <filePermissions>664</filePermissions>
      <directoryPermissions>775</directoryPermissions>
    </server>
    ...
  </servers>
</settings>
{code}

h3. 3. Setup PGP Keys (for the ones who be the release manager the first time, refer: [http://maven.apache.org/developers/release/pmc-gpg-keys.html])

...



* Download pnugp2

...


* Generate your PGP Key (refer: [http://www.apache.org/dev/openpgp.html])

...


** How To Avoid SHA-1

...


** How To Generate a Strong Key

...


* Append your key to [https://svn.apache.org/repos/asf/geronimo/KEYS

...

]
* Update Maven's settings.xml with following:

...


{code

...

:xml

...

}
<settings>
  ...
  <profiles>
    <profile>
      <id>apache-release</id>
      <properties>
        <gpg.passphrase> <!-- YOUR KEY PASSPHRASE --> </gpg.passphrase>
      </properties>
    </profile>
  </profiles>
  ...
</settings>

...

{code}

h2. Special changes for releasing the server 2.1.5

...



h3. 1. Add "all-subprojects" profile(Similar with what David Jencks did for 2.2)

...



By default, maven-release-plugin will use the default profile to search all the pom.xml files and auto-update the version numbers. But integration tests are often run from non-pom packaging projects, so We also need include them during the release plugin running. Hence we create a new "all-subprojects" profile:

...


* /pom.xml

...


This profile is just the same as default profile.

...


{code

...

:xml

...

}
        <profile>
            <id>all-subprojects</id>
            <modules>
                <module>repository</module>
                <module>buildsupport</module>
                <module>testsupport</module>
                <module>framework</module>
                <module>plugins</module>
                <module>assemblies</module>
                <module>testsuite</module>
            </modules>
        </profile>

...


{code}
* /framework/configs/pom.xml

...


The config modules are all included by default, but the 4 integration test are not. So if we want this 4 projects' pom can be updated by maven-release-profile, we need explicitly point out.

...


{code

...

:xml

...

}
        <profile>
            <id>all-subprojects</id>
            <modules>
                <module>geronimo-gbean-deployer/src/it/j2ee-system-it1</module>
                <module>geronimo-gbean-deployer/src/it/j2ee-system-it2</module>
                <module>geronimo-gbean-deployer/src/it/metadatageneration-it3</module>
                <module>geronimo-gbean-deployer/src/it/metadatageneration-it4</module>
            </modules>
        </profile>

...

{code}
btw, I refactored the names of above 4 itest to make them the same with 2.2, i.e.

...


** j2ee-system \-> j2ee-system-it1

...


** j2ee-system-2 \-> j2ee-system-it2

...


** metadatageneration \-> metadatageneration-it3

...


** metadatageneration-2 \-> metadatageneration-it4

...


* /plugins/pom.xml (and some others do not need to add "all-subprojects" profile)

...


Not all the pom.xml must have an "all-subprojects" in file. If there is no special projects as above, you can just leave the pom as is (take /plugins/pom.xml as example).

...


* /testsuite/pom.xml and its childern

...


A lot of efforts ware put on testsuite. When run with "all-subprojects" profile to do a release, we don't need really run and pass the tests. Remember the goal of this profile is just to find all the sub-projects' pom files so that release-plugin can auto update their versions.

...


* prepare the release

...


{code

...

:xml

...

}
mvn release:prepare -DdryRun=true -Pall-subprojects -Papache-release -Dtest=false

...

{code}
In above command *\-Dtest=false* seems not take effect?? So, currently I add following in root pom's all-subprojects profile.

...


{code

...

:xml

...

}
<properties>
  <maven.test.skip>true</maven.test.skip>
</properties>

...

{code}
and use the following command:

...


{code

...

:xml

...

}
mvn release:prepare -DdryRun=true -Pall-subprojects

...

{code}
** Check if all pom.xml files have a pom.xml.tag generated

...


Compare the quantity of the 2 files

...


** and if the versions in pom.xml.tag are updated correctly,

...


The only things that should be different between these files are the <version>  and <scm> elements.

...


** and if there is no "SNAPSHOT" in pom.xml.tag files.

...


Just find in files..

...



h3. 2. Don't deploy the test artifacts to maven repo

...



Because there are a lot of sub-projects that not need to be released, such as integration tests and testsuites, we need filter them out when do maven deploy:

...


{code
:xml
xml
}
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
            <skip>true</skip>
        </configuration>
    </plugin>
{code}
* /framework/configs/geronimo-gbean-deployer/src/it/j2ee-system-it1/pom.xml

...


* /framework/configs/geronimo-gbean-deployer/src/it/j2ee-system-it2/pom.xml

...


* /framework/configs/geronimo-gbean-deployer/src/it/metadatageneration-it3/pom.xml

...


* /framework/configs/geronimo-gbean-deployer/src/it/metadatageneration-it4/pom.xml

...


* /testsuite/pom.xml

...



h3. 3. Other changes

...



* Remove *tools-maven-plugin* and use the *ianal-maven-plugin*(defined in genesis-default-flava-2.0.pom) to verify-legal-files

...


** Add following in testsuite/pom.xml

...


{code

...

:xml

...

}
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>ianal-maven-plugin</artifactId>
                <configuration>
                    <!-- Don't bother checking legal file here, we never publish them. -->
                    <skip>true</skip>
                </configuration>
            </plugin>

...

{code}
* Remove a bunch of maven plugins definition in server root pom
* Update xmlbeans-maven-plugin to 2.3.3 and remove all the following hacked codes:

...


{code

...

:xml

...

}
            <!--
            HACK: Copy XmlBeans generated schemas.
            -->
            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>buildsupport-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy-xmlbeans-schemas</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

...

Release memo

...

{code}

h2. Release memo


h3. 1. NOTICE.txt files

...



* Check the "Year" of copyright in all NOTICE.txt file.

...



h3. 2. Before

...

 release, need manually update versions from *2.1.5-SNAPSHOT* to *2.1.5*

* Update the *VERSION* in *README.txt / RELEASE_NOTES-2.1.5-SNAPSHOT.txt

...

,* and rename to RELEASE_NOTES-2.1.5

...

.txt
* Update *<version> properties* in root pom.xml ?? (need update to <version>${version}</version>)
* Update versions in "assemblies\geronimo-boilerplate-minimal\src\main\underlay\etc*\gsh-classworlds.conf

...

3. After release:

...

*"
* Others
** plugins\remote-deploy\geronimo-remote-deploy\src\main\webapp\WEB-INF\geronimo-web.xml
** plugins\welcome\geronimo-welcome\src\main\webapp\WEB-INF\geronimo-web.xm
** framework\modules\geronimo-plugin\src\test\resources\geronimo-plugins.xml
** framework\modules\geronimo-upgrade\src\test\resources\gbean_1.xml
framework\modules\geronimo-upgrade\src\test\resources\gbean_1_result.xml
** framework\configs\geronimo-gbean-deployer\src\it\j2ee-system-it1\src\test\resources\META-INF\geronimo-plugin.xml
framework\configs\geronimo-gbean-deployer\src\it\j2ee-system-it1\src\test\resources\META-INF\plan.xml
framework\configs\geronimo-gbean-deployer\src\it\metadatageneration-it3\src\test\resources\META-INF\geronimo-plugin.xml


h3. 3. After release, update versions to 2.1.6-SNAPSHOT


* Update *artifact-alias,* add version 2.1.5 in artifact-alias after 2.1.5 release
** /framework/configs/pom.xml
** /plugins/client/pom.xml
** /plugins/corba/client-corba-yoko/pom.xml
** /plugins/pom.xml
* Revert versions definition in *README.txt / RELEASE_NOTES-2.1.5.txt,&nbsp; rename to* *RELEASE_NOTES-2.1.6-SNAPSHOT.txt,*
* Update *<version> properties* from *${version}* to *2.1.6-SNAPSHOT* in root pom.xml

...

 so that can be built in mvn 2.0.10
* Update versions in "assemblies\geronimo-boilerplate-minimal\src\main\underlay\etc\{*}gsh-classworlds.conf*"
* Others, same as in #2