You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Phillip Webb (JIRA)" <ji...@codehaus.org> on 2007/02/25 19:11:15 UTC

[jira] Created: (WAGON-73) MirroredWagon infinite loop

MirroredWagon infinite loop
---------------------------

                 Key: WAGON-73
                 URL: http://jira.codehaus.org/browse/WAGON-73
             Project: wagon
          Issue Type: Bug
            Reporter: Phillip Webb
            Priority: Critical


The MirroredWagon class includes a get method that runs into an infinite loop.

I think a return is required after this.impl.get( resource, destination );


    public void get( String resource, File destination )
        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
    {
        try
        {
            while ( true )
            {
                try
                {
                    this.impl.get( resource, destination );
                }
                catch ( TransferFailedException e )
                {
                    nextMirror();
                }
            }
        }
        catch ( ExhaustedMirrorsException e )
        {

        }
    }




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WAGON-73) MirroredWagon infinite loop

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joakim Erdfelt resolved WAGON-73.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

This appears to be fixed.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104145 ] 

Brian Fox commented on WAGON-73:
--------------------------------

I ran the ITs using Maven 2.0.7 and I get one additional failure with the patch applied:
{noformat}
  testSnapshotLocalMetadataUpdatedOnInstall(org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest)
{noformat}

The ones that fail regardless of the patch or not are:

{noformat}
Failed tests:
  testit0002(org.apache.maven.integrationtests.MavenIT0002Test)
  testit0008(org.apache.maven.integrationtests.MavenIT0008Test)
  testit0009(org.apache.maven.integrationtests.MavenIT0009Test)
  testit0012(org.apache.maven.integrationtests.MavenIT0012Test)
  testit0022(org.apache.maven.integrationtests.MavenIT0022Test)
  testit0023(org.apache.maven.integrationtests.MavenIT0023Test)
  testit0025(org.apache.maven.integrationtests.MavenIT0025Test)
  testit0026(org.apache.maven.integrationtests.MavenIT0026Test)
  testit0027(org.apache.maven.integrationtests.MavenIT0027Test)
  testit0040(org.apache.maven.integrationtests.MavenIT0040Test)
  testit0041(org.apache.maven.integrationtests.MavenIT0041Test)
  testit0044(org.apache.maven.integrationtests.MavenIT0044Test)
  testit0045(org.apache.maven.integrationtests.MavenIT0045Test)
  testit0046(org.apache.maven.integrationtests.MavenIT0046Test)
  testit0049(org.apache.maven.integrationtests.MavenIT0049Test)
  testit0064(org.apache.maven.integrationtests.MavenIT0064Test)
  testit0071(org.apache.maven.integrationtests.MavenIT0071Test)
  testit0073(org.apache.maven.integrationtests.MavenIT0073Test)
  testit0082(org.apache.maven.integrationtests.MavenIT0082Test)
  testit0088(org.apache.maven.integrationtests.MavenIT0088Test)
  testit0090(org.apache.maven.integrationtests.MavenIT0090Test)

Tests in error:
  testit0086(org.apache.maven.integrationtests.MavenIT0086Test)
  testit0087(org.apache.maven.integrationtests.MavenIT0087Test)
  testit0104(org.apache.maven.integrationtests.MavenIT0104Test)

Tests run: 115, Failures: 21, Errors: 3, Skipped: 0
{noformat}

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88529 ] 

Joakim Erdfelt commented on WAGON-73:
-------------------------------------

The only possible way for this to loop infinitely is to have a cycle in the mirror list.

A -> B -> C -> A  

Instead of tackling this cycle directly, I am pre-initializing the mirror list on construction of the MirroredWagon to make it clear what is going on for future developers looking at this code.


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>         Assigned To: Joakim Erdfelt
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104150 ] 

William Ferguson commented on WAGON-73:
---------------------------------------

Ah good. I'd just realised that my cursory investigation from before was a little off as the actual time is read from the 'lastUpdated' element of the Metadata and won't be resolved until it is requested. But I did wonder about time zone.

