You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by John Casey <ca...@gmail.com> on 2006/11/20 21:32:06 UTC

Error with getIfNewer and SCP

Hi,

I was wondering whether anyone had any insight into this particular problem?
I remember this coming up last winter, when Brett first tried to fix
MNG-1908, but that was rolled back. IIRC, he re-applied it, and now I'm
seeing this error again in builds of Maven 2.1-SNAPSHOT. I'm not sure I want
to take the chance of rebuilding my 2.0.5 snapshot to verify the problem
there, but I may take a crack at it just for the sake of thoroughness.

Here's a partial stacktrace:

java.lang.UnsupportedOperationException: getIfNewer is scp wagon must be
still implemented
        at org.apache.maven.wagon.providers.ssh.ScpWagon.getIfNewer(
ScpWagon.java:360)
        at
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(
DefaultWagonManager.java:401)
        at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(
DefaultWagonManager.java:323)
        at
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways
(DefaultRepositoryMetadataManager.java:357)

Does anyone have an idea of how we might make the wagon/maven-artifact apis
a little more resilient in dealing with older providers? I'd propose
catching this exception (with a HUGE // TODO: in there, of course), and
reverting to the pre-MNG-1908 way of doing things in those cases...

WDYT?

-john

Re: Error with getIfNewer and SCP

Posted by Brett Porter <br...@apache.org>.
getIfNewer has always been part of the wagon API - we are just  
expecting it to be implemented now. I'll check over the wagon's we  
have and update them.

I guess we can catch UnSupOpEx in wagon manager too. Thanks.

- Brett

On 21/11/2006, at 8:50 AM, John Casey wrote:

> I guess I was concerned about the possibility of accidentally using  
> an older
> wagon provider with maven apis that expect getIfNewer to be  
> present...as in
> the case where people are specifying build extensions. Wouldn't it be
> reasonable to - in addition to the fix you mention - add a simple  
> catch
> clause and warn/workaround in that case?
>
> -j
>
> On 11/20/06, Brett Porter <br...@apache.org> wrote:
>>
>> Thanks John, I guess I hadn't tried deployment after the fix. This
>> should be straightforward to correct - at the very worst, we could
>> change getIfNewer to just do a get() for SCP.
>>
>> - Brett
>>
>> On 21/11/2006, at 7:32 AM, John Casey wrote:
>>
>> > Hi,
>> >
>> > I was wondering whether anyone had any insight into this particular
>> > problem?
>> > I remember this coming up last winter, when Brett first tried to  
>> fix
>> > MNG-1908, but that was rolled back. IIRC, he re-applied it, and now
>> > I'm
>> > seeing this error again in builds of Maven 2.1-SNAPSHOT. I'm not
>> > sure I want
>> > to take the chance of rebuilding my 2.0.5 snapshot to verify the
>> > problem
>> > there, but I may take a crack at it just for the sake of  
>> thoroughness.
>> >
>> > Here's a partial stacktrace:
>> >
>> > java.lang.UnsupportedOperationException: getIfNewer is scp wagon
>> > must be
>> > still implemented
>> >        at org.apache.maven.wagon.providers.ssh.ScpWagon.getIfNewer(
>> > ScpWagon.java:360)
>> >        at
>> >  
>> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(
>> > DefaultWagonManager.java:401)
>> >        at
>> >  
>> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMeta 
>> d
>> > ata(
>> > DefaultWagonManager.java:323)
>> >        at
>> >  
>> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada 
>> t
>> > aManager.resolveAlways
>> > (DefaultRepositoryMetadataManager.java:357)
>> >
>> > Does anyone have an idea of how we might make the wagon/maven-
>> > artifact apis
>> > a little more resilient in dealing with older providers? I'd  
>> propose
>> > catching this exception (with a HUGE // TODO: in there, of course),
>> > and
>> > reverting to the pre-MNG-1908 way of doing things in those cases...
>> >
>> > WDYT?
>> >
>> > -john
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>

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


Re: Error with getIfNewer and SCP

Posted by John Casey <ca...@gmail.com>.
I guess I was concerned about the possibility of accidentally using an older
wagon provider with maven apis that expect getIfNewer to be present...as in
the case where people are specifying build extensions. Wouldn't it be
reasonable to - in addition to the fix you mention - add a simple catch
clause and warn/workaround in that case?

-j

On 11/20/06, Brett Porter <br...@apache.org> wrote:
>
> Thanks John, I guess I hadn't tried deployment after the fix. This
> should be straightforward to correct - at the very worst, we could
> change getIfNewer to just do a get() for SCP.
>
> - Brett
>
> On 21/11/2006, at 7:32 AM, John Casey wrote:
>
> > Hi,
> >
> > I was wondering whether anyone had any insight into this particular
> > problem?
> > I remember this coming up last winter, when Brett first tried to fix
> > MNG-1908, but that was rolled back. IIRC, he re-applied it, and now
> > I'm
> > seeing this error again in builds of Maven 2.1-SNAPSHOT. I'm not
> > sure I want
> > to take the chance of rebuilding my 2.0.5 snapshot to verify the
> > problem
> > there, but I may take a crack at it just for the sake of thoroughness.
> >
> > Here's a partial stacktrace:
> >
> > java.lang.UnsupportedOperationException: getIfNewer is scp wagon
> > must be
> > still implemented
> >        at org.apache.maven.wagon.providers.ssh.ScpWagon.getIfNewer(
> > ScpWagon.java:360)
> >        at
> > org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(
> > DefaultWagonManager.java:401)
> >        at
> > org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetad
> > ata(
> > DefaultWagonManager.java:323)
> >        at
> > org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadat
> > aManager.resolveAlways
> > (DefaultRepositoryMetadataManager.java:357)
> >
> > Does anyone have an idea of how we might make the wagon/maven-
> > artifact apis
> > a little more resilient in dealing with older providers? I'd propose
> > catching this exception (with a HUGE // TODO: in there, of course),
> > and
> > reverting to the pre-MNG-1908 way of doing things in those cases...
> >
> > WDYT?
> >
> > -john
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Error with getIfNewer and SCP

Posted by Brett Porter <br...@apache.org>.
Thanks John, I guess I hadn't tried deployment after the fix. This  
should be straightforward to correct - at the very worst, we could  
change getIfNewer to just do a get() for SCP.

- Brett

On 21/11/2006, at 7:32 AM, John Casey wrote:

> Hi,
>
> I was wondering whether anyone had any insight into this particular  
> problem?
> I remember this coming up last winter, when Brett first tried to fix
> MNG-1908, but that was rolled back. IIRC, he re-applied it, and now  
> I'm
> seeing this error again in builds of Maven 2.1-SNAPSHOT. I'm not  
> sure I want
> to take the chance of rebuilding my 2.0.5 snapshot to verify the  
> problem
> there, but I may take a crack at it just for the sake of thoroughness.
>
> Here's a partial stacktrace:
>
> java.lang.UnsupportedOperationException: getIfNewer is scp wagon  
> must be
> still implemented
>        at org.apache.maven.wagon.providers.ssh.ScpWagon.getIfNewer(
> ScpWagon.java:360)
>        at
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(
> DefaultWagonManager.java:401)
>        at
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetad 
> ata(
> DefaultWagonManager.java:323)
>        at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadat 
> aManager.resolveAlways
> (DefaultRepositoryMetadataManager.java:357)
>
> Does anyone have an idea of how we might make the wagon/maven- 
> artifact apis
> a little more resilient in dealing with older providers? I'd propose
> catching this exception (with a HUGE // TODO: in there, of course),  
> and
> reverting to the pre-MNG-1908 way of doing things in those cases...
>
> WDYT?
>
> -john

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