You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jonas Fagundes (JIRA)" <ji...@codehaus.org> on 2008/02/13 05:07:28 UTC

[jira] Created: (MNG-3399) Maven shows fake network error until the next updatePolicy period

Maven shows fake network error until the next updatePolicy period
-----------------------------------------------------------------

                 Key: MNG-3399
                 URL: http://jira.codehaus.org/browse/MNG-3399
             Project: Maven 2
          Issue Type: Bug
          Components: General
    Affects Versions: 2.0.8
            Reporter: Jonas Fagundes


Hi,

The default updatePolicy is daily.

If it has any problems in updating it marks that plugin as checked and keeping showing the same error message without trying to hit the server again.

At my work they changed the proxy configuration making the build fail, we started to have the following message:

The plugin 'org.apache.maven.plugins:maven-clean-plugin' does not exist or no valid version could be found.

Even after they rollback the network configuration, maven still showing the same error.

To solve the problem I had to put this lines
    <pluginRepository>
      <releases>
        <updatePolicy>always</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Plugin Repository</name>
      <url>http://repo1.maven.org/maven2</url>
    </pluginRepository>

as the first pluginRepository and run for every developer just to force the update.

This workaround works fine but until I realized that this is the behavior of maven it generated a lot problems trying setup the network configuration (it was not trying to hit the network, but it still showing the same error, so all configuration attempts were worthless).

Show a network error that was not checked against the current configuration is a bug.

My suggestion for an easy solution is to update timestamp of the latest hit in the repository *after* it has a success, if it fails does not update the timestamp and updatePolicy will make it keep trying for every execution until it finally hit with success. This way you don't need to verify any extra condition to see if the previous try resulted in an error. This way will make the debug of network problems much easier for the users that have the same problem.

I didn't look your sources, so maybe this solution is not practical in your architecture. Feel free to use another route to solve this bug.

Thanks for your excellent work in maven (it is first bug in years),
Jonas Fagundes

-- 
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: (MNG-3399) Maven shows fake network error until the next updatePolicy period

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

Brian Fox closed MNG-3399.
--------------------------

    Resolution: Duplicate

> Maven shows fake network error until the next updatePolicy period
> -----------------------------------------------------------------
>
>                 Key: MNG-3399
>                 URL: http://jira.codehaus.org/browse/MNG-3399
>             Project: Maven 2
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.8
>            Reporter: Jonas Fagundes
>
> Hi,
> The default updatePolicy is daily.
> If it has any problems in updating it marks that plugin as checked and keeping showing the same error message without trying to hit the server again.
> At my work they changed the proxy configuration making the build fail, we started to have the following message:
> The plugin 'org.apache.maven.plugins:maven-clean-plugin' does not exist or no valid version could be found.
> Even after they rollback the network configuration, maven still showing the same error.
> To solve the problem I had to put this lines
>     <pluginRepository>
>       <releases>
>         <updatePolicy>always</updatePolicy>
>       </releases>
>       <snapshots>
>         <enabled>false</enabled>
>       </snapshots>
>       <id>central</id>
>       <name>Maven Plugin Repository</name>
>       <url>http://repo1.maven.org/maven2</url>
>     </pluginRepository>
> as the first pluginRepository and run for every developer just to force the update.
> This workaround works fine but until I realized that this is the behavior of maven it generated a lot problems trying setup the network configuration (it was not trying to hit the network, but it still showing the same error, so all configuration attempts were worthless).
> Show a network error that was not checked against the current configuration is a bug.
> My suggestion for an easy solution is to update timestamp of the latest hit in the repository *after* it has a success, if it fails does not update the timestamp and updatePolicy will make it keep trying for every execution until it finally hit with success. This way you don't need to verify any extra condition to see if the previous try resulted in an error. This way will make the debug of network problems much easier for the users that have the same problem.
> I didn't look your sources, so maybe this solution is not practical in your architecture. Feel free to use another route to solve this bug.
> Thanks for your excellent work in maven (it is first bug in years),
> Jonas Fagundes

-- 
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