I wish #assertEquals printed the full content for the expected and actual values. It would have been useful.


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Phillip Webb (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88489 ] 

Phillip Webb commented on WAGON-73:
-----------------------------------

Likewise for the connect method

    public void connect()
        throws ConnectionException, AuthenticationException
    {
        try
        {
            // Keep trying with .nextMirror() et al.
            while ( true )
            {
                try
                {
                    this.impl.connect();
                }
                catch ( ConnectionException e )
                {
                    logger.warn( "Unable to connect to mirror [" + this.impl.getRepository().getId() + "]" );
                    nextMirror();
                }
                catch ( AuthenticationException e )
                {
                    logger.warn( "Unable to authenticate to mirror [" + this.impl.getRepository().getId() + "]" );
                    nextMirror();
                }
            }
        }
        catch ( ExhaustedMirrorsException e )
        {
            logger.warn( e.getMessage() );
            throw new ConnectionException( e.getMessage(), e );
        }
    }

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-73) MirroredWagon infinite loop

Posted by "Phillip Webb (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phillip Webb updated WAGON-73:
------------------------------

    Attachment: returnsonmirroredwagon.patch

I think this bug still exists, please see MNGECLIPSE-274.  I have attached a suggested patch.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>         Assigned To: Joakim Erdfelt
>            Priority: Critical
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103907 ] 

Arnaud Heritier commented on WAGON-73:
--------------------------------------

The problem in archetype is related to another bug : MNG-3099

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (WAGON-73) MirroredWagon infinite loop

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104145 ] 

Brian Fox edited comment on WAGON-73 at 8/6/07 8:33 PM:
--------------------------------------------------------

I ran the ITs using Maven 2.0.7 and I get one additional failure with the patch applied:
{noformat}
  testSnapshotLocalMetadataUpdatedOnInstall(org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest)
{noformat}

The ones that fail regardless of the patch or not are:

{noformat}
Failed tests:
  testit0002(org.apache.maven.integrationtests.MavenIT0002Test)
  testit0008(org.apache.maven.integrationtests.MavenIT0008Test)
  testit0009(org.apache.maven.integrationtests.MavenIT0009Test)
  testit0012(org.apache.maven.integrationtests.MavenIT0012Test)
  testit0022(org.apache.maven.integrationtests.MavenIT0022Test)
  testit0023(org.apache.maven.integrationtests.MavenIT0023Test)
  testit0025(org.apache.maven.integrationtests.MavenIT0025Test)
  testit0026(org.apache.maven.integrationtests.MavenIT0026Test)
  testit0027(org.apache.maven.integrationtests.MavenIT0027Test)
  testit0040(org.apache.maven.integrationtests.MavenIT0040Test)
  testit0041(org.apache.maven.integrationtests.MavenIT0041Test)
  testit0044(org.apache.maven.integrationtests.MavenIT0044Test)
  testit0045(org.apache.maven.integrationtests.MavenIT0045Test)
  testit0046(org.apache.maven.integrationtests.MavenIT0046Test)
  testit0049(org.apache.maven.integrationtests.MavenIT0049Test)
  testit0064(org.apache.maven.integrationtests.MavenIT0064Test)
  testit0071(org.apache.maven.integrationtests.MavenIT0071Test)
  testit0073(org.apache.maven.integrationtests.MavenIT0073Test)
  testit0082(org.apache.maven.integrationtests.MavenIT0082Test)
  testit0088(org.apache.maven.integrationtests.MavenIT0088Test)
  testit0090(org.apache.maven.integrationtests.MavenIT0090Test)

Tests in error:
  testit0086(org.apache.maven.integrationtests.MavenIT0086Test)
  testit0087(org.apache.maven.integrationtests.MavenIT0087Test)
  testit0104(org.apache.maven.integrationtests.MavenIT0104Test)

Tests run: 115, Failures: 21, Errors: 3, Skipped: 0
{noformat}

The error for this test is:
{noformat}
testSnapshotLocalMetadataUpdatedOnInstall(org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest)  Time elapsed: 3.5 sec  <<< FAILURE!
junit.framework.ComparisonFailure: expected:<...6...> but was:<...7...>
	at junit.framework.Assert.assertEquals(Assert.java:81)
	at junit.framework.Assert.assertEquals(Assert.java:87)
	at org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest.assertLocalMetadataIsToday(MavenIT0108SnapshotUpdateTest.java:243)
	at org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest.testSnapshotLocalMetadataUpdatedOnInstall(MavenIT0108SnapshotUpdateTest.java:215)
	at org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest.testSnapshotLocalMetadataUpdatedOnInstall(MavenIT0108SnapshotUpdateTest.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:154)

{noformat}


 was:
I ran the ITs using Maven 2.0.7 and I get one additional failure with the patch applied:
{noformat}
  testSnapshotLocalMetadataUpdatedOnInstall(org.apache.maven.integrationtests.MavenIT0108SnapshotUpdateTest)
{noformat}

The ones that fail regardless of the patch or not are:

{noformat}
Failed tests:
  testit0002(org.apache.maven.integrationtests.MavenIT0002Test)
  testit0008(org.apache.maven.integrationtests.MavenIT0008Test)
  testit0009(org.apache.maven.integrationtests.MavenIT0009Test)
  testit0012(org.apache.maven.integrationtests.MavenIT0012Test)
  testit0022(org.apache.maven.integrationtests.MavenIT0022Test)
  testit0023(org.apache.maven.integrationtests.MavenIT0023Test)
  testit0025(org.apache.maven.integrationtests.MavenIT0025Test)
  testit0026(org.apache.maven.integrationtests.MavenIT0026Test)
  testit0027(org.apache.maven.integrationtests.MavenIT0027Test)
  testit0040(org.apache.maven.integrationtests.MavenIT0040Test)
  testit0041(org.apache.maven.integrationtests.MavenIT0041Test)
  testit0044(org.apache.maven.integrationtests.MavenIT0044Test)
  testit0045(org.apache.maven.integrationtests.MavenIT0045Test)
  testit0046(org.apache.maven.integrationtests.MavenIT0046Test)
  testit0049(org.apache.maven.integrationtests.MavenIT0049Test)
  testit0064(org.apache.maven.integrationtests.MavenIT0064Test)
  testit0071(org.apache.maven.integrationtests.MavenIT0071Test)
  testit0073(org.apache.maven.integrationtests.MavenIT0073Test)
  testit0082(org.apache.maven.integrationtests.MavenIT0082Test)
  testit0088(org.apache.maven.integrationtests.MavenIT0088Test)
  testit0090(org.apache.maven.integrationtests.MavenIT0090Test)

Tests in error:
  testit0086(org.apache.maven.integrationtests.MavenIT0086Test)
  testit0087(org.apache.maven.integrationtests.MavenIT0087Test)
  testit0104(org.apache.maven.integrationtests.MavenIT0104Test)

Tests run: 115, Failures: 21, Errors: 3, Skipped: 0
{noformat}

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-73) MirroredWagon infinite loop

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated WAGON-73:
------------------------------

    Fix Version/s:     (was: 1.x)
                   1.0-beta-3

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: Maven Wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Brian Fox
>            Priority: Critical
>             Fix For: 1.0-beta-3
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104144 ] 

Brian Fox commented on WAGON-73:
--------------------------------

I applied the relevant patches and committed to a branch here: https://svn.apache.org/repos/asf/maven/wagon/branches/WAGON-73

Patches are easier to apply if there is one patch combining all changes throughout the life of the issue. The patch should be created with svn from the root of the project where the changes are to be made...otherwise the files need to be hand-edited before applying. For example:

{noformat}
Index: /home/philw/mavenide/wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java
===================================================================
--- /home/philw/mavenide/wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java	(revision 519885)
+++ /home/philw/mavenide/wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java	(working copy)
{noformat}

