Issue Details (XML | Word | Printable)

Key: MNG-3399
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: Jonas Fagundes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 2

Maven shows fake network error until the next updatePolicy period

Created: 12/Feb/08 10:06 PM   Updated: 07/Mar/08 08:28 PM
Component/s: General
Affects Version/s: 2.0.8
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 


 Description  « Hide
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



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.