You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Skopp <sk...@riege.de> on 2003/09/02 18:36:41 UTC
SNAPSHOT download overwrites more recent local file
Hi guys,
I have the problem that I have created fresh and most-recent new snaphot
jars in my _local_ repository (lets say in project A).
Now I like to test them inside Project B with depends upon this
snapshots jar!
Problem: In online mode, maven downloads the snapshots jars from it's
remove repository and overwrites the fresh most-recent jars which I just
installed into my local repo.
As a workaround, of course I can run in offline mode, but this has other
drawbacks (e.g. if meanwhile project B needs to download a new jar).
Is there any option inside maven to prevent such a behaviour in online
mode? IMHO maven should replace the snapshot jar only if the remote
version is _really_ younger than the one on my local harddrive!
You help and comments highly appreciated,
--
Martin Skopp
Riege Software International GmbH
Support: mailto:maint@riege.com, Information: http://www.riege.com
This email is intended to be viewed with a nonproportional font.
Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: SNAPSHOT download overwrites more recent local file
Posted by Martin Skopp <sk...@riege.de>.
On Tue, 2003-09-02 at 18:56, dion@multitask.com.au wrote:
> Sounds like a bug to me.
> --
> dIon Gillard, Multitask Consulting
Filed in JIRA as MAVEN-772.
I am sorry but I was unable to provide a patch - have no idea where to
check the maven sources. If one helps me a little and tells me which
classes do the download, I am looking into the sources myself and try to
provide a patch....
Thanks in advance,
Martin
> Martin Skopp <sk...@riege.de> wrote on 03/09/2003 02:36:41 AM:
> > I have the problem that I have created fresh and most-recent new snaphot
> > jars in my _local_ repository (lets say in project A).
> >
> > Now I like to test them inside Project B with depends upon this
> > snapshots jar!
> >
> > Problem: In online mode, maven downloads the snapshots jars from it's
> > remove repository and overwrites the fresh most-recent jars which I just
> > installed into my local repo.
> >
> > As a workaround, of course I can run in offline mode, but this has other
> > drawbacks (e.g. if meanwhile project B needs to download a new jar).
> >
> > Is there any option inside maven to prevent such a behaviour in online
> > mode? IMHO maven should replace the snapshot jar only if the remote
> > version is _really_ younger than the one on my local harddrive!
> >
> > You help and comments highly appreciated,
> > --
> > Martin Skopp
--
Martin Skopp
Riege Software International GmbH
Support: mailto:maint@riege.com, Information: http://www.riege.com
This email is intended to be viewed with a nonproportional font.
Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: SNAPSHOT download overwrites more recent local file
Posted by Vincent Massol <vm...@pivolis.com>.
I've also had several reports like this on my current project. I haven't
been able yet to tell whether the problem was due to:
- a bad machine date (either local machine or remote repo machine)
- a web server not supporting if-modified-since
- a bug
I have looked at the source code and couldn't find any reason why it
wouldn't work as expected (in HttpUtils, from CVS HEAD):
[...]
boolean hasTimestamp = false;
if ( useTimestamp && destinationFile.exists() )
{
timestamp = destinationFile.lastModified();
hasTimestamp = true;
}
[...]
if ( useTimestamp && hasTimestamp )
{
connection.setIfModifiedSince( timestamp );
}
[...]
if ( httpConnection.getResponseCode() ==
HttpURLConnection.HTTP_NOT_MODIFIED )
{
return;
}
Any idea?
-Vincent
> -----Original Message-----
> From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> Sent: 02 September 2003 18:56
> To: Maven Users List
> Subject: Re: SNAPSHOT download overwrites more recent local file
>
> Sounds like a bug to me.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
> Martin Skopp <sk...@riege.de> wrote on 03/09/2003 02:36:41 AM:
>
> > Hi guys,
> >
> > I have the problem that I have created fresh and most-recent new
snaphot
> > jars in my _local_ repository (lets say in project A).
> >
> > Now I like to test them inside Project B with depends upon this
> > snapshots jar!
> >
> > Problem: In online mode, maven downloads the snapshots jars from
it's
> > remove repository and overwrites the fresh most-recent jars which I
just
> > installed into my local repo.
> >
> > As a workaround, of course I can run in offline mode, but this has
other
> > drawbacks (e.g. if meanwhile project B needs to download a new jar).
> >
> > Is there any option inside maven to prevent such a behaviour in
online
> > mode? IMHO maven should replace the snapshot jar only if the remote
> > version is _really_ younger than the one on my local harddrive!
> >
> > You help and comments highly appreciated,
> > --
> > Martin Skopp
> > Riege Software International GmbH
> > Support: mailto:maint@riege.com, Information: http://www.riege.com
> >
> > This email is intended to be viewed with a nonproportional font.
> > Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
> > Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: SNAPSHOT download overwrites more recent local file
Posted by di...@multitask.com.au.
Sounds like a bug to me.
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Martin Skopp <sk...@riege.de> wrote on 03/09/2003 02:36:41 AM:
> Hi guys,
>
> I have the problem that I have created fresh and most-recent new snaphot
> jars in my _local_ repository (lets say in project A).
>
> Now I like to test them inside Project B with depends upon this
> snapshots jar!
>
> Problem: In online mode, maven downloads the snapshots jars from it's
> remove repository and overwrites the fresh most-recent jars which I just
> installed into my local repo.
>
> As a workaround, of course I can run in offline mode, but this has other
> drawbacks (e.g. if meanwhile project B needs to download a new jar).
>
> Is there any option inside maven to prevent such a behaviour in online
> mode? IMHO maven should replace the snapshot jar only if the remote
> version is _really_ younger than the one on my local harddrive!
>
> You help and comments highly appreciated,
> --
> Martin Skopp
> Riege Software International GmbH
> Support: mailto:maint@riege.com, Information: http://www.riege.com
>
> This email is intended to be viewed with a nonproportional font.
> Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
> Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>