should be

{noformat}
Index: wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java
===================================================================
--- wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java	(revision 519885)
+++ wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java	(working copy)

{noformat}

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Phil Webb (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96821 ] 

Phil Webb commented on WAGON-73:
--------------------------------

Are you sure that this is fixed on the trunk?  I believe that the maven eclipse project was tested with the patch applied.  The SVN code does not appear to have the patch.  

Looking at the code I cannot see how the loop in the connect method will return when the connection is successful (ie when there are no exceptions).


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Phil Webb (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88539 ] 

Phil Webb commented on WAGON-73:
--------------------------------

My mirror list is fairly simple, it only consists of a single mirror to an inhouse installation of maven-proxy

	<mirrors>
		<mirror>
			<id>maven-proxy</id>
			<name>Maven-Proxy Mirror</name>
			<url>http://releaseserver:8080/maven-proxy-webapp/repository/</url>
			<mirrorOf>central</mirrorOf>
		</mirror>
	</mirrors>


I have not provided a patch (sorry Eugene) because I am not totally sure of how the code should work, so I am not totally confident of my proposed fix.  I am looking at it fairly blind, just trying to fix a problem that I had.  If you want me to attach one please let me know.

I still have a bit of a problem understanding the code, even after the updates.  Should the connect method not return if it is successful?

If you follow the path of the code, if the hasMirror() method returns true, then the this.impl.connect(); is called.  If this method connects then I assume that no exceptions are thrown?  After this the method will loop around the while ( hasMirror() ) again?  I would have thought that if the connection is successful here then there should be no need to loop around again.  Likewise with the get method.

Sorry if I am missing something, I am just trying to understand.


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>         Assigned To: Joakim Erdfelt
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Phil Webb (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90251 ] 

Phil Webb commented on WAGON-73:
--------------------------------

Are there any updates to this?

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>         Assigned To: Joakim Erdfelt
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (WAGON-73) MirroredWagon infinite loop

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox closed WAGON-73.
--------------------------

    Resolution: Fixed

branch merged and snapshot deployed. Thanks for the patch.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Brian Fox
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88505 ] 

Eugene Kuleshov commented on WAGON-73:
--------------------------------------

It would make it easier to apply if you provided a proper patch for the required changes...

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (WAGON-73) MirroredWagon infinite loop

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter reopened WAGON-73:
-------------------------------


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104149 ] 

Brian Fox commented on WAGON-73:
--------------------------------

You're right, it's not the patch, but the test. The constructLocalMetadata doesn't take into account that the lastUpdated tag in the metadata is in UTC. It's not yet Aug 7 here so it's failing the comparison.

I removed the patch and the test is failing now. It was a coincidence that I tried it just after midnight UTC such that it passed before.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Phil Webb (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_93429 ] 

Phil Webb commented on WAGON-73:
--------------------------------

The patch has been tested in MNGECLIPSE-274 (see comment on 9th April).

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Stanislav Spiridonov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88626 ] 

Stanislav Spiridonov commented on WAGON-73:
-------------------------------------------

I have the same behavior with a mirror of central:

	<mirrors>
		<mirror>
			<id>jresearch-proxy-central</id>
			<url>http://fire.jresearch.org/proxy/repository</url>
			<mirrorOf>central</mirrorOf>
		</mirror>
	</mirrors>

I think we use the same proxy application (http://maven-proxy.codehaus.org/). 

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>         Assigned To: Joakim Erdfelt
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104148 ] 

William Ferguson commented on WAGON-73:
---------------------------------------

I can't checkout the all the code necessary to fully inspect this right now, but it looks like an error in the testcase.

Line #215 of MavenIT0108SnapshotUpdateTest calls #assertLocalMetadataIsToday but passes in the localMetadata (File) that it resolved *before* the install goal is run instead of after. Otherwise it will be comparing the localMetadata File from a previous run (perhaps yesterday) which would explain the failure.


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Phil Webb (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88898 ] 

