Releasing a snapshot for testing
Deploying a snapshot
To allow snapshots to be used for testing they need to be placed in a public place. Assuming that the distributionManagement/snapshotRepository settings in pom/pom.xml are correct a module, or set of modules, can be deployed to the snapshot repository using
$ mvn deploy
providing that the module's POM's version is for a snapshot, eg 1.0.1-SNAPSHOT.
You can check in our repository ( http://nakedobjects.sourceforge.net/m2-repo/snapshot/org/nakedobjects/) to ensure it has been uploaded.
Using a snapshot
To use a snapshot in your build change the referenced version element to the snaphot's version number (ie 1.0.1-SNAPSHOT) and ensure that public repository is being accessed otherwise you will get the usual "Missing" message:
Missing:
----------
1) org.nakedobjects.plugins:html-viewer:jar:1.0.1-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.nakedobjects.plugins -DartifactId=html-viewer -Dversion=1.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.nakedobjects.plugins -DartifactId=html-viewer -Dversion=1.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.test:myapp-commandline:jar:1.0-SNAPSHOT
2) org.nakedobjects.plugins:html-viewer:jar:1.0.1-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
org.test:myapp-commandline:jar:1.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
To use our repository add the following to your project pom.xml or your settings.
<repositories>
<repository>
<id>no-snapshotsd</id>
<url>http://nakedobjects.sourceforge.net/m2-repo/snapshot/</url>
</repository>
</repositories>
Releasing a fixed module (rather than a complete release)
I need to release a bug fix. As the full release is not ready we are going to tr releasing just the necessary components. In this case it is the runtime module, and we should release a new release pom to provide the dependency.
Here's what I did:-
- Created a branch for the fixes to made in
- Check out the new branch - by using the not recursive flag (-N) I avoided having to check out the whole tree
- Made the changes - fixed the problem and updated the version in the POM
- Changed the version referenced in the release POM and updated its version as well
- Checked it by referring to the new version of the release module.
- Committed the changes
- Created a tag
- deployed the changed modules (mvn deploy)

rss