Maven/Release

HomePage | Maven | RecentChanges | Preferences

Testing the Struts Maven 2 Release Process

Make sure that people.apache.org's DSA fingerprint is a "known host" on the machine you're going to use. Make sure that you can deploy to the repo w/ scp without a password. (public key in place on people.apache.org.) From action/core: mvn deploy (will deploy a snapshot)

Create struts/struts/action/trunk and struts/struts-action/tags in the ASF test repo

Export the latest struts-action code and import into the ASF test repo

svn export http://svn.apache.org/repos/asf/struts/action/trunk struts-action
svn import struts-action https://svn.apache.org/repos/test/struts/struts-action/trunk -m "Import to practice Maven release:prepare and release:perform"

The import is r151417.

Check out a copy from the test repo:

cd ~/svn/test-repo
svn co https://svn.apache.org/repos/test/struts/struts-action/trunk struts-action-test

Create cvs.apache.org/builds/struts/maven/test-repo and cvs.apache.org/builds/struts/maven/test-site

Modify the struts-action-parent pom to point to our "test repo" and "test site" locations rather than the usual snapshot repository and website locations. (r151418)

Apply patch to the Mailreader DAO test that was leaving a test-database.xml file around. (James' r392968, r151417 in the test repo)

mvn release:prepare -DtagBase=https://svn.apache.org/repos/test/struts/struts-action/tags

...
[INFO] [release:prepare]
[INFO] What tag name should be used?
STRUTS_ACTION_1_3_2
[INFO] Verifying there are no local modifications ...          <-- presence of unversioned files causes a problem here
[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.apache.struts.action:struts-action-p
arent'? [1.3.2]
                                                               <-- press enter to accept the default
[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.apache.struts.action:struts-core'? [
1.3.2]

[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.apache.struts.action:struts-taglib'?
 [1.3.2]

...


[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.apache.struts.action:struts-action-a
ssembly'? [1.3.2]

[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.apache.struts.action:struts-action-i
t'? [1.3.2]

[INFO] Checking lineage for snapshots ...
[INFO] Checking dependencies for snapshots ...
[INFO] Checking plugins for snapshots ...
[INFO] What is the release version for 'org.apache.struts.action:taglib-it'? [1.
3.2]

[INFO] Checking in modified POMs
                                                <-- I assume it will prompt for a password if it needs one.

[INFO] Tagging release with the label STRUTS_ACTION_1_3_2.
[INFO] What is the new development version for 'org.apache.struts.action:struts-
action-parent'? []                                                               <-- No default??
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
core'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
taglib'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
el'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
extras'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
faces'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
scripting'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
apps'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
cookbook'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
faces-example1'? []
1.3.3
[INFO] What is the new development version for 'org.apache.struts.action:struts-
faces-example2'? []
                                         
...                              <-- We could definitely use a default, there are 20 poms!

[INFO] Checking in development POMs
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 minutes 18 seconds
[INFO] Finished at: Mon Apr 10 20:28:48 GMT-07:00 2006
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------

$ cat release.properties
#Generated by Release Plugin on: Mon Apr 10 20:28:48 GMT-07:00 2006
#Mon Apr 10 20:28:48 GMT-07:00 2006
scm-info.org.apache.struts.action\:struts-core.developerConnection=scm\:svn\:https\://svn.apache.org/repos/asf/struts/action/trunk
checkpoint.check-in-development-version=OK
scm-info.org.apache.struts.action\:struts-action-parent.connection=scm\:svn\:http\://svn.apache.org/repos/test/struts/struts-action
scm-info.org.apache.struts.action\:struts-core.tag=HEAD
checkpoint.local-modifications-checked=OK
scm.tag=STRUTS_ACTION_1_3_2
checkpoint.prepared-release=OK
scm-info.org.apache.struts.action\:struts-core.url=http\://svn.apache.org/repos/
asf/struts/action/trunk
maven.username=wsmoak
checkpoint.transform-pom-for-development=OK
scm-info.org.apache.struts.action\:struts-action-parent.developerConnection=scm\:svn\:https\://svn.apache.org/repos/test/struts/struts-action
scm-info.org.apache.struts.action\:struts-action-assembly.tag=HEAD
checkpoint.initialized=OK
scm.url=scm\:svn\:https\://svn.apache.org/repos/test/struts/struts-action
checkpoint.transformed-pom-for-release=OK
scm-info.org.apache.struts.action\:struts-action-parent.tag=HEAD
checkpoint.tagged-release=OK
scm-info.org.apache.struts.action\:struts-action-assembly.developerConnection=scm\:svn\:https\://svn.apache.org/repos/asf/struts/action/trunk/assembly
scm-info.org.apache.struts.action\:struts-action-assembly.url=http\://svn.apache.org/viewcvs.cgi/struts/action/trunk/assembly
scm.tag-base=https\://svn.apache.org/repos/test/struts/struts-action/tags
scm-info.org.apache.struts.action\:struts-core.connection=svm\:svn\:http\://svn.
apache.org/repos/asf/struts/action/trunk
scm-info.org.apache.struts.action\:struts-action-parent.url=http\://svn.apache.org/viewcvs.cgi/struts/action/trunk
scm-info.org.apache.struts.action\:struts-action-assembly.connection=scm\:svn\:http\://svn.apache.org/repos/asf/struts/action/trunk/assembly
checkpoint.checked-in-release-version=OK

Some of the URLS have /repos/asf/ rather than the test repo! Fix this and try again...

$ mvn release:perform
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Struts Action
[INFO]   Struts Action - Core
[INFO]   Struts Action - Taglib
[INFO]   Struts Action - EL
[INFO]   Struts Action - Extras
[INFO]   Struts Action - Faces
[INFO]   Struts Action - Scripting
[INFO]   Struts Action - Apps
[INFO]   Struts Action - Apps - Cookbook
[INFO]   Struts Action - Apps - Faces Example 1
[INFO]   Struts Action - Apps - Faces Example 2
[INFO]   Struts Action - Apps - Examples
[INFO]   Struts Action - Apps - Blank
[INFO]   Struts Action - Mailreader DAO
[INFO]   Struts Action - Apps - Mailreader
[INFO]   Struts Action - Apps - Struts EL Exercise
[INFO]   Struts Action - Apps - Scripting Mailreader
[INFO]   Struts Action - Assembly
[INFO]   Struts Action - Integration Tests
[INFO]   Struts Action - Integration - Taglib Tests
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Struts Action
[INFO]    task-segment: [release:perform] (aggregator-style)
[INFO] -------------------------------------------------------------------------
---
[INFO] [release:perform]
[INFO] Checking out the project to perform the release ...







Troubleshooting

Missing -DtagBase attribute on 'mvn release:prepare'

[INFO] Tagging release with the label STRUTS_ACTION_1_3_2_TEST.
Provider message:
The svn tag command failed.
Command output:
svn: Cannot copy path '.' into its own child '../tags/STRUTS_ACTION_1_3_2_TEST'

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error is occurred in the tag process.

Embedded error: Error!
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 40 seconds
[INFO] Finished at: Mon Apr 10 18:29:19 GMT-07:00 2006
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------


Missing <groupId> in pom -- groupId is not properly inherited during release:prepare

[INFO] Checking in modified POMs
[INFO] Tagging release with the label STRUTS_ACTION_1_3_2_TEST.
[INFO] What is the new development version for 'org.apache.struts.action:struts-
action-parent'? []
1.3.3-SNAPSHOT
[INFO] What is the new development version for 'org.apache.struts.action:struts-
core'? []
1.3.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] groupId was null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException: groupId was null
        at org.apache.maven.artifact.ArtifactUtils.versionlessKey(ArtifactUtils.
java:51)
        at org.apache.maven.plugins.release.helpers.ProjectScmRewriter.restoreSc
mInfo(ProjectScmRewriter.java:51)
        at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRe
leaseMojo.java:259)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:534)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:488)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:458)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:219)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 5 seconds
[INFO] Finished at: Mon Apr 10 19:09:24 GMT-07:00 2006
[INFO] Final Memory: 5M/11M
[INFO] ------------------------------------------------------------------------


Possibly a bad interaction between Tortoise SVN and Cygwin's svn client. It happens often. :(

[INFO] [release:perform]
[INFO] Checking out the project to perform the release ...
Provider message:
The svn command failed.
Command output:
svn: Can't move 'checkout/extras/src/java/org/apache/struts/.svn/tmp/entries' to
 'checkout/extras/src/java/org/apache/struts/.svn/entries': Permission denied

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error is occurred in the checkout process.

Embedded error: Error!
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 minutes 48 seconds
[INFO] Finished at: Mon Apr 10 20:37:50 GMT-07:00 2006
[INFO] Final Memory: 3M/8M
[INFO] ------------------------------------------------------------------------

HomePage | Maven | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited April 10, 2006 10:01 pm by WendySmoak (diff)
Search: