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>
  • Posted: 2010-03-05 14:22 (Updated: 2010-03-05 14:44)
  • Author: rcmatthews
  • Categories: (none)

Comments

No comments.