You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Helck, Christopher" <ch...@ebs.com> on 2004/11/17 18:54:30 UTC

How should I use SNAPSHOT?

I thought I understood snapshots, but a recent email has confused me all
over again :-).

The post suggested that if I have two projects A and B then I could set
A's POM to have
  <currentVersion>1.0-SNAPSHOT</currencyVersion>

And that B should depend on A with
     <dependency>
         <artifactId>A</artifactId>
         <version>1.0-SNAPSHOT</version>
     </dependency>


When I try this A gets install in my local repository as A-SNAPSHOT.jar,
and B's build fails because it can't fine A-1.0-SNAPSHOT.jar.
Am I doing something wrong? Is this a real feature? Or is it tied to the
SCM plugin? In any case I wish it worked this way...

Thanks.
C. Helck





The information contained in this e-mail is confidential. This e-mail is intended only for the stated addressee.  If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. if you have received this e-mail in error, please inform us immediately and delete it and all copies from your system.

EBS Dealing Resources International Limited. Registered address: 10 Paternoster Square, London EC4M 7DY, United Kingdom. Registered number 2669861.

EBS Dealing Resources, Inc, registered in Delaware. Address: 535 Madison Avenue, 24th Floor, New York, NY 10022, USA, and One upper Pond road, Building F - Floor 3, Parsippany, NJ 07054, USA.

EBS Dealing Resources Japan Limited, a Japanese Corporation. Address: Asteer Kayabacho Bldg, 6th Floor, 1-6-1, Shinkawa, Chuo-Ku,  Tokyo 104-0033, Japan.


Re: How should I use SNAPSHOT?

Posted by "Craig S. Cottingham" <cr...@cottingham.net>.
On Nov 17, 2004, at 11:54, Helck, Christopher wrote:

> I thought I understood snapshots, but a recent email has confused me 
> all
> over again :-).
>
> The post suggested that if I have two projects A and B then I could set
> A's POM to have
>   <currentVersion>1.0-SNAPSHOT</currencyVersion>
>
> And that B should depend on A with
>      <dependency>
>          <artifactId>A</artifactId>
>          <version>1.0-SNAPSHOT</version>
>      </dependency>

Two things. First, change the dependency in B to

	<dependency>
		<artifactId>A</artifactId>
		<version>SNAPSHOT</version>
	</dependency>

Second, when deploying or installing A, use the "-snapshot" variant of 
the appropriate goal (eg, "maven jar:install-snapshot").

--
Craig S. Cottingham
craig@cottingham.net
OpenPGP key available from:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org