Phil Webb commented on WAGON-73:
--------------------------------

We are using the same proxy application (http://maven-proxy.codehaus.org/).

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>         Assigned To: Joakim Erdfelt
>            Priority: Critical
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_97032 ] 

William Ferguson commented on WAGON-73:
---------------------------------------

Can we get this reopened please.
Phil's patch has not been applied and AFAICT #connect() will still loop indefinitely if the connect succeeds, likewise for #get(String, File)

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-73) MirroredWagon infinite loop

Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Ferguson updated WAGON-73:
----------------------------------

    Attachment: WAGON-73-ConnectAndGetTest.patch

OK, can we get this issued reopened now?

The test case that Phil has provided certainly seemed OK and definitely results in an infinite loop on #connect. The patch that I have just provided also shows #get failing.

Applying Phil's patch resolves the issue.


> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-73) MirroredWagon infinite loop

Posted by "Phil Webb (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Webb updated WAGON-73:
---------------------------

    Attachment: WagonManagerTest.java.patch

I have created a patch to try and show the problem.  It seems to fail in the same way as when using the eclipse plugin.  I have not had the time to really understand how the mirrored wagon should work so please excuse me if I have made some mistake with test case.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Peter Hayes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96988 ] 

Peter Hayes commented on WAGON-73:
----------------------------------

I am experiencing the same issue using the m2eclipse plugin from trunk.  The connect method is in a tight loop on MirroredWagon.connect() and it never returns.  I am using an SSL based mirror of central.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_97036 ] 

Joakim Erdfelt commented on WAGON-73:
-------------------------------------

No.
See revision [511720|http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-manager/src/main/java/org/apache/maven/wagon/manager/MirroredWagon.java?r1=505639&r2=511720&diff_format=h] for commit / fix.
Attached patch does *NOT* fix the issue.

If you have another way to demonstrate the infinite mirror situation.
Provide a test case.
This ticket will not be reopened until then.

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-73) MirroredWagon infinite loop

Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103900 ] 

William Ferguson commented on WAGON-73:
---------------------------------------

OK, our workaround to this bug (overriding the central repository in settings.xml instead of creating a mirror for it). Ie

			<repositories>
				<repository>
					<id>central</id>
					<name>Overrride of Central (not mirror)</name>
					<url>http://zosma.oz.hubbub.com.au:8080/proximity/repository/release</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			<pluginRepositories>
				<pluginRepository>
					<id>central</id>
					<name>Override of Central</name>
					<url>http://zosma.oz.hubbub.com.au:8080/proximity/repository/release</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>

appears to work for all maven components except when there is a dependency on the maven-archetype-plugin.
For some reason 'mvn archetype:create ..' causes all Maven artifacts to be retrieved from the *real* central and not the one we have overridden in settings.xml. Whereas 'mvn clean compile' retrieves the Maven components from the overridden location.

We are currently stuck in a situation, where either
  a) 'mvn archetype:create' works
  b) Eclipse can download Maven dependencies
But not both.

So can we please get the patch applied?

> MirroredWagon infinite loop
> ---------------------------
>
>                 Key: WAGON-73
>                 URL: http://jira.codehaus.org/browse/WAGON-73
>             Project: wagon
>          Issue Type: Bug
>            Reporter: Phillip Webb
>            Assignee: Joakim Erdfelt
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: returnsonmirroredwagon.patch, WAGON-73-ConnectAndGetTest.patch, WagonManagerTest.java.patch
>
>
> The MirroredWagon class includes a get method that runs into an infinite loop.
> I think a return is required after this.impl.get( resource, destination );
>     public void get( String resource, File destination )
>         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
>     {
>         try
>         {
>             while ( true )
>             {
>                 try
>                 {
>                     this.impl.get( resource, destination );
>                 }
>                 catch ( TransferFailedException e )
>                 {
>                     nextMirror();
>                 }
>             }
>         }
>         catch ( ExhaustedMirrorsException e )
>         {